GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(oauth): support Anthropic account pause and resume by Ingwannu · Pull Request #6204 · lidge-jun/opencodex

feat(oauth): support Anthropic account pause and resume #6204

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
lidge-jun merged 12 commits into dev from fix/6013-anthropic-pause
Sep 29, 2026

Uh oh!

There was an error while loading. Please reload this page.

Merged

feat(oauth): support Anthropic account pause and resume #6204

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit Hold shift + click to select a range
4bcbf53
feat(oauth): support Anthropic account pause and resume
Ingwannu Sep 28, 2026
aea8b56
fix(oauth): preserve Anthropic pause refusals after pacing
Ingwannu Sep 28, 2026
60d1d3c
fix(oauth): retain scoped cooldown refusals after pacing
Ingwannu Sep 28, 2026
33e2cab
fix(oauth): preserve mixed-state Anthropic admission errors
Ingwannu Sep 28, 2026
9320009
test(oauth): drain failed pacing setup
Ingwannu Sep 28, 2026
132770d
fix(oauth): align native Messages account admission
Ingwannu Sep 28, 2026
41cc5de
fix(oauth): recheck Anthropic pause before auxiliary sends
lidge-jun Sep 29, 2026
e41b5fc
Merge remote-tracking branch 'origin/dev' into codex/rt6-l2e-6204
lidge-jun Sep 29, 2026
8aa3c86
docs(structure): split Anthropic account pool contract
lidge-jun Sep 29, 2026
0126cb4
fix(oauth): let quota probes survive an active-account switch
lidge-jun Sep 29, 2026
36a12fc
fix(quota): suppress switched Anthropic provider report
lidge-jun Sep 29, 2026
b8d0662
Merge remote-tracking branch 'origin/dev' into HEAD
lidge-jun Sep 29, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Prev Previous commit
Next Next commit
fix(quota): suppress switched Anthropic provider report
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@lidge-jun
lidge-jun committed Sep 29, 2026
commit 36a12fc9c789d9a4b078d0a483d1c7f2c2f35e7f

There are no files selected for viewing

7 changes: 6 additions & 1 deletion 7 src/providers/quota/vendor-probes-oauth.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { aggregateCodexPoolCapacity, CODEX_CAPACITY_MAX_QUOTA_AGE_MS, type Codex
import { asRecord, normalizePercent, normalizeResetAt, readQuotaJson, REQUEST_TIMEOUT_MS, toFiniteNumber } from "../quota-wire";
import { providerCodexAccountMode } from "../registry";
import {
accountReportCurrent,
TERMINAL_QUOTA_FAILURE,
hasQuotaRows,
providerLabel,
Expand Down Expand Up @@ -363,7 +364,11 @@ export async function fetchAnthropicQuota(provider: string): Promise<ProviderQuo
accountQuotaCache.set(probedAccountKey, { ts: Date.now(), quota });
}
}
return report(provider, "anthropic:oauth-usage", quota);
const result = report(provider, "anthropic:oauth-usage", quota);
if (result && probedAccountId) {
accountReportCurrent.set(result, () => getAccountSet("anthropic")?.activeAccountId === probedAccountId);
}
return result;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion 2 structure/providers/anthropic-account-pool.md
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ produce its scoped 429 and Retry-After, not a login error. An already-dispatched
retains a successful rotated credential without unpausing; a late failure cannot mark the
paused row for reauthentication. Token Guardian and Anthropic quota probes recheck live
pause, selection and bearer ownership after token resolution and before each usage send;
a newly paused account makes no auxiliary request. Pool-off keeps a healthy active account;
a newly paused account makes no auxiliary request. An account switch during a usage probe still seeds the probed account's quota cache but suppresses its stale provider report and reset observation. Pool-off keeps a healthy active account;
pause/prior-429 recovery uses `only-eligible`, and logs name the committed account.

> Decision record: [ADR-6013](../decisions/ADR-6013-anthropic-account-pause.md)
Expand Down
5 changes: 4 additions & 1 deletion 5 tests/providers/provider-account-quota.test.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,10 @@ describe("fetchProviderAccountQuotas", () => {
// Switch active mid-flight before Anthropic responds.
await setActiveAccount("anthropic", second!.id);
releaseUsage();
await reportPromise;
const switchedReport = await reportPromise;
expect(switchedReport.reports).toEqual([]);
expect(getCachedProviderAccountQuota("anthropic", first!.id)?.fiveHourPercent).toBe(70);
expect(getCachedProviderAccountQuota("anthropic", second!.id)).toBeNull();

// First account still owns token-first — seed must land on first, not second.
clearProviderQuotaCache();
Expand Down
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402809 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.