base_url + API key), so you can run agents on Chat Completions at POST /v1/chat/completions β the same gateway shape as the OpenAI SDK.
This page covers LLM text only (
https://llm.modellix.ai).Modellix model IDs are provider/name (for example openai/gpt-5.5). Pass that full string to the model layer. Prefer OpenAIChatCompletionsModel (or MultiProvider with openai_prefix_mode="model_id") so the SDK does not strip the openai/ prefix before calling Modellix. See Models & Pricing.Set Up the Agents SDK
1
Install the SDK
Python:TypeScript:
2
Set Credentials
3
Create a Client and Agent (Recommended)
Build an Change the model string to any catalog ID (
AsyncOpenAI / OpenAI client pointed at Modellix, wrap it in OpenAIChatCompletionsModel with a literal Modellix Model ID, and disable tracing unless you have a separate OpenAI tracing key.anthropic/claude-sonnet-5, google/gemini-3.6-flash, and so on). Traffic still uses Chat Completions on https://llm.modellix.ai/v1.4
Optional: Global Default Client
To make Modellix the process-wide default without wrapping every agent:Then assign models carefully. String IDs like
openai/gpt-5.5 can be rewritten by the default OpenAI provider (it may drop the openai/ prefix). Prefer OpenAIChatCompletionsModel with the full Modellix ID, or a MultiProvider with openai_prefix_mode="model_id" (Python) so the gateway receives openai/gpt-5.5 unchanged. See Agents SDK models.5
Optional: Responses API
Modellix also exposes
POST /v1/responses. The SDK defaults to Responses for OpenAI-hosted traffic. On a compatible gateway, start with Chat Completions (set_default_openai_api("chat_completions") / setOpenAIAPI("chat_completions")) unless you have verified Responses + tools for your agent loop.Keep base_url as https://llm.modellix.ai/v1 for both shapes. Do not use the Anthropic host without /v1 here β that path is for the Anthropic SDK and Claude Code.Troubleshooting
Related
- OpenAI Agents SDK β Models β custom clients and Chat Completions
- OpenAI Agents SDK β Configuration β
OPENAI_BASE_URL, tracing, API shape - OpenAI platform β Agents models β model selection overview
- OpenAI SDK β same
/v1gateway without the Agents runtime - LangChain β another Chat Completions client path
- Models & Pricing β Model IDs and rates
- LLM API guide β protocols and curl examples