diff options
| author | Aiden Cline <[email protected]> | 2026-01-26 17:17:37 -0500 |
|---|---|---|
| committer | Aiden Cline <[email protected]> | 2026-01-26 17:17:54 -0500 |
| commit | 45b09c14658d36f2107f16ad0c8bd31002a02cf0 (patch) | |
| tree | 9199c37a11fce3366df1fc4daf46d4db8d85a8b8 | |
| parent | ccc7aa49c33dc2247ceee0a51e7816ea5803c404 (diff) | |
| download | opencode-45b09c14658d36f2107f16ad0c8bd31002a02cf0.tar.gz opencode-45b09c14658d36f2107f16ad0c8bd31002a02cf0.zip | |
tweak: when using messages api for copilot, attach anthropic beta headers
| -rw-r--r-- | packages/opencode/src/plugin/copilot.ts | 5 |
1 files changed, 5 insertions, 0 deletions
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<Hooks> { }, "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: { |
