Skip to content

Go endpoint bills Zen balance and triggers auto-reload after Go subscription ends #53364

Closed

Description

@debojyoti-dev

Description

After an OpenCode Go subscription ends, requests to the Go endpoint (/zen/go/v1/*) are billed against the Zen balance, and auto-reload can then charge the card.

In validateBilling (packages/console/app/src/routes/zen/util/handler.ts), the Go branch only runs while billing.lite and the lite row exist. Billing.unsubscribeLite clears both when the subscription is deleted, so the request falls through to the pay-as-you-go branch and returns "balance". reload() then tops up the card whenever the balance drops below the trigger.

The Go docs say Go falls back to the Zen balance only when Use balance is enabled. An active subscriber with Use balance off gets a limit error instead of being billed, so a cancelled user currently has less protection than a paying one.

Expected: once Go has ended, the Go endpoint rejects paid requests with a clear "Go subscription required" error instead of billing the balance.

Plugins

None

OpenCode version

N/A (console / Zen billing, legacy non-migrated workspace)

Steps to reproduce

  1. Workspace with Zen balance > 0 and auto-reload enabled, subscribed to OpenCode Go (Use balance off).
  2. Cancel Go; wait for customer.subscription.deleted.
  3. Keep using the opencode-go provider with the same API key.
  4. Requests succeed, usage is deducted from the Zen balance, and auto-reload charges the card when the balance falls below the trigger.

Screenshot and/or share link

N/A, found by reading the code.

Operating System

N/A

Terminal

N/A

Activity

  1. neriousy commented on Oct 21, 2026

    @neriousy
    Member

    Thanks for the detailed trace. That was accurate for the old billing code, which has since been replaced in the console migration. In the current version, Go models require an active Go subscription even when you have Zen balance. Once a subscription ends, Go requests are rejected rather than charged to your balance. Credits are only used for Go models if you've turned on Use credits when a Go limit is reached, and only after your Go usage limit is reached. If you were charged for Go requests after your subscription ended, email help@anoma.ly with your workspace ID and we'll refund 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