Skip to content

Cost shows "unknown" on Concentrate — and it is not the only one: provider billing/pricing coverage is incomplete and nothing guards it #5976

Description

@Hmbown

Founder live-report, 2026-09-07: a Concentrate route shows cost: unknown in the metrics strip even though Concentrate is a cataloged, routable provider with models, context sizes, and capabilities in the picker. "It should know this." And the founder is right that Concentrate is probably not the only one.

Mechanism (traced, not guessed)

  1. route_billing.rs classify() has explicit billing arms for only a minority of providers (locals, Codex/OpenCode subscriptions, StepFun, Z.ai, XiaomiMimo, Moonshot, MiniMax, Xai, Anthropic, Custom). Everything else falls to the _ catch-all → endpoint_shaped_payg_billing.
  2. That consults pricing::endpoint_metering_for_billing_surface, which recognizes exactly three money surfaces (StepFun, Z.ai, Moonshot PAYG). Anything else → EndpointMetering::Unknown → the UI's honest but useless cost: unknown.
  3. pricing.rs does carry price rows for some catch-all providers (OpenRouter, NvidiaNIM, Orcarouter, Arcee, Fireworks…), and zero rows for Concentrate. So coverage is provider-by-provider luck: 49 ProviderKind variants ship, each needing (a) a classify decision AND (b) price data, and nothing requires either to exist when the provider is onboarded.

The fail-closed intent is right (#4318: never invent metered dollars from a provider name — that rule must survive). The root issue is that provider onboarding is not atomic: the catalog can gain a fully routable provider whose billing classification and price data simply don't exist, and the only signal is a bare "unknown" in the UI.

What to do (root fix, no hacks)

  1. Audit: walk every ProviderKind variant × its routes through billing_for_route + the pricing tables and produce the actual list of what presents unknown today. Put the table in this issue.
  2. Data: for each gap, add the honest entry — metered price rows where the provider is PAYG, a subscription classification where it is plan-backed, Local where it is local. Where a provider genuinely publishes nothing usable, it stays Unknown — but then see 4.
  3. Guard: add a catalog-completeness test (or CI script) that fails when a routable provider/model family has no billing classification or no price coverage. Onboarding a provider without its billing story should be a compile/CI error, not a founder surprise.
  4. UI honesty: when cost is Unknown, say why (no published prices vs. plan endpoint vs. unclassified custom route) — the receipts pattern from feat(tui): /mcp leads with need-login servers and a failed refresh keeps the endpoint's receipt #5971 is the precedent. "Unknown" with a reason is actionable; bare "unknown" reads as broken.

Related but separate: the tok/s math has its own suspected denominator bug — filed separately.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    • Status
      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions