Skip to content

fix(console): Usage Cost tab — all-model quota first, DeepSeek CNY demoted - #390

Merged
caigee-cmd merged 1 commit into
mainfrom
fix/usage-cost-all-models
Oct 24, 2026
Merged

caigee-cmd merged 1 commit into
mainfrom
fix/usage-cost-all-models

Conversation

@caigee-cmd

Copy link
Copy Markdown
Owner

Why

Follow-up to merged #387 (Usage Cost from external #336). The Cost experience still felt DeepSeek-centric (CNY hero KPI, list-price stacked chart, cost columns dominating the by-model table). User ask: make it all-models, with subscription credits + tokens as the primary visual.

Do not merge until approved.

What changed

Primary (every model equally)

  • Hero KPIs: quota used, total tokens, requests, cache hit — no CNY card
  • Chart: stacked credits (default) or tokens by model; series now includes per_model_credits / per_model_tokens for priced and unpriced models
  • By-model table: requests / token split / tokens / credits (cost columns removed from primary)
  • Model sort: credits → tokens → cost (so high-quota non-DeepSeek models are not buried)
  • Tab/lead copy reframed as Quota / 额度 — not “looks made for DeepSeek”

Demoted (optional, collapsed by default)

  • Accordion: DeepSeek list-price estimate
    • Optional CNY trend chart (priced models only)
    • Peak/off-peak + equiv. cost table
    • Official DeepSeek price catalog + notes
  • Backend keeps DeepSeek price math; per_model CNY series still available for this section

Out of scope (untouched)

Test plan

  • go test ./internal/accounts/ ./internal/console/ ./internal/store/
  • frontend npm run lint + npm run sync (tsc + vite + embed)
  • Manual: Usage → Quota tab — hero/chart/table treat all models the same; open accordion for DeepSeek CNY only when needed

Screenshots

None captured in this agent run (no live console session).

Primary KPIs/chart/table use subscription credits and tokens for every
model. DeepSeek list-price CNY stays available as a collapsed optional
estimate (chart, priced rows, price catalog) so it no longer dominates.
@caigee-cmd
caigee-cmd merged commit 7716d48 into main Oct 24, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant