mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-20 09:32:19 +00:00
fix: gh copilot issue w/ haiku (eager_input_streaming not supported) (#23223)
This commit is contained in:
parent
866188a643
commit
81b7b58a5e
1 changed files with 7 additions and 0 deletions
|
|
@ -334,6 +334,13 @@ export async function CopilotAuthPlugin(input: PluginInput): Promise<Hooks> {
|
|||
if (incoming.model.api.id.includes("gpt")) {
|
||||
output.maxOutputTokens = undefined
|
||||
}
|
||||
|
||||
// GitHub Copilot's /v1/messages shim rejects the GA `eager_input_streaming`
|
||||
// field on tool definitions ("Extra inputs are not permitted"). Opt out of
|
||||
// the @ai-sdk/anthropic default so it stops injecting the field.
|
||||
if (incoming.model.api.npm === "@ai-sdk/anthropic") {
|
||||
output.options.toolStreaming = false
|
||||
}
|
||||
},
|
||||
"chat.headers": async (incoming, output) => {
|
||||
if (!incoming.model.providerID.includes("github-copilot")) return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue