Skip to content

Commit 81b7b58

Browse files
authored
fix: gh copilot issue w/ haiku (eager_input_streaming not supported) (#23223)
1 parent 866188a commit 81b7b58

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

  • packages/opencode/src/plugin/github-copilot

packages/opencode/src/plugin/github-copilot/copilot.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,13 @@ export async function CopilotAuthPlugin(input: PluginInput): Promise<Hooks> {
334334
if (incoming.model.api.id.includes("gpt")) {
335335
output.maxOutputTokens = undefined
336336
}
337+
338+
// GitHub Copilot's /v1/messages shim rejects the GA `eager_input_streaming`
339+
// field on tool definitions ("Extra inputs are not permitted"). Opt out of
340+
// the @ai-sdk/anthropic default so it stops injecting the field.
341+
if (incoming.model.api.npm === "@ai-sdk/anthropic") {
342+
output.options.toolStreaming = false
343+
}
337344
},
338345
"chat.headers": async (incoming, output) => {
339346
if (!incoming.model.providerID.includes("github-copilot")) return

0 commit comments

Comments
 (0)