Skip to content

Usage → Pricing tab is read-only: no UI to add/edit/reset custom pricing overrides #4163

Description

@liuxiaocs7

Problem

The Usage statistics surface has a Pricing tab (定价配置) that is display-only. The Runtime Host side of pricing overrides is fully built — pricing.query / pricing.mutate (upsert + delete) in HostUsagePricingCoordinator, PricingStore in @maka/storage, and the usage:pricing:list / usage:pricing:put / usage:pricing:reset IPC handlers in the Desktop main process — but none of it is reachable from the UI:

  • The preload bridge never exposes the pricing mutation channels, so the renderer cannot call them.
  • UsagePricingPanel only renders a table of existing custom overrides; it has no add / edit / reset affordance.

So the tab always shows "No pricing overrides", and a user cannot register a custom price for a model whose built-in pricing is missing or wrong — that model's cost then reads as unavailable in the summary.

Desired outcome

From the Pricing tab I can:

  • add a custom per-model price (provider + model, input/output rate, optional cache read/write rates);
  • edit an existing override;
  • reset (remove) an override so the model falls back to the built-in pricing table.

Alternatives or workarounds

None from the UI today — the only way to populate an override is to drive the IPC/store directly, which isn't user-accessible.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions