From 45b09c14658d36f2107f16ad0c8bd31002a02cf0 Mon Sep 17 00:00:00 2001 From: Aiden Cline Date: Mon, 26 Jan 2026 17:17:37 -0500 Subject: [PATCH] tweak: when using messages api for copilot, attach anthropic beta headers --- packages/opencode/src/plugin/copilot.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/opencode/src/plugin/copilot.ts b/packages/opencode/src/plugin/copilot.ts index 659090dd3..0be134587 100644 --- a/packages/opencode/src/plugin/copilot.ts +++ b/packages/opencode/src/plugin/copilot.ts @@ -277,6 +277,11 @@ export async function CopilotAuthPlugin(input: PluginInput): Promise { }, "chat.headers": async (input, output) => { if (!input.model.providerID.includes("github-copilot")) return + + if (input.model.api.npm === "@ai-sdk/anthropic") { + output.headers["anthropic-beta"] = "interleaved-thinking-2025-05-14" + } + const session = await sdk.session .get({ path: {