Keep your SDK
Point the official OpenAI client at a warpllm gateway. Application code
does not change at all.
Swap the SDK
Replace the client with warpllm’s. One dependency fewer, no extra hop, no
service to operate.
Route 1 — change the base URL
1
Run the gateway with your provider keys
2
Point your existing client at it
3
Prefix your model strings
gpt-5-nano becomes openai/gpt-5-nano. This is the only change to the
request itself, and it is what buys you provider switching.Route 2 — swap the client
Constructing a client
Making a call
warpllm takes one mapping rather than keyword arguments. That is what
lets fields warpllm does not model cross to the provider untouched — see
Requests and responses.
Responses are plain data
The OpenAI SDK returns Pydantic models; warpllm returns the JSON shape. In Python that means subscripting rather than attribute access. Node and Rust already used dot access, so nothing changes there.Streaming
Errors
The exception classes have the same names and the same dispatch, soexcept RateLimitError keeps working. Two differences:
- Python’s attribute is
status_code; Node’s isstatus. warpllm matches the official SDK in each language. - Node has no
APIStatusErrorintermediate — every class extendsAPIErrordirectly, anderr.status === undefinedmarks a connection failure.
What does not carry over
warpllm implements the chat-completions surface only. These have no warpllm equivalent today:A model whose registry entry does not list the surface you asked for is
refused before a request goes out, rather than being sent somewhere it will
fail. See Model routing.
Next
SDK reference
The exact surface in each language.
Run the gateway
Docker, cargo, and the flags.