anomalyco / anomalyco/opencode

Cost display severely underestimates real provider billing (Nebius Token Factory / MiniMax-M3 example)

Open
#40,835 1 comment 1 reaction 1 assignee View on GitHub

@MrMushrooooom is already working on this.

Since Aug 6, 2026.

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

Description

Description

OpenCode’s cost display is significantly inaccurate when using external providers (in this case Nebius Token Factory).
While OpenCode showed very low costs (around $0.50 – $0.75), the actual bill from the provider was $18.14 for the same usage period.
This creates a serious risk of unexpected charges for users, especially when using models with large context windows and agentic workflows.
What happened

I was using MiniMax-M3 (via Nebius Token Factory) as the main model in OpenCode.
OpenCode’s UI consistently showed costs in the range of $0.50 – $0.75.
After checking the Nebius Token Factory billing dashboard, the real cost was $18.14.
Almost the entire amount came from input tokens:
MiniMax-M3-NVFP4 Input: 58.92 million tokens → $17.67
Output tokens were negligible (~0.15M tokens).

Why this is problematic

Users rely on the cost indicator in the UI to control spending.
The displayed cost appears to be only a rough session estimate and does not reflect real provider billing.
With large-context models + multi-turn agent sessions, input tokens can explode very quickly, but OpenCode does not warn about this.
This mismatch can easily lead to unexpected charges (as happened to me).

Expected behavior

The cost shown in OpenCode should be much closer to the actual provider billing, or
There should be a clear warning that the displayed cost is only an approximate session estimate and may differ significantly from the real invoice.
Ideally, OpenCode should also show a more accurate cumulative cost when possible (or at least a stronger disclaimer).

Actual behavior

OpenCode showed ~$0.50–$0.75
Real Nebius bill: $18.14
Difference is roughly 25–35x

Plugins

None

OpenCode version

1.18.14

Steps to reproduce
  1. Connect Nebius Token Factory as a provider in OpenCode and select MiniMax-M3 as the model.
  2. Start an agentic coding session with a relatively large context (multiple files + multi-turn conversation).
  3. Observe the cost indicator in the OpenCode UI (it showed approximately $0.50 – $0.75).
  4. Check the actual billing in the Nebius Token Factory dashboard for the same period.
  5. The real cost was $18.14, almost entirely from ~58.92 million input tokens of MiniMax-M3.
Screenshot and/or share link
Image Image
Operating System

Windows 11

Terminal

Windows Terminal

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.