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
GitHub Copilot GPT-6 models do not send selected reasoning effort #51850
When using GPT-6 models through the GitHub Copilot provider, OpenCode does not include the selected reasoning effort in the outgoing /responses request.
OpenCode correctly records the selected variant, for example:
This issue might be a duplicate of existing issues. Please check:
#48247: GPT-6 model-ID handling in provider request transforms affects reasoning-related options. That issue focuses on Azure behavior, so please check whether its investigation also covers the missing reasoning effort on GitHub Copilot.
// ~/.config/opencode/plugins/github-copilot-gpt6-reasoning.tsconstCOPILOT_HOST="api.githubcopilot.com"constCOPILOT_RESPONSES_PATH=/(?:^|\/)responses(?:\/|$)/functionisCopilotResponsesRequest(url: string){try{constparsed=newURL(url)returnparsed.hostname===COPILOT_HOST&&COPILOT_RESPONSES_PATH.test(parsed.pathname)}catch{returnfalse}}exportdefault{id: "github-copilot.gpt6-reasoning",asyncsetup(ctx: any){awaitctx.session.hook("http.request",async(event: any)=>{if(!isCopilotResponsesRequest(event.request.url))returntry{// Copilot Responses bodies look like {"model":"gpt-6","input":[...]}; `include` and `reasoning` may be absent.// Clone the one-shot body before parsing, and replace the request only after the rewrite succeeds.constbody=JSON.parse(awaitevent.request.clone().text())asRecord<string,unknown>constmodel=event.modelconsteffort=model?.variantif(model?.providerID==="github-copilot"&&typeofmodel.id==="string"&&model.id.startsWith("gpt-6")&&typeofeffort==="string"&&typeofbody.model==="string"&&body.model.startsWith("gpt-6")){// GitHub Copilot's GPT-6 Responses route needs reasoning in the raw body; OpenCode's option is not forwarded.body.reasoning={ effort,summary: "auto"}constinclude=Array.isArray(body.include) ? body.include : []if(!include.includes("reasoning.encrypted_content")){include.push("reasoning.encrypted_content")}body.include=includeevent.request=newRequest(event.request,{body: JSON.stringify(body)})}}catch{// Leave malformed requests untouched.}})},}
Activity
github-actions commentedon Sep 28, 2026
This issue might be a duplicate of existing issues. Please check:
andrii-riabchun commentedon Sep 28, 2026
Made a plugin to workaround the issue
rekram1-node commentedon Sep 29, 2026
Some of our copilot support has been slacking, ill polish it soon
rekram1-node commentedon Sep 29, 2026
Merged fix, will release later