Is the OpenAI Agents SDK model agnostic?
Yes, but not out of the box. The default path targets OpenAI, and reaching another provider takes one of two routes the SDK builds in before reaching for anything external.
The first is built-in: point set_default_openai_client at an OpenAI-compatible endpoint, hand Runner.run a custom ModelProvider, or set a specific agent’s model to a concrete model object, so different agents in the same run can use different providers. This fits any provider with an OpenAI-compatible API, and the docs recommend the older Chat Completions path over the Responses API here, since “many LLM providers still do not support the Responses API.”
The second is an explicit opt-in: a third-party adapter, LiteLLM or Any-LLM, each installed as its own extra (openai-agents[litellm]), each the docs call “best-effort, beta.” Reach for one only once the built-in integration points fall short, which is itself a sign the SDK’s model-agnosticism is a feature you turn on, not the resting state. The Claude Agent SDK draws the line differently: it runs only Claude models, with no equivalent switch to flip.
published
sources
- OpenAI Agents SDK docs: Models fetched