Bump bundled @ai-sdk/openai-compatible 2.0.41 -> 2.0.75 (fixes fragmented reasoning streams)

Open Beginner friendly
#50,290 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript

Research direction

Locate the package declaration and lockfile entry that pin @ai-sdk/openai-compatible at 2.0.41. Update them to 2.0.75, then replay the captured SSE stream under Node or exercise an affected reasoning model. Done means reasoning output produces one reasoning-start and one reasoning-end event with the deltas kept contiguous.

Written by the indexing model from the issue text.

Description

Environment

  • opencode: v1.x (desktop, bundled SDK)
  • bundled @ai-sdk/openai-compatible: 2.0.41
  • Model: any OpenAI-compatible reasoning model that streams reasoning_content (DeepSeek, Kimi, Qwen, ...)
  • Platform: Windows

Problem

Reasoning output is fragmented in the UI: every single reasoning token opens and closes its own reasoning-start / reasoning-end cycle instead of accumulating into one contiguous reasoning block. The thinking text renders word-by-word on separate lines and flickers, instead of one continuous block.

Reproduction

  1. Configure any model routed through @ai-sdk/openai-compatible that returns reasoning_content.
  2. Send any prompt.
  3. Observe the thinking block: each token is toggled on/off separately rather than appended to one block.

Evidence

Replaying the same captured SSE stream (model streams reasoning_content token by token) under Node, counting the emitted events:

version reasoning-start reasoning-end reasoning-delta
2.0.41 (currently bundled) 268 268 268
2.0.75 (latest 2.x) 1 1 268

With 2.0.41 every token becomes its own reasoning cycle; with 2.0.75 the stream is correctly kept as a single contiguous block (268 deltas appended to one part).

Root cause

Already fixed upstream in 2.0.75:

  • vercel/ai commit f3c1980: fix(openai-compatible): keep reasoning streams contiguous when deltas include empty tool call arrays
  • Released in: @ai-sdk/openai-compatible@2.0.75 (2026-09-09)

opencode currently bundles 2.0.41 (see #17902, where a maintainer confirmed "we use @ai-sdk/openai-compatible: 2.0.41"; the lockfile pins 2.0.41 as well), which does not include this fix.

Request

Please bump the bundled @ai-sdk/openai-compatible from 2.0.41 to the latest 2.0.75:

  • This stays within the 2.x line (specificationVersion: v3) and remains compatible with the current AI SDK 6 core, so no core upgrade is required.
  • It is a pure patch bump with no breaking changes.

References

  • #17902 (source of the current 2.0.41 pin)
  • #27987 / #22241 (related discussion about merging reasoning cycles on the opencode side)
Dominant language
TypeScript
Stars
209k
Forks
27.5k
Avg merge
7h 20m
Merged PRs (30d)
358

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from anomalyco/opencode

All issues in anomalyco/opencode

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.