GeezerVison is showing github.com — [BUG]: GitHub Copilot Responses API routing for GPT-5+ · Issue #5866 · anomalyco/opencode
[BUG]: GitHub Copilot Responses API routing for GPT-5+ #5866DescriptionProblem
When using the github-copilot provider, GPT-5+ models are currently routed through the Chat API. This prevents users from enabling Responses-API-only controls (eg. reasoningEffort, reasoningSummary) for those models, even when they are supported by the model and useful for agent behavior tuning.
This is especially noticeable for github-copilot/gpt-5.* where users expect to be able to configure reasoning parameters similarly to other OpenAI-compatible providers.
Proposed Solution
Add an opt-in provider option to route supported Copilot models through the Responses API:
- New config flag:
provider.github-copilot.options.useResponsesApi: true
- Behavior:
- Always route
codex* models through sdk.responses(modelID) (existing behavior)
- If
useResponsesApi is enabled and the model is GPT-5 or later, route through sdk.responses(modelID)
- Otherwise, default to
sdk.chat(modelID) (no behavior change by default)
Example config:
{
"provider": {
"github-copilot": {
"options": {
"useResponsesApi": true
}
}
}
}
Future (Deprecation)
Once GitHub Copilot / VS Code enables Responses API usage broadly (the VS Code setting is currently labeled Experimental), this option can likely be deprecated and/or defaulted on for supported models to reduce configuration surface area.
References
Current status of supported API route for provider github-copilot:
| Model |
API Route |
| gpt-4.1 |
chat |
| gpt-4o |
chat |
| gpt-5 |
responses |
| gpt-5-codex |
responses |
| gpt-5-mini |
chat |
| gpt-5.1 |
responses |
| gpt-5.1-codex |
responses |
| gpt-5.1-codex-max |
responses |
| gpt-5.1-codex-mini |
responses |
| gpt-5.2 |
responses |
- VS Code UI (settings) relevant to this feature:
GitHub > Copilot > Chat: Use Responses Api (Experimental)
GitHub > Copilot > Chat: Responses Api Reasoning Effort (Experimental)
GitHub > Copilot > Chat: Responses Api Reasoning Summary (Experimental)
Screenshot of the VS Code settings panel showing the above Copilot settings.
Environment
- Repo:
sst/opencode (dev)
- Platform observed: Windows (but the behavior is provider/model routing specific, not OS-specific)
Activitygithub-actions commented on Dec 20, 2025 This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case. changed the title [-]Feature: opt-in GitHub Copilot Responses API routing for GPT-5+[/-] [+]Feature: GitHub Copilot Responses API routing for GPT-5+[/+] on Dec 21, 2025jbuckmccready commented on Jan 4, 2026 Is this something Github changed recently? I had reasoningEffort working with GPT 5.2 and now it no longer works (no change to configuration on my end).
"provider": {
"github-copilot": {
"models": {
"gpt-5.2": {
"options": {
"reasoningEffort": "medium",
"textVerbosity": "low",
"reasoningSummary": "auto",
"include": ["reasoning.encrypted_content"]
}
}
}
}christso commented on Jan 5, 2026 ContributorAuthor More actions
Is this something Github changed recently? I had reasoningEffort working with GPT 5.2 and now it no longer works (no change to configuration on my end).
@jbuckmccready This is a change in OpenCode, not GitHub.
Commit f1bb587 (merged December 1st) broke reasoning support for GPT-5.2 and other non-Codex GPT-5 models. The change incorrectly assumed only Codex models support reasoning, so it only routes models with "codex" in the name to the API that supports reasoningEffort. Everything else goes to a different API that doesn't support it.
GPT-5.2 was working with reasoning before this commit. There's a PR to fix it.
@rekram1-node should this be reclassified from feature to a bug? I previously thought it was a feature until I discovered it was working previously. changed the title [-]Feature: GitHub Copilot Responses API routing for GPT-5+[/-] [+][BUG]: GitHub Copilot Responses API routing for GPT-5+[/+] on Jan 8, 2026SamPeng87 commented on Jan 13, 2026
这是 Github 最近更改的东西吗?我在使用 GPT 5.2 时 reasoningEffort 一直可用,但现在不再可用了(我的配置没有任何更改)。
@jbuckmccready这是 OpenCode 的更改,不是 GitHub 的。
Commit(于 12 月 1 日合并)破坏了对 GPT-5.2 及其他非 Codex GPT-5 模型的推理支持。该更改错误地假定只有 Codex 模型支持推理,因此仅将名称中包含 "codex" 的模型路由到支持 reasoningEffort 的 API。其它所有模型都被路由到不支持该功能的不同 API。
GPT-5.2 在此提交之前的推理功能是正常的。这里有一个 用来修复它。
@rekram1-node这应该从 feature 重新归类为 bug 吗?我之前以为这是一个 feature,直到我发现它之前是正常工作的。
I think your PR fix still requires the above parameters to activate the thinking mode. Is my understanding correct? Reacted by Christopher Tso christso commented on Jan 16, 2026 ContributorAuthor More actions
I think your PR fix still requires the above parameters to activate the thinking mode. Is my understanding correct?
@SamPeng87 Yes, your understanding is correct. This PR fixes the error that occurs when reasoning is enabled, but you still need to configure the parameters (reasoningEffort, reasoningSummary, include) in your opencode.json to activate thinking mode. scratchmex commented on Jan 20, 2026 We need this option for OpenAI compatible models as well Reacted by Arsham Shirvani and PatrickPjt
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|