Repository navigation
Releases
Releases · nesyeklaf/opencode-claude-subscription
v0.1.4
Fixed
- Token requests (login and refresh) now mirror Claude Code's own: axios
User-AgentandAcceptheaders, the same field order, andscopeon refresh. Anthropic answers some clients' token requests with 429 "Rate limited" regardless of volume; with Claude Code's request shape the same endpoint processes them. - Token requests retry rate limits and server errors up to three rounds over both token hosts (1 s and 2 s apart, honoring
Retry-After), within 30 s for logins and 10 s for refreshes. Errors name each host's status.
v0.1.3
Fixed
- Login and refresh use
claude.ai/v1/oauth/tokenfirst and fall back toplatform.claude.comon rate limits or server errors. During testingplatform.claude.comrate limited token requests for over an hour, so logins failed after the browser step.
v0.1.2
Added
- Anthropic models show zero per-token cost while a subscription login is active.
- A 401 on a subscription request explains the next step (log in again, or run
claude).
Fixed
- Starting a browser login closes the callback server of an abandoned attempt, so a retry no longer fails with "Port 53692 is in use" for up to ten minutes.
- An abandoned browser login no longer leaves an unhandled promise rejection behind.
- A failed token refresh keeps the current credential and retries after 30 seconds instead of surfacing as an unexpected OpenCode error.
- The Claude Code login re-reads the stored token on refresh even when it is expired, instead of failing the request.
- The Claude Code login no longer opens a web page; it shows the credential source.
/v1/messages/count_tokensrequests are shaped like/v1/messages.
Changed
- README and SECURITY.md describe verified models and where tokens are sent more precisely.
v0.1.1
Added
- README with quick start, comparison, request flow diagram, FAQ and compatibility table.
- CI (typecheck, offline tests, build, Bun load check) and a tag-driven npm release with provenance.
- Issue templates for blocked requests, compatibility reports and bugs; contributing and security policies.
v0.1.0
Added
- Login methods for the OpenCode v2
anthropicintegration: browser (PKCE), paste code, and read-only reuse of the Claude Code login. - Request shaping for subscription tokens: Claude Code identity block, headers and betas; Claude Code tool names and
mcp__opencode__*aliases, translated back in streamed and JSON responses. - Built-in rename of OpenCode's "Workspace root folder:" env line, which Anthropic classified as third-party usage.
- Opt-in
relocateSystem,billingHeader,toolAliases,systemReplacementsanddebugLogoptions.