ChatOpenAI replacement.
Prerequisites
Installation
Use SDK adapter
Use theAurikoChatOpenAI adapter:
AurikoChatOpenAI extends LangChain’s ChatOpenAI with:
- Automatic
use_responses_api=False(LangChain >=1.1 auto-routes GPT-5/Codex to the Responses API, which Auriko doesn’t implement) - Routing injection via
extra_body - OpenAI error mapping to typed Auriko error classes
Configure options
| Parameter | Type | Default | Description |
|---|---|---|---|
model | str | (required, via parent) | 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 |
**kwargs | Passed through to ChatOpenAI (e.g., temperature, max_tokens) |
Configure routing
Configure routing options:generate():
Configure manually
Alternative: configure LangChain manually
Alternative: configure LangChain manually
If you prefer to use Note: you must set
ChatOpenAI directly:use_responses_api=False manually, and routing options aren’t available without extra_body configuration.Notes
AurikoChatOpenAIinherits allChatOpenAIcapabilities: chains, agents, tool calling, async, streaming.- OpenAI API errors are automatically mapped to typed Auriko error classes (
RateLimitError,BudgetExceededError, etc.). - The
use_responses_api=Falseflag is set automatically — you don’t need to remember it.