Skip to content

go/v1/usage returns 403 EntitlementError for an active Go subscription #49020

Closed as not planned

Description

@ripiox

Describe the bug

The OpenCode Go usage endpoint returns 403 for a key that is an active OpenCode Go subscription, so usage meters (e.g. the ai-usagebar Omarchy plugin) can't report usage.

Reproduction

curl -s -H "Authorization: Bearer $OPENCODE_GO_KEY" -H "Accept: application/json" \
  https://opencode.ai/zen/go/v1/usage

Response:

{"type":"error","error":{"type":"EntitlementError","message":"OpenCode Go subscription required."}}

The key is a valid Go subscription. The same key:

  • GET https://opencode.ai/zen/go/v1/models → 200, 37 models including deepseek-v4-pro (and inference works with it).
  • GET https://opencode.ai/zen/v1/models → 200.

Root cause (from packages/console/app/src/routes/zen/go/v1/usage.ts)

After the key authenticates (it resolves through KeyTable → UserTable → WorkspaceTable → BillingTable; otherwise the endpoint would return 401), the handler queries LiteTable for workspaceID + userID. When that row is absent it returns the 403 EntitlementError. So subscription/billing exists, but no LiteTable usage row is linked to this key's workspace/user — a server-side data inconsistency for this account.

Environment

  • opencode CLI with the OpenCode Go provider (deepseek-v4-pro)
  • ai-usagebar plugin hitting the documented GET /zen/go/v1/usage endpoint

Expected

200 with usage.rolling / usage.weekly / usage.monthly for an active Go subscription.

Activity

  1. neriousy commented on Oct 21, 2026

    @neriousy
    Member

    Thanks for reporting this. Go subscriptions and usage were moved to the new console and backfilled since this was reported, and /zen/go/v1/usage now only returns 403 when the workspace has no active Go subscription, so this is most likely fixed. If you still get a 403, create a new key under Account → Personal API keys and try again.

    Closing this because there's been no activity for a while, and it may already be resolved. If you still need help, email help@anoma.ly or comment here and we'll reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions