anomalyco / anomalyco/opencode

TUI sidebar shows misleading $0.00 spent for models without pricing

Open
#39,869 1 comment 1 reaction 1 assignee View on GitHub

@kommander is already working on this.

Since Jul 31, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

The opencode TUI sidebar Context section displays $0.00 spent for a session whose model has no pricing information, even though the true cost cannot be derived. This is misleading because $0.00 reads as free, when in reality the model simply has no cost entry (e.g. a custom model added to opencode.json without a cost field).

Current behavior
Context
12,345 tokens
42% used
$0.00 spent
Expected behavior

When the session model has no pricing, show N/A spent instead of a misleading $0.00 spent:

Context
12,345 tokens
42% used
N/A spent
Related

The runtime cost tracking problem for custom providers is tracked separately in #17223. This issue is about the display only.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.