Skip to content

OpenCode Go: deepseek-v4.1-flash returns 402 insufficient_user_quota from OrcaRouter while Go quota is healthy #49936

Closed

Description

@zfei2080

Description

deepseek-v4.1-flash via OpenCode Go returns HTTP 402 insufficient_user_quota from an OrcaRouter upstream, while the OpenCode Go account quota is healthy and other Go models work with the same API key/session.

This is the same September wave reported in #37231 (see the 2026-09-19 comment from @hyuri) and #49416.

Steps to reproduce

  1. Call OpenCode Go Chat Completions with deepseek-v4.1-flash:
curl https://opencode.ai/zen/go/v1/chat/completions \
  -H "Authorization: Bearer $OPENCODE_GO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "x-opencode-session: <stable-uuid>" \
  -d '{"model":"deepseek-v4.1-flash","messages":[{"role":"user","content":"ping"}],"max_tokens":16,"stream":false,"reasoning_effort":"max"}'

Response: HTTP 402

{"error":{"param":"","type":"insufficient_quota","message":"Upstream request failed: [insufficient_user_quota] You're out of credits — this request needs $0.000076. Add credits to keep going: https://www.orcarouter.ai/console/billing?ref=err_credit_gate#add-credits (request id: 202609190910094345896158268d9d6KTOPRUVn)"}}
  1. Check OpenCode Go usage with the same key:
curl https://opencode.ai/zen/go/v1/usage \
  -H "Authorization: Bearer $OPENCODE_GO_API_KEY"

Result: HTTP 200, rolling: 8%, weekly: 52%, monthly: 26% — so the Go account itself is not out of quota.

  1. Repeat the same request with other Go models using the same key/session:
Model Result
deepseek-v4-flash 200
deepseek-v4-pro 200
glm-5.3 200
kimi-k3 200
deepseek-v4.1-flash 402 OrcaRouter insufficient_user_quota

Expected behavior

deepseek-v4.1-flash should either:

  • be routed to an OrcaRouter upstream that has credits, or
  • fail over to another healthy upstream for the same model, or
  • return a clear Go-side error rather than an upstream billing error from a provider account the user does not control.

Screenshot and/or share link

Additional request IDs seen through Codex/CC Switch:

  • 202609190906131118841918268d9d6FhC6V16u
  • 202609190906121880800248268d9d6CUDOXaQW
  • 202609190904513598759728268d9d6Glic6pO9

Operating System

Windows 11

Terminal

PowerShell 7 / Codex via CC Switch 3.20.3 (direct OpenCode Go API calls; not using the OpenCode CLI)

Related

Activity

  1. fanchw commented on Sep 19, 2026

    @fanchw

    Same wave here — reproducing from a third-party client (omp/oh-my-pi 18.2.6, provider opencode-go, model deepseek-v4.1-flash, macOS) with a healthy Go quota, in the same window as your report (09:06Z–09:24Z, 8 consecutive 402s).

    GET /v1/usage → rolling 6% / weekly 2% / monthly 1%, status: ok.

    Two data points that might help localize this:

    1. It looks session/route-scoped rather than model-scoped: with freshly generated x-opencode-session values, the same model returned 200 from the same machine and same key minutes apart (09:22Z–09:23Z), including with "reasoning_effort":"max". A long-lived session in the same window kept getting the same 402 on every retry. Requests with no x-opencode-session still get the expected 400 MissingSessionID.
    2. The relayed amount varies per request ($0.02 in other reports, $0.05 here), so it reads as the upstream account's balance, not the caller's Go quota.

    Starting a new session may be a usable workaround in the meantime.

    Happy to provide request IDs to the maintainers privately if that helps.

  2. xinian5216 commented on Sep 19, 2026

    @xinian5216

    I can reproduce the same issue today with deepseek-v4.1-flash via OpenCode Go.

    My OpenCode Go quota is still healthy:

    • 5-hour usage: 14.3%
    • Weekly usage: 42.1%
    • Monthly usage: 61.2%

    GLM-5.3 Flash works normally under the same OpenCode Go subscription/session.

    However, deepseek-v4.1-flash remained stuck on Thinking for a long time, and Stop/Abort did not respond immediately. Eventually it returned:

    Error from provider (Console Go): Upstream request failed:
    [insufficient_user_quota] You're out of credits — this request needs $0.05.
    Add credits to keep going:
    https://www.orcarouter.ai/console/billing?ref=err_credit_gate#add-credits
    
    request id:
    202609190936037680844508268d9d61pkyhO7f
    
    There also seem to be related historical reports such as #27595 / #27598, although my current issue is specifically with deepseek-v4.1-flash returning OrcaRouter insufficient_user_quota while my Go quota is still available.
    
  3. zfei2080 commented on Sep 19, 2026

    @zfei2080
    Author

    Update 2026-09-19: the same deepseek-v4.1-flash request/key/session started returning 200 again after roughly an hour, with no client-side changes.

    Success response ID: 00f43eb9-0605-4934-adc8-b703f9bffc95

    OpenCode Go usage at recovery: rolling 10%, weekly 53%, monthly 26%.

    This looks like a transient upstream routing/quota failure on the OrcaRouter path rather than a permanent fix. Other Go models remained 200 throughout. Please keep this issue open until the upstream health check/failover behavior is fixed and there is a root-cause update.

  4. AClon314 commented on Sep 19, 2026

    @AClon314

    In pi, I use /compress to start a new session with new context window. That works for me

  5. neriousy commented on Oct 21, 2026

    @neriousy
    Member

    Thanks for the report, and sorry for the disruption. This was a temporary problem with the hosted service or an upstream model provider, and it has since recovered. You can see live status and past incidents at https://status.opencode.ai. If you still see this now, please open a new issue with the time (with timezone), model, and request ID from the console logs.

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

Metadata

Metadata

Assignees

No one assigned

    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