Repository navigation
Description
Summary
/api/oauth/accounts returns plan: null for anthropic and google-antigravity accounts. The source comments say upstream exposes no tier field (src/oauth/index.ts near the plan: null line, src/providers/quota/vendor-probes-oauth.ts doc comment on fetchAnthropicUsageQuota). That is true for /api/oauth/usage and the token response, but both providers return the tier on another endpoint that OpenCodex already calls.
Evidence (ocx 2.81.0, measured 2026-10-11, emails masked)
Anthropic: GET https://api.anthropic.com/api/oauth/profile (anthropic-beta: oauth-2025-04-20)
src/oauth/anthropic-identity.ts already calls this endpoint, but it keeps only account.uuid. The same body carries the tier:
| account | has_claude_max | organization.organization_type | organization.rate_limit_tier |
|---|---|---|---|
| h***t | true | claude_max | default_claude_max_20x |
| h***0 | true | claude_max | default_claude_max_20x |
| d***5 | true | claude_max | default_claude_max_20x |
| s***l | true | claude_max | default_claude_max_5x |
| a***f | true | claude_max | default_claude_max_5x |
organization fields seen: billing_type, organization_type, rate_limit_tier, seat_tier, subscription_status, subscription_created_at, has_extra_usage_enabled. Claude Code itself stores the same value as subscriptionType / rateLimitTier in its credentials.
Google Antigravity: POST https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist ({"metadata":{"ideType":"ANTIGRAVITY"}})
src/oauth/google-antigravity.ts (loadCodeAssistProject) already calls this endpoint, but it keeps only the project id. The body carries currentTier and paidTier:
| account | currentTier.id | paidTier.id / name |
|---|---|---|
| h***t | free-tier | g1-pro-tier / Google AI Pro |
| h***0 | free-tier | g1-ultra-lite-tier / Google AI Ultra |
Note that currentTier is free-tier for paid accounts; paidTier is the field that names the subscription.
Impact
Fleet capacity math (per-seat weights) cannot use plan, so tools must guess. Percentages are normalized per account (as the comments correctly say), so a Max 5x seat and a Max 20x seat look the same. In our setup the guess overstated two Max 5x seats by 4x until we pinned the measured tiers by hand.
Proposed change
- Anthropic: in
resolveAnthropicAccountIdentity(or a sibling read), also keeporganization.rate_limit_tier(and optionallyorganization_type/seat_tier) and expose it asOAuthAccountSummary.plan(for examplemax_20x,max_5x,pro). - Antigravity: in
loadCodeAssistProject, also keeppaidTier.id(fall back tocurrentTier.id) and expose it asplan. - Keep
nullwhen the read fails, so nothing is inferred from quota percentages.
The profile call is already made with the same bearer, so this needs no new request on the Anthropic side.
Activity
test(quota): route the refresh-time profile read apart from usage probes
fix(accounts): admit reset Anthropic accounts and report OAuth subscr…
lidge-jun commentedon Oct 11, 2026
Fixed on dev by #6953 (777b377): OAuthAccountSummary.plan now reports the validated Anthropic organization tier and the Antigravity paidTier/currentTier, and stays null when unknown.