Migrating from OpenAI
Step-by-step guide: move an existing application from OpenAI to SovrGPT.
As a rule, three changes are all it takes:
- Change
baseURL. - Swap the API key.
- Replace the model ID.
That is it. Streaming, function calling, JSON mode, vision — all of it works.
1. Set baseURL
| Before (OpenAI) | After (SovrGPT) |
|---|---|
https://api.openai.com/v1 | https://sovrgpt.com/api/v1 |
In most SDKs: client.base_url = "https://sovrgpt.com/api/v1" or
new OpenAI({ baseURL: "https://sovrgpt.com/api/v1" }).
2. Swap the API key
Replace OpenAI keys (sk-…) with SovrGPT keys (sk-sovr-…). Create them under
Settings → API keys; see
Authentication.
Tip: you can simply overwrite the
OPENAI_API_KEYenvironment variable with the SovrGPT key and change nothing in the code. But do make sure the same variable is not still shared with actual OpenAI calls somewhere.
3. Replace the model ID
| OpenAI | SovrGPT equivalent | Context | Notes |
|---|---|---|---|
gpt-4o | qwen3.8-27b (balanced) | 131,072 | The one-to-one replacement: the only own tier whose context window is in the same order of magnitude as gpt-4o (128k). Without a cold start: tensorx-qwen3.8-27b. |
gpt-4o-mini | gemma-4-12b (default) | 262,144 | Both small and fast — here the window is in fact twice that of gpt-4o-mini. |
gpt-4-turbo | qwen3.8-27b (balanced) | 131,072 | Deeper than gpt-4o-mini. |
o1 / o1-mini | qwen3.5-9b-deepseek-v4-flash (reasoning) | 16,384 | Chain of thought in reasoning_content. ⚠️ The thought counts against max_tokens — with a tight budget the answer comes back empty. |
gpt-4o-vision-preview | gemma-4-26b-a4b (vision) | 262,144 | Multimodal. |
🔴 The context window is where a migration goes wrong silently.
/v1/chat/completions does not reject an over-long request — it is
truncated upstream, and you get HTTP 200 with an answer that never saw the part
of your prompt that was cut off. Check your target model's window before
switching, via context_window in
GET /v1/models, and make sure
input + max_tokens stays below it.
We refresh the exact mapping recommendations with every model refresh in Models.
Example: the diff for a Python app
from openai import OpenAI
client = OpenAI(
- api_key=os.environ["OPENAI_API_KEY"],
+ api_key=os.environ["SOVR_API_KEY"],
+ base_url="https://sovrgpt.com/api/v1",
)
resp = client.chat.completions.create(
- model="gpt-4o-mini",
+ model="gemma-4-12b",
messages=[{"role": "user", "content": "Hello!"}],
)Three lines. Nothing else.
What is not available one-to-one?
- Embeddings — we do not have
text-embedding-3-*in v1 yet. Planned for Q3/2026. - DALL·E 3 — we offer Z-Image and FLUX.2 in the chat UI; a dedicated
/v1/images/generationsendpoint follows in Q3/2026. - Whisper / TTS — not in the current v1, planned for Q4/2026.
- Assistants API — probably will not be implemented; use our marketplace plus scheduled jobs instead.
- Realtime API (WebRTC) — not on the 2026 roadmap.
For each of these we recommend a hybrid approach: SovrGPT for chat completions (80 % or more of the load), OpenAI only for the specific missing features (20 % or less). That keeps the bulk of your data inside the EU.
Performance tuning
- Avoid cold starts: for production cron jobs (nightly, say) send a small warm-up request 30 seconds before the real load.
- Use streaming: for longer answers, SSE improves perceived latency dramatically.
- Pick the right model: the
defaulttier instead ofpremiumsaves money and latency when you do not need the depth. - Set a token limit: set
max_tokensexplicitly — it prevents runaway answers and surprise bills.
Data migration
- Existing OpenAI threads and assistants cannot be imported directly.
- Embeddings have to be regenerated (different vector space).
- System prompts work unchanged.
For larger migrations (10 apps or more), get in touch at kontakt@e-networkers.de — we offer a free one-hour migration consultation.