From a6b7d2d3fb1013b0494c8c3b533d2fb3a2099ab5 Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Thu, 26 Feb 2026 12:56:26 +0800 Subject: [PATCH] fix(provider): add thinking level variants for GitHub Copilot Claude models Restore low/medium/high/max thinking budget variants for Claude models on the GitHub Copilot provider. Budget caps for high and max are dynamically computed from the model's output limit, matching the direct Anthropic SDK behavior. Closes #11627 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus --- packages/opencode/src/provider/transform.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/opencode/src/provider/transform.ts b/packages/opencode/src/provider/transform.ts index b659799c1b6..66dbf78471d 100644 --- a/packages/opencode/src/provider/transform.ts +++ b/packages/opencode/src/provider/transform.ts @@ -434,7 +434,10 @@ export namespace ProviderTransform { } if (model.id.includes("claude")) { return { - thinking: { thinking_budget: 4000 }, + low: { thinking_budget: 1024 }, + medium: { thinking_budget: 4000 }, + high: { thinking_budget: Math.min(16_000, Math.floor(model.limit.output / 2 - 1)) }, + max: { thinking_budget: Math.min(31_999, model.limit.output - 1) }, } } const copilotEfforts = iife(() => {