diff options
| author | Aiden Cline <[email protected]> | 2026-04-17 20:57:48 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-04-17 20:57:48 -0500 |
| commit | 81b7b58a5e396fb7d932ac77c7503d6271fa30ea (patch) | |
| tree | b65862314d22c9c34dc2e6e11047c947ab25bea8 | |
| parent | 866188a643271ddfca3c3ae007d6cddad8d0d11c (diff) | |
| download | opencode-81b7b58a5e396fb7d932ac77c7503d6271fa30ea.tar.gz opencode-81b7b58a5e396fb7d932ac77c7503d6271fa30ea.zip | |
fix: gh copilot issue w/ haiku (eager_input_streaming not supported) (#23223)
| -rw-r--r-- | packages/opencode/src/plugin/github-copilot/copilot.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/opencode/src/plugin/github-copilot/copilot.ts b/packages/opencode/src/plugin/github-copilot/copilot.ts index c018f72bd..9b6f54459 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<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 |
