You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2091953
Browse filesBrowse the repository at this point in the historyBrowse files
fix(billing): build the mid-run usage card from the admitted payer and model the empty new-turn 402 (#8502)
* fix(billing): build the mid-run usage card from the admitted payer and model the empty new-turn 402
A direct-v1 run's mid-run verdict reads the payer saved in its account
decision, but the upgrade card was resolved from the actor's current
subscription, so a payer/actor mismatch picked the wrong action and copy.
The exceeded account verdict now carries the payer and subscription it
already read, and update-cost and the validate continuation pass it to
resolveUsageUpgradePayload instead of a second lookup.
The validate contract declared every 402 as a JSON refusal, while a new
turn's 402 has no body; the 402 schema now allows the empty body. The
wire is unchanged.
* fix(billing): drop the unreachable card-read deadline from the usage upgrade card
Every exceeded verdict that reaches update-cost now carries its payer, so the
deadline-bounded actor subscription lookup could no longer run. Remove the
parameter, its call-site argument, the stale TSDoc, and the test that passed
without exercising it.
* test(copilot): pin the new-turn usage refusal to an empty 402
"You've reached the usage limit your organization set for you this billing period. Only an organization owner or admin can raise it — please ask them to continue."
20
17
18
+
/**
19
+
* The payer a run is billed to, as the upgrade card needs it: its billing entity and its
20
+
* subscription's plan. An attribution snapshot is one; a direct-v1 run's mid-run verdict carries one.
0 commit comments