apache / apache/maka

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

Open
#4,163 1 comment 0 reactions 1 assignee Claimed by @liuxiaocs7 View on GitHub
enhancement
Dominant language
TypeScript
Stars
5.4k
Forks
502
Avg merge
1d 2h
Merged PRs (30d)
715

Description

## 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.