Files
zeekayandHanzo Dev fdfe4d5439 plan: a paid plan past its usage waits or buys credits, and is never handed another model
A paid plan whose included usage was used was answered by the free model on a
200 on any client while the paid lane was on, API keys included, and a plan
with no room for a call on the paid lane was handed the free model the same
way. Neither is what the owner asked: paid plans wait for their usage to
reopen or buy usage credits, and bought credits pay the model asked for.

- limitReached: plan_allowance_used, model_cap and paid_lane_full are 429,
  like usage_cap_exceeded and free_plan_cap. Each says both ways on, in the
  headers (Retry-After, X-Hanzo-Usage-Resets, X-Hanzo-Topup-Url,
  X-Hanzo-Usage-Reason) and in the body (resets_at, topup_url, the wait and
  topup actions, a sentence naming the reset and the page). A model no plan
  or cash pays for stays 402 paid_plan_required with the top-up page.
- fallback: only the free plan's conversation in a signed-in app
  (paid_plan_required, or an empty wallet with no paid plan behind it) is
  answered by the free model, labelled by X-Hanzo-Fallback and
  X-Hanzo-Usage: limited. Never a paid plan, never an API key or a delegated
  token, whatever header it sends; X-Hanzo-Fallback: allow is gone. A capped
  model's Hanzo fallback is offered as a switch, never made for the caller.
- A plan with no room for a call asks the host what pays past the plan
  (LimitAsk.Past, pastPlan): the payer's own cash serves the asked model on
  the paid lane and the plan's grant is given back; otherwise planFull
  answers 429, paid_lane_full when the plan's calls in flight hold its room
  (controllers.Busy, Retry-After 10s), else the host's refusal past the plan.
- Seat clears the lane reason a re-seat no longer has.

Cash payers have no ceiling on calls in flight (3f847cd3, v1.833.334);
TestACashPayerHasNoCeilingOnCallsInFlight seats fifty at once.


Co-authored-by: Hanzo Dev <[email protected]>
2026-10-09 17:04:17 -07:00
..