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
@ai-sdk/azure defaults to completions api instead of responses #9035
The chatCompletion operation does not work with the specified model, gpt-5.2-codex. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.
model gpt-5.2 works fine
used opencode, to fetch opencode source, add debug, identify issue and fix
issue is
`@ai-sdk/azure does support the Responses API. The issue is in opencode’s routing: your custom azure-openai provider goes through the generic path, which defaults to chat-completions unless useCompletionUrls is set. That’s why it’s hitting /chat/completions even though the model supports responses'
Plugins
nada
OpenCode version
latest - dev branch
Steps to reproduce
use custom provider via @ai-sdk/azure
set model to gpt-5.2-codex
launch opencode
💀
The chatCompletion operation does not work with the specified model, gpt-5.2-codex. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.
I'm having the same problem. I'm trying to use gpt-5.1-codex and it works when I run opencode on my local machine, but when I try to run it on a gitlab ci pipeline with the same configurations (same opencode.jsonc and variables) it always fails with the error The chatCompletion operation does not work with the specified model, gpt-5.1-codex. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993. I tried with opencode versions 1.1.23 and 1.1.26. This is the opencode.jsonc I am using
Activity
github-actions commentedon Jan 17, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
OmarMcAdam commentedon Jan 17, 2026
using
azureas providerId instead ofazure-openairesolves the issueJoaoCP13 commentedon Jan 20, 2026
I'm having the same problem. I'm trying to use gpt-5.1-codex and it works when I run opencode on my local machine, but when I try to run it on a gitlab ci pipeline with the same configurations (same opencode.jsonc and variables) it always fails with the error
The chatCompletion operation does not work with the specified model, gpt-5.1-codex. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.I tried with opencode versions 1.1.23 and 1.1.26. This is the opencode.jsonc I am usingI also added the useCompletionUrls option to false but didn't make any difference, it always resolve to the chatCompletion.
Can you please help me? Thank you in advance
CezaryKlus commentedon Jan 27, 2026
I experience the same behavior when running from VS Code devcontainer