anomalyco / anomalyco/opencode

[FEATURE]: Include Token Pricing (Input/Output Cost) in GUI Model Selector Metadata

Open
#39,047 0 comments 0 reactions 1 assignee View on GitHub

@Brendonovich is already working on this.

Since Jul 27, 2026.

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

Description

Feature hasn't been suggested before.
  • I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Verification
  • I have verified this feature hasn't been suggested before.
Description
What

Introduce real-time token pricing metadata (cost per 1 million tokens for both input and output) directly into the hover/details card within the GUI Model Selector layout.

Why this fits OpenCode

The selector currently focuses entirely on context lengths and reasoning capabilities, but it completely hides token pricing. That leads to accidental cost spikes whenever someone flips to a heavy reasoning model or dumps a massive file into context.

Checking pricing shouldn't require leaving the app or pulling up external docs mid-task. Putting input and output rates right next to context limits fixes that feedback loop and lets us make smart choices before hitting enter. This becomes increasingly relevant now that the newer models like Kimi K3 have a bigger price variation when compared to their 'previous counterparts' like GLM 5.2 etc.

Image
Suggested Implementation

Modify the GUI model metadata overlay component to include two distinct, human-readable lines appended immediately below the Context row:

Model         GLM-5.2
Provider      OpenCode Go
Inputs        text
Reasoning     Allows reasoning
Context       1,000,000

Input Cost    \$X.XX / 1M tokens
Output Cost   \$X.XX / 1M tokens

For custom or local providers (e.g., Ollama / LM Studio), these fields should cleanly fall back to $0.00 / Free or omit the lines conditionally based on the provider config schema.

Plugins

NA

OpenCode version

Version 1.18.4 (1.18.4)

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.