Before submitting
Area
Usage dashboard / model breakdown (observed with OpenCode usage)
Steps to reproduce
- Use OpenCode with at least two models with substantially different API-equivalent pricing.
- Accumulate usage for both models.
- Open Usage and select Tokens.
- Compare each model's token count with its displayed Share percentage.
- Switch to Cost and compare the Share percentages.
Expected behavior
Share should correspond to the selected metric:
- Cost:
model cost / total cost
- Tokens:
model tokens / total tokens
Actual behavior
Observed OpenCode usage:
| Model |
Tokens |
Estimated cost |
gpt-5.6-sol |
~289M |
~$165.21 |
gpt-5.6-luna |
~92.7M |
~$3.53 |
| Total |
~382M |
~$168.74 |
In Tokens mode, Share displays approximately:
The actual token shares are approximately:
The displayed 97.9% / 2.1% instead matches the cost distribution (Luna: $3.53 / $168.74 ≈ 2.1%).
This suggests Share is calculated from cost even when Tokens is selected.
Impact
Token totals themselves appear correct, but the model Share column is misleading. In this example Luna accounts for roughly one quarter of tokens while Tokens mode reports only 2.1%.
Provider
OpenCode. Reproduced with gpt-5.6-sol and gpt-5.6-luna.
This may affect other providers if the Usage UI shares the same calculation path.
Suggested regression coverage
Use two model rows where token share differs significantly from cost share and assert that switching Cost ↔ Tokens recomputes Share from the selected metric.
Workaround
Calculate token share manually from the displayed token counts.
Before submitting
Area
Usage dashboard / model breakdown (observed with OpenCode usage)
Steps to reproduce
Expected behavior
Share should correspond to the selected metric:
model cost / total costmodel tokens / total tokensActual behavior
Observed OpenCode usage:
gpt-5.6-solgpt-5.6-lunaIn Tokens mode, Share displays approximately:
The actual token shares are approximately:
The displayed 97.9% / 2.1% instead matches the cost distribution (Luna: $3.53 / $168.74 ≈ 2.1%).
This suggests Share is calculated from cost even when Tokens is selected.
Impact
Token totals themselves appear correct, but the model Share column is misleading. In this example Luna accounts for roughly one quarter of tokens while Tokens mode reports only 2.1%.
Provider
OpenCode. Reproduced with
gpt-5.6-solandgpt-5.6-luna.This may affect other providers if the Usage UI shares the same calculation path.
Suggested regression coverage
Use two model rows where token share differs significantly from cost share and assert that switching Cost ↔ Tokens recomputes Share from the selected metric.
Workaround
Calculate token share manually from the displayed token counts.