tweak: when using messages api for copilot, attach anthropic beta headers

This commit is contained in:
Aiden Cline
2026-01-26 17:17:37 -05:00
parent ccc7aa49c3
commit 45b09c1465

View File

@@ -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: {