Bug
When using GitHub Copilot as the provider in opencode, the newer 5.6 model family returns 403 Forbidden from the chat completions endpoint:
github-copilot/gpt-5.6-luna
github-copilot/gpt-5.6-sol
github-copilot/gpt-5.6-terra
Other models on the same account/token (4.1, 5, 5.5, claude-*, etc.) work correctly.
Reproduction
opencode auth login → GitHub Copilot (any account with 5.6 access, e.g. Copilot Enterprise)
opencode run --model github-copilot/gpt-5.6-luna 'hello'
- Request fails with HTTP 403.
Root cause
When no Copilot-Integration-Id request header is supplied, GitHub's Copilot API infers the integration id from the OAuth client id. opencode's OAuth CLIENT_ID (Ov23li8tweQw6odWQebz) is registered internally as copilot-language-server, which is not authorized for the 5.6 model family.
Verified via curl with the same token:
Copilot-Integration-Id header |
5.6 model result |
| (omitted) |
403 |
copilot-language-server |
403 |
vscode-chat |
200 OK |
Suggested fix
Explicitly send Copilot-Integration-Id: vscode-chat on Copilot requests, with an env override (e.g. OPENCODE_COPILOT_INTEGRATION_ID) for advanced users.
PR: #36574
Bug
When using GitHub Copilot as the provider in opencode, the newer 5.6 model family returns 403 Forbidden from the chat completions endpoint:
github-copilot/gpt-5.6-lunagithub-copilot/gpt-5.6-solgithub-copilot/gpt-5.6-terraOther models on the same account/token (4.1, 5, 5.5, claude-*, etc.) work correctly.
Reproduction
opencode auth login→ GitHub Copilot (any account with 5.6 access, e.g. Copilot Enterprise)opencode run --model github-copilot/gpt-5.6-luna 'hello'Root cause
When no
Copilot-Integration-Idrequest header is supplied, GitHub's Copilot API infers the integration id from the OAuth client id. opencode's OAuthCLIENT_ID(Ov23li8tweQw6odWQebz) is registered internally ascopilot-language-server, which is not authorized for the 5.6 model family.Verified via
curlwith the same token:Copilot-Integration-Idheadercopilot-language-servervscode-chatSuggested fix
Explicitly send
Copilot-Integration-Id: vscode-chaton Copilot requests, with an env override (e.g.OPENCODE_COPILOT_INTEGRATION_ID) for advanced users.PR: #36574