Prerequisites
Installation
Use SDK adapter
Use theAurikoModel adapter:
AurikoModel replaces 4 lines of global client configuration with a single model parameter. It extends OpenAIChatCompletionsModel with routing injection, error mapping, and per-task metadata isolation via ContextVar.
Configure options
| Parameter | Type | Default | Description |
|---|---|---|---|
model | str | (required) | Model ID |
api_key | str | None | AURIKO_API_KEY env | API key |
routing | RoutingOptions | None | None | Routing configuration |
base_url | str | "https://api.auriko.ai/v1" | API base URL |
Configure routing
Configure routing options:ContextVar, so concurrent Runner.run() calls sharing the same AurikoModel instance don’t interfere with each other.
Configure manually
Alternative: configure OpenAI Agents SDK manually
Alternative: configure OpenAI Agents SDK manually
If you prefer to configure the SDK’s client directly:Note:
set_default_openai_api("chat_completions") is required because Auriko implements the Chat Completions API, not the Responses API. Routing options, error mapping, and per-task metadata isolation aren’t available with manual configuration.Notes
AurikoModelextendsOpenAIChatCompletionsModel— it works with all Agents SDK features: tools, handoffs, streaming, guardrails.- OpenAI API errors are automatically mapped to typed Auriko error classes (
RateLimitError,BudgetExceededError, etc.). - Concurrent agent runs using the same
AurikoModelinstance have isolated routing metadata viaContextVar.