Skip to content

fix: bump @openrouter/ai-sdk-provider to 2.9.0#30800

Merged
rekram1-node merged 1 commit into
anomalyco:devfrom
colinhacks:fix/openrouter-provider-2.9.0
Jun 4, 2026
Merged

fix: bump @openrouter/ai-sdk-provider to 2.9.0#30800
rekram1-node merged 1 commit into
anomalyco:devfrom
colinhacks:fix/openrouter-provider-2.9.0

Conversation

@colinhacks

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #26244

Type of change

  • Bug fix

What does this PR do?

Bumps @openrouter/ai-sdk-provider from 2.8.1 to 2.9.0 in packages/opencode and packages/core (+ bun.lock).

2.8.1 has a streaming-parser bug: its merge-path re-emits a tool-call event every time the accumulated tool-call arguments are still parsable JSON, and trailing-whitespace/closing-token deltas keep them parsable. So models that emit a trailing chunk after a complete tool call get duplicate tool-call events with the same id. Downstream (the AI SDK streamText loop opencode runs on) treats them as two calls and runs the tool twice, which on reasoning+tool-call interleaving models like moonshotai/kimi-k2.6 over OpenRouter degenerates into a silent stall / self-reinforcing duplicate loop.

2.9.0 fixes this by gating the merge-path emit on a sent flag — see OpenRouterTeam/ai-sdk-provider#489 (released in https://github.com/OpenRouterTeam/ai-sdk-provider/releases/tag/2.9.0). Same peer deps (ai ^6.0.0), so it's a drop-in minor bump.

How did you verify your code works?

  • bun install resolves 2.9.0 cleanly (matching integrity), respecting the repo's minimumReleaseAge policy.
  • tsgo --noEmit clean in both packages/core and packages/opencode.
  • bun test green: packages/opencode/test/provider/transform.test.ts (246/246, incl. the @openrouter/ai-sdk-provider block) and packages/core/test/plugin/provider-openrouter.test.ts + test/config/provider-options.test.ts (24/24 — the plugin test actually instantiates 2.9.0's createOpenRouter).
  • I don't have an OpenRouter key for a live kimi-through-OpenRouter run, so the runtime evidence is the upstream SDK fix (URLs should not be line-wrapped #489) + green build/tests rather than an e2e repro.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

2.8.1 stalls/duplicates streaming tool calls for models that interleave
reasoning + tool calls over OpenRouter (e.g. moonshotai/kimi-k2.6). 2.9.0
contains the upstream parser fix (OpenRouterTeam/ai-sdk-provider#489).

Closes anomalyco#26244
Copilot AI review requested due to automatic review settings June 4, 2026 18:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates @openrouter/ai-sdk-provider to a newer version across the workspace to keep OpenRouter integration current and consistent.

Changes:

  • Bump @openrouter/ai-sdk-provider from 2.8.1 to 2.9.0 in packages/opencode and packages/core
  • Regenerate bun.lock to reflect the new dependency version

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
packages/opencode/package.json Updates @openrouter/ai-sdk-provider version to 2.9.0.
packages/core/package.json Updates @openrouter/ai-sdk-provider version to 2.9.0.
bun.lock Updates locked @openrouter/ai-sdk-provider to 2.9.0 and introduces an additional nested lock entry.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rekram1-node

Copy link
Copy Markdown
Collaborator

ty!

@rekram1-node rekram1-node merged commit e45e0e1 into anomalyco:dev Jun 4, 2026
10 of 11 checks passed
ShamirSecret pushed a commit to ShamirSecret/auto-code-machine that referenced this pull request Jun 5, 2026
avion23 pushed a commit to avion23/opencode that referenced this pull request Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Silent completion failure for non-default FOSS models on OpenRouter (Kimi K2.6, DeepSeek-R1, llama-3.3-70b)

3 participants