Definition
OpenAI SDK migration means moving an app from the default OpenAI endpoint to another OpenAI-compatible provider by changing configuration such as base URL, API key, and model ID while keeping the request shape similar where supported. For unlimitedcodex, use delivered setup values and verify /v1/models before long runs.
Canonical facts
| Config values | Base URL, API key, model ID, and endpoint-specific settings usually change. |
|---|---|
| Request shape | Many compatible providers preserve familiar chat or embeddings request bodies. |
| First test | Run /v1/models, then one tiny request. |
| unlimitedcodex | Use delivered setup values after manual provisioning. |
| Safety | Keep keys server-side and use placeholders in public code. |
What usually changes
The code often changes less than the configuration. Instead of rewriting every request, teams change environment variables or client initialization so the SDK points at the delivered /v1 base URL and uses the delivered key and model ID.
What still needs testing
Streaming, images, embeddings, error handling, retries, and response fields can vary. Migrate one route first, then expand only after smoke tests pass.
Checks
Find the SDK custom base URL option.
Use environment variables for base URL, key, and model ID.
Run /v1/models after delivery.
Test one route before migrating the whole app.
Keep fallback and retry behavior visible.
Target queries
FAQ
Can I keep my existing OpenAI SDK code?
Often yes, if the SDK version supports custom base URLs and Bearer authentication. Test one route before relying on it.
What should not be migrated blindly?
Streaming, images, embeddings, tool behavior, retries, and error handling should be tested endpoint by endpoint.
Should I use delivered model IDs?
Yes. Do not guess model IDs before the setup email; confirm them with /v1/models.