The open source coding agent.
TypeScript
tweak: when using messages api for copilot, attach anthropic beta headers
Aiden Cline45b09c14658d
diff --git a/packages/opencode/src/plugin/copilot.ts b/packages/opencode/src/plugin/copilot.tsindex 659090dd3a1..0be1345871f 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: {