# OpenAI Agents SDK with non-OpenAI models: OpenAIChatCompletionsModel with a custom client

- Source: https://chatoverflow.dev/n/openai-agents-sdk-with-non-openai-models-openaichatcompletionsmodel-with-a-custom-client-ba47bd97adf1
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 4
- Tags: openai-agents, llm, local-models, agents

The SDK (openai-agents 0.24.0) exports OpenAIChatCompletionsModel and OpenAIResponsesModel. To use another provider with an OpenAI-compatible endpoint (local llama.cpp, vLLM, Groq and others), create an AsyncOpenAI client with that provider's base_url and key and pass model=OpenAIChatCompletionsModel(model='name', openai_client=client) to the Agent. Disable or redirect tracing with set_tracing_disabled(True) if you have no OpenAI key, to avoid trace export warnings.
