Home/Docs/Migration Guide

Migrating to Selixes Gateway

Selixes is engineered as a wire-compatible drop-in proxy for the official OpenAI SDK. Migrating your existing applications requires only updating your clientโ€™s baseURL to point to your Selixes instance. No prompt schema or SDK wrapper rewrites are necessary.

2-Line SDK Configuration Swap

Update your client initialization in Node.js or Python to route transit through Selixes:

// Node.js (OpenAI SDK)

import OpenAI from 'openai';

const openai = new OpenAI({
  baseURL: 'http://localhost:4000/v1', // Point to your Selixes Gateway instance
  apiKey: process.env.OPENAI_API_KEY,  // Provider key passed directly
});

Custom Header Primitives

Activate gateway resilience and budget guards by adding standard HTTP headers to your requests:

HTTP HeaderValue / TypePurpose
x-selixes-session-idString (UUID/Slug)Tracks multi-turn trajectory and reasoning spend
x-selixes-max-session-costFloat (e.g. 0.50)Hard USD spending cap across an agent run
x-selixes-max-concurrent-callsInteger (e.g. 5)Limits parallel agent worker bursts
x-selixes-timeoutInteger (ms)Per-request timeout before failover standby trigger