Skip to content

tui: new sessions fail with "Insufficient account funds" on active OpenCode Go while CLI works #54244

Description

@shyamm-dev

Summary

With an active OpenCode Go subscription, new TUI sessions fail with "Insufficient account funds" / "Insufficient balance" even though the CLI succeeds with the same account and model. Go usage stays near 0%, so it is not a real usage/budget limit.

Environment

  • opencode version: 2.0.26
  • OS: Darwin 27.0.0 (darwin arm64)
  • Terminal: ghostty (TERM=xterm-256color, TERM_PROGRAM=ghostty, COLORTERM=truecolor)
  • Shell: /bin/zsh
  • Install/channel: latest
  • Active plugins: none

Reproduction

  1. Have an active OpenCode Go subscription on the workspace; opencode auth list shows OpenCode Console Personal stored.
  2. Confirm the CLI works: opencode run --model opencode-go/deepseek-v4.1-flash "Reply with exactly: OK" → prints OK.
  3. Also confirm the config default works: opencode run "Reply with exactly: OK" → prints OK.
  4. Open the TUI (opencode) and start a new session, send any prompt.
  5. The request fails with "Insufficient account funds" / "Insufficient balance".

Expected Behavior

A new TUI session should use the Go-covered model and succeed, exactly like opencode run does on the same account/model.

Actual Behavior

New TUI sessions error with "Insufficient account funds"/"Insufficient balance". Go usage does not increase (stays near 0%). Existing sessions continue to work, and the CLI works.

Additional Context

Activity

  1. opencode-agent commented on Oct 10, 2026

    @opencode-agent
    Contributor

    Thanks for the detailed report! One detail would help us tell whether this is a TUI bug or a provider mix-up.

    In the TUI, the provider decides how a model is billed. opencode/<model> (OpenCode Console / Zen) is billed from Console credits, and opencode-go/<model> is billed to your Go subscription. If a request goes through the Console provider with $0 credit, you get exactly this "Insufficient account funds" error. Also, a new TUI session doesn't always use the model from opencode.jsonc: a model you picked before for that project or agent, or a model set on the agent, takes priority over the config.

    Could you tell us:

    1. In a new TUI session, before sending, which model and provider does the prompt footer show? Is it listed under OpenCode Go or under Personal / OpenCode (Console)? A screenshot is ideal.
    2. If you open /models, choose deepseek-v4.1-flash from the OpenCode Go group and then send a prompt, does it still fail?
    3. Do you have a model set on any agent (in opencode.jsonc or an agent file), or a project-level opencode.json with a model?
    4. The full error text exactly as the TUI shows it.

    You can reply here with the details, or edit the issue. If you edit it, please also leave a comment saying you've updated it so we know you're done.

    These existing issues look closely related (most likely first), in case one of them already covers your problem:

  2. shyamm-dev commented on Oct 10, 2026

    @shyamm-dev
    Author
    1. DeepSeek V4.1 Flash Personal / OpenCode
    2. using the Opencode Go still fails.
    3. Yes DeepSeek V4.1 Flash is my default
    4. Error: Upstream request failed: Insufficient account funds
  3. opencode-agent commented on Oct 10, 2026

    @opencode-agent
    Contributor

    Thanks for the follow-up, that helps a lot.

    We can't reproduce this in our sandbox. The "Insufficient account funds" error comes from the OpenCode backend and only shows up with a real Console/Go account, which our test environment doesn't have. A maintainer with a Go account will need to look at it.

    What your answers tell us so far:

    • The footer showing DeepSeek V4.1 Flash · Personal / OpenCode means new sessions use the Console provider (opencode/deepseek-v4.1-flash). That provider is billed from Console credits, not your Go plan, so with $0 credit this error is expected for that model. It looks like a model you picked earlier for the project or agent takes priority over the model in your opencode.jsonc for new sessions. That's our reading of the code, not something we could run.
    • The part that still needs a maintainer: you say picking DeepSeek V4.1 Flash from the OpenCode Go group in the TUI also fails, while opencode run --model opencode-go/deepseek-v4.1-flash works on the same account. This may be the same backend problem reported in OpenCode Go models return "Insufficient account funds" with active subscription and 0% usage #51424, where requests from newer logins seem to be billed as "standard" instead of "go".

    If you can, it would help to check whether opencode run --model opencode/deepseek-v4.1-flash "Reply with exactly: OK" fails with the same error. That would show whether the CLI and TUI difference comes down to which provider the TUI picks.

    Related: #51424, #50611.

  4. shyamm-dev commented on Oct 10, 2026

    @shyamm-dev
    Author

    Also looks like I started getting this message when i tried using opus model which i do not have access to and switched back to the Personal / OpenCode deepseek model which worked for me before and after that every new session i open started showing this issue

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