Skip to content

fix(auth): reconcile stale Claude OAuth quota blocks - #15

Draft
bntvllnt wants to merge 1 commit into
mainfrom
fix/claude-quota-reconcile-20261125
Draft

bntvllnt wants to merge 1 commit into
mainfrom
fix/claude-quota-reconcile-20261125

Conversation

@bntvllnt

Copy link
Copy Markdown

Claude OAuth credentials can remain blocked by a stored quota rejection after provider usage has recovered. Add an authenticated reconciliation operation and a 15-minute retry through the existing refresh workers so fresh provider headroom can restore routing.

  • Read only the fixed Anthropic OAuth usage endpoint with stored authorization; reject caller-supplied authority and stale token, registration, file, or routing observations.
  • Clear only proven quota restrictions, preserve independent model failures and forced cooldowns, and retry failed cooldown persistence without spending inference or redeeming a grant.
  • Publish real observation timestamps and complete passive usage snapshots; keep the persisted cooldown format compatible.
  • Run all quota reconciliation regressions in the existing PR workflow before the model-catalog refresh mutates source.

Validation: Go 1.27.1, Linux amd64/v1, CGO disabled, purego and trimpath: full suite passed (25,294 passing test/subtest events, 14 existing environment-dependent skips) and server compile passed. All 13 new regression tests passed. An isolated behavioral negative control kept inference blocked when reconciliation was disabled; ordinary and streamed routing, persistence/restart, stale-read fences, and automatic retry behavior passed with the fix. Independent source and focused-test review accepted the change.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant