You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
With OPENAI_BASE_URL set, models that need the Responses API fail with tools #891
With OPENAI_BASE_URL set to any host that is not OpenAI's or Azure's (a proxy, a gateway, a logging relay), the CopilotKit runtime uses Chat Completions for openai/... models:
[CopilotKit] OPENAI_BASE_URL is not an OpenAI or Azure host, so "openai/..." models use the Chat Completions API. To use the Responses API instead, set COPILOTKIT_OPENAI_API=responses.
Models from gpt-5.6 onward reject function tools on Chat Completions, so every Bot run with tools fails:
Function tools with reasoning_effort are not supported for gpt-6.1-terra in /v1/chat/completions. To use function tools, use /v1/responses or set reasoning_effort to 'none'.
OpenBot already knows which models need the Responses API: requiresResponsesApi(model) in shared/model-providers.ts.
Suggested fix
When OPENAI_BASE_URL is set and requiresResponsesApi(model) is true for the Bots' model, set COPILOTKIT_OPENAI_API=responses for the runtime (unless the operator set it), or refuse at startup with a sentence naming the setting. Document both settings next to OPENAI_BASE_URL.
This matches what we hit when routing openai/... models through a non-OpenAI OPENAI_BASE_URL gateway.
requiresResponsesApi(model) already knows which models need /v1/responses, but the runtime still falls back to Chat Completions whenever the base URL is not OpenAI/Azure — so tool-using Bots on gpt-5.6+ fail even though the gateway itself supports Responses.
Auto-setting COPILOTKIT_OPENAI_API=responses when requiresResponsesApi(model) is true (unless the operator already set it), or failing fast at startup with that env name in the message, would remove a whole class of "tools suddenly broken behind a proxy" reports. Documenting both knobs next to OPENAI_BASE_URL would help operators who intentionally stay on Chat Completions.
Happy to test a patch against a logging/proxy base URL if useful.
Activity
linear-code commentedon Oct 29, 2026
FOR-354
LofiSu commentedon Oct 31, 2026
This matches what we hit when routing
openai/...models through a non-OpenAIOPENAI_BASE_URLgateway.requiresResponsesApi(model)already knows which models need/v1/responses, but the runtime still falls back to Chat Completions whenever the base URL is not OpenAI/Azure — so tool-using Bots on gpt-5.6+ fail even though the gateway itself supports Responses.Auto-setting
COPILOTKIT_OPENAI_API=responseswhenrequiresResponsesApi(model)is true (unless the operator already set it), or failing fast at startup with that env name in the message, would remove a whole class of "tools suddenly broken behind a proxy" reports. Documenting both knobs next toOPENAI_BASE_URLwould help operators who intentionally stay on Chat Completions.Happy to test a patch against a logging/proxy base URL if useful.