From 81b7b58a5e396fb7d932ac77c7503d6271fa30ea Mon Sep 17 00:00:00 2001 From: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> Date: Fri, 17 Apr 2026 20:57:48 -0500 Subject: [PATCH] fix: gh copilot issue w/ haiku (eager_input_streaming not supported) (#23223) --- packages/opencode/src/plugin/github-copilot/copilot.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/opencode/src/plugin/github-copilot/copilot.ts b/packages/opencode/src/plugin/github-copilot/copilot.ts index c018f72bd5..9b6f54459d 100644 --- a/packages/opencode/src/plugin/github-copilot/copilot.ts +++ b/packages/opencode/src/plugin/github-copilot/copilot.ts @@ -334,6 +334,13 @@ export async function CopilotAuthPlugin(input: PluginInput): Promise { 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