tweak: when using messages api for copilot, attach anthropic beta headers
This commit is contained in:
parent
ccc7aa49c3
commit
45b09c1465
1 changed files with 5 additions and 0 deletions
|
|
@ -277,6 +277,11 @@ export async function CopilotAuthPlugin(input: PluginInput): Promise<Hooks> {
|
||||||
},
|
},
|
||||||
"chat.headers": async (input, output) => {
|
"chat.headers": async (input, output) => {
|
||||||
if (!input.model.providerID.includes("github-copilot")) return
|
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
|
const session = await sdk.session
|
||||||
.get({
|
.get({
|
||||||
path: {
|
path: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue