tweak: when using messages api for copilot, attach anthropic beta headers
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user