Migrating an OpenAI SDK client to SiberAI: what changes and what does not
This article was prepared by the SiberAI team.
This guide is built only from published SiberAI docs and the integrations page. It is for teams that already call OpenAI-compatible chat.completions (or Responses) and want Siber v3 without inventing unsupported endpoints.
What stays familiar
- OpenAI-compatible request structure and the official
openaiPython client pattern (OpenAI(api_key=..., base_url=...)). - Chat Completions from a message list, optional
stream:true. - Responses format for server apps that already use it—check accepted fields in the Responses guide.
- Bearer customer key; create it in the dashboard (full value only at creation).
What you must change
- Point
base_url/ API address at path/api/siberai/v1on siberai.net (prefer an env var such asSIBERAI_BASE_URL). - Set
modeltosiber-v3only—other ids yieldmodel_not_foundper models docs. - Keep the key on the server (integrations: not in browser bundles, mobile apps or public repos).
- Ensure the key’s workspace has available funds and active access before load tests (quickstart).
What does not migrate
Per scope pages and the integrations compatibility note:
- No
/images/generationsor separate image model. - No
/embeddingsendpoint or embedding model. - No generation webhook callback when a job finishes—use JSON or SSE; your app owns queues and retries.
- Do not assume every OpenAI SDK helper is supported; verify the endpoint in SiberAI docs.
Migration checklist
- Create a SiberAI customer key; store only in env / secret store.
- Swap base URL and model; leave message shape as Chat Completions (or Responses if that is your stack).
- Smoke-test one non-streaming call; then streaming if you need SSE.
- Remove image/embedding/webhook calls or route them to other systems.
- Map 401 / 402 / 429 using the error reference before writing retry logic.
- Track usage from the dashboard or documented usage fields—not from prompt bodies in logs.
References: integrations, quickstart, models, images, webhooks.
FAQ
Q: Can I keep my old model string?
A: No—use siber-v3.
Q: Will webhook_url start working on SiberAI?
A: No—webhooks are not offered; adding the field does not create a delivery contract.
Q: Embeddings via chat output?
A: Docs: treating chat output as an embedding vector is a different contract; no embeddings endpoint.
API base path: /api/siberai/v1 on siberai.net; model siber-v3.
Yorumlar
Yorum Gönder