Skip to content

v1.21.0

Choose a tag to compare

@github-actions github-actions released this 28 Aug 15:17
· 150 commits to main since this release

What's changed

Stable account identity and quota state

Quota, profile, refresh-backoff, Prime-lineage, and sticky-routing state now follow the Claude account rather than a rotating OAuth access token. OpenCode resolves the main account through Claude Code bootstrap, coalesces concurrent identity lookups for the same credential, and rejects stale requests when credentials genuinely change during resolution. Cross-process quota-error clears use generation and observation-time fences so an older writer cannot restore a restriction that another process already cleared.

Optional host-local quota feed

OpenCode can now publish sanitized response-header quota observations for another local CortexKit process without an additional call to Anthropic's usage endpoint. Enable it in anthropic-auth.json and restart OpenCode:

{
  "quotaHeaderFeed": {
    "enabled": true
  }
}

The feed writes owner-only, three-minute lease files under the system temporary directory. It includes only allowlisted quota-window values and opaque account metadata; it excludes credentials, token hashes, raw headers, request bodies, model IDs, and errors.

Reliability fixes

  • Main OAuth refreshes are coalesced across OpenCode project plugin instances. A sticky request that receives a 401 can adopt a concurrently rotated valid credential instead of starting another refresh.
  • Response-header quota harvesting now preserves poll-owned scoped windows, extra-usage data, and binding metadata across token rotation. The regression test exercises the actual plugin fetch and persistence path.
  • Pi replays signed thinking only for the same Anthropic API and model, preserves visible foreign reasoning as ordinary text, and round-trips Anthropic redacted_thinking blocks.
  • The OpenCode entrypoint now exports only the plugin factory, preventing the host from invoking internal request-policy helpers as plugins.

Dependencies

  • Updated @opentui/core and @opentui/solid together to 0.5.7.
  • Updated @tsconfig/bun to 1.0.11.

Thanks to @iceteaSA for contributing stable account identity and the host-local quota feed.