OpenAI
Configuration
credentials:
- name: "openai_main"
type: "openai"
api_key: "sk-proj-xxxxx"
base_url: "https://api.openai.com"
rpm: 100
tpm: 50000
Required Fields
| Field | Description |
|---|---|
api_key |
OpenAI API key (supports os.environ/VAR_NAME) |
base_url |
API base URL (https://api.openai.com) |
Azure OpenAI
For Azure OpenAI, use the same openai type with the Azure endpoint:
credentials:
- name: "azure_openai"
type: "openai"
api_key: "os.environ/AZURE_OPENAI_KEY"
base_url: "https://your-resource.openai.azure.com"
rpm: 100
tpm: 50000
Per-Model Configuration
Use the models section to control per-model behavior:
models:
- model: "gpt-4o-mini"
rpm: 500
tpm: 200000
- model: "gpt-5.3-codex"
passthrough_responses: true # forward Responses API requests natively (auto-detected for codex models)
- model: "gpt-4o"
passthrough_responses: false # force Chat Completions conversion even if model name contains "codex"
passthrough_responses
Controls whether Responses API (/v1/responses) requests for this model are forwarded natively to the provider's /v1/responses endpoint instead of being converted to Chat Completions format.
| Value | Behavior |
|---|---|
true |
Always forward as native Responses API (no Chat Completions conversion) |
false |
Always convert to Chat Completions (even if model name contains "codex") |
| omitted | Auto-detect: true if model name contains codex, false otherwise |
This is useful when deploying non-codex models that natively support /v1/responses, or to force conversion for codex-named models behind a Chat Completions-only endpoint.
Responses API
Requests to /v1/responses are automatically detected and handled:
- Standard models (gpt-4o, gpt-4o-mini, o1, o3, etc.): converted to Chat Completions format internally, response converted back. Works with Azure OpenAI and all other OpenAI-compatible backends.
- Codex / passthrough models: forwarded natively to the provider's
/v1/responsesendpoint without conversion.
See Responses API documentation for full details.
Web Search Tools
The web_search and web_search_preview tool types are only forwarded for models whose name contains search-preview (e.g. gpt-4o-search-preview). For all other models these tools are dropped before the request reaches the provider, since Chat Completions endpoints reject unrecognized tool types.
# Works — model supports web search natively
client.chat.completions.create(
model="gpt-4o-search-preview", tools=[{"type": "web_search_preview"}], ...
)
# Tool is silently dropped for non-search models
client.chat.completions.create(
model="gpt-4o-mini", tools=[{"type": "web_search"}], ... # dropped
)
Other non-function tool types (e.g. computer_use, code_execution) are also dropped for OpenAI Chat Completions requests. They are handled by their respective providers (Vertex AI, Anthropic) when those backends are configured.