OpenCode 2 v2.0.21: provider routing, grouped session reads#
Published by Alex Sorokoletov
Part of the OpenCode 2 Version Tracker series. | OpenCode on GitHub | OpenCode 2 docs
OpenCode 2 v2.0.21 follows v2.0.20 with work concentrated on provider routing and session UI. Cloudflare AI Gateway Claude and OpenAI calls now take native passthroughs, OpenRouter Anthropic and Qwen requests carry prompt cache breakpoints, and the session view collapses adjacent file reads into one row.
Provider and gateway routing#
Most of the AI-layer changes this release are about how requests reach a provider and how an over-limit response is read back.
| Provider / gateway | Change in v2.0.21 |
|---|---|
| Cloudflare AI Gateway | Claude and OpenAI requests route through native passthroughs (#52222). |
| OpenRouter | Anthropic and Qwen requests carry prompt cache breakpoints (#52110). |
| Cloudflare Workers AI | Context-window rejections are classified as context overflow (#52128). |
| Amazon Nova | Input-token rejections are classified as context overflow (#52131). |
| GitHub Copilot | Responses settings are passed through (#52182). |
[1] The two context-overflow fixes mean a request that exceeds the model's window on Workers AI or Nova is recognized as overflow rather than surfaced as a generic provider error. The bundled models.dev catalog was refreshed.
Session view and desktop#
The session view groups adjacent file reads into a single row (#52207), keeps the open "Used" group header sticky while scrolling (#52210), and tightens spacing inside expanded instruction groups (#52311). The terminal renderer bumped OpenTUI to 0.5.13 (#52233) then to 0.5.14 (#52316). Session IDs that appear in markdown are now openable, so a referenced session resolves to its tab (#52231).[2]
On the desktop side, the in-app browser gained the ability to comment on page elements (#52217), and browser tools are hidden unless a desktop is attached (#52309). The new-session flow selects its project by resolved ID (#52230), and tab alerts fire only for open session tabs (#52204).
Core and protocol#
The Agent Client Protocol server now follows server defaults and refreshes the session catalog (#52286).[3] Ancestor instructions are no longer reinjected into a session (#52364), namespaced session identity headers were added (#52368), and form cancellation can carry a message (#52137).
What this tells us#
The provider work keeps OpenCode 2 on the wide-catalog path the 1.x line established, now routed through hosted gateways. Cloudflare AI Gateway requests to Claude and OpenAI take native passthroughs instead of a generic HTTP path, OpenRouter Anthropic and Qwen traffic gets prompt cache breakpoints, and over-limit responses from Workers AI and Amazon Nova are classified as context overflow rather than opaque failures. That is a different center of gravity from Claude Code, Codex CLI, and Gemini CLI, each of which is built first around one vendor's models; OpenCode's breadth lives in how many providers and gateways it can route through cleanly.
The session and desktop changes sit on top of the server-backed architecture surfaced in v2.0.20. Grouping reads, sticky group headers, and clickable session IDs are the kind of polish a multi-pane app accumulates, and commenting on page elements in the in-app browser extends the desktop build past a terminal client. The ACP server now follows server defaults and refreshes the session catalog, a surface a terminal-only tool does not carry.
Nothing in v2.0.21 changes the environment-variable or experimental-flag surface, so this is a routing-and-interface release rather than a new-capability one. The direction it points at is the same split the project has been running: a broad provider layer underneath, and a desktop plus editor-protocol surface on top of the background server.
All trademarks and software referenced belong to their respective owners.
Sources#
- Provider and gateway routing: #52222, #52110, #52128, #52131, #52182
- Session view and desktop: #52207, #52210, #52311, #52233, #52316, #52231, #52217, #52309, #52230, #52204
- Core and protocol: #52286, #52364, #52368, #52137
Previous OpenCode 2 analysis: v2.0.20 (September 29, 2026)
All 4 OpenCode 2 analyses: OpenCode 2 Version Tracker · Official OpenCode 2 changelog