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
Antigravity: distinguish paid and trial Pro accounts for model-aware routing #7500
I use Antigravity accounts with paid Google AI Pro subscriptions and free Pro trials. I want OpenCodex to distinguish them and route each model request only to accounts that can actually access that model.
What prevents this today?
Both account types appear as g1-pro-tier, so the tier alone does not show whether an account is paid or on a trial. Model access may differ, and it is unclear whether routing accounts for those differences.
What should OpenCodex do?
Distinguish paid Pro subscriptions from free Pro trials when reliable account information is available.
Route requests based on each account's actual model access, rather than assuming all Pro accounts support the same models.
Skip accounts without access to the requested model and use an eligible account. If none is available, show a clear message.
If paid/trial status cannot be determined, show it as unknown while still using available model-access information.
Example usage or interface
I add one paid Pro account and one trial Pro account, then request Gemini 3.1 Pro.
If only the paid account has access, OpenCodex should route the request to that account and skip the trial account. If both have access, either can be used.
Alternatives or workarounds
Manually selecting accounts or keeping separate account pools could work, but requires maintaining model-access information myself.
Additional context
OpenCodex 2.86.0 on Linux; Antigravity / Gemini 3.1 Pro.
Checks
I searched existing issues and documentation.
This request describes a concrete OpenCodex workflow rather than merely naming a desired technology.
changed the title [-]Antigravity: Paid Pro vs Trial Pro account detection[/-][+]Antigravity: distinguish paid and trial Pro accounts for model-aware routing[/+]on Oct 22, 2026
I checked this against current dev bf4eb1209672; there is already a partial model-aware owner to reuse. src/providers/antigravity-account-roster.ts retains each account's own discovered model roster for six hours, and preferKiroModelSupport in src/oauth/generic-account-failover.ts prefers a positively listed Antigravity account, then unknown accounts. However, when every candidate explicitly omits a model, it deliberately falls back to the original candidate list. That is not the strict “none eligible” behavior requested here.
The existing plan extractor projects paidTier or currentTier to a tier label; the shared g1-pro-tier value alone does not prove paid versus trial. I will keep this open as an entitlement/routing design request rather than infer subscription status or claim current behavior already meets it. A future change should reuse the per-account roster owner, preserve unknown/stale discovery separately from a proven denial, and explicitly define the all-known-ineligible outcome.
For the paid/trial distinction, a minimal redacted example of the relevant tier/entitlement field names and values returned for each case would help establish whether the upstream supplies a reliable signal. Please omit tokens, emails, account/project IDs, request IDs and complete responses. No account or live-provider call was made here.
Corroborating Findings & Technical Root Cause Analysis for Issue #7500
We recently investigated this exact routing failure across a pool of 10 Google Antigravity accounts (mix of older paid Pro and newer Pro accounts) when requesting gemini-4-argon and Claude 5.5, and can share concrete upstream findings and trace evidence.
1. Account-level Gating Behavior in Google CCA
Calling v1internal:fetchAvailableModels reveals how Google gates models across accounts with identical g1-pro-tier plan labels:
Entitled Accounts:
List gemini-4-argon-low, gemini-4-argon-medium, gemini-4-argon-high.
List claude-opus-5-5-* and claude-sonnet-5-5-*.
Return HTTP 200 on generateContent for Argon (modelVersion: gemini-4-argon-trial).
Non-entitled Accounts:
Return gemini-4-argon-disabled.
Only list Claude 4.6 (claude-opus-4-6-thinking, claude-sonnet-4-6).
Return HTTP 404 NOT_FOUND: Antigravity invalid request: Requested entity was not found. when called with Argon.
2. Why OpenCodex Currently Fails to Route to Entitled Siblings
Tracing src/oauth/generic-account-failover.ts and src/codex/catalog/provider-models.ts revealed two related gaps:
Discovery only seeds the Active Account:
OpenCodex only executes :fetchAvailableModels for the currently active account at startup. Sibling accounts remain unprobed, so their entries in rosters map remain undefined.
listingSibling requires strict === true:
In preferKiroModelSupport:
When the active account has gemini-4-argon-disabled (accountListsModel === false), all candidate siblings evaluate to undefined (unknown). Since none are === true, listingSibling is undefined, and the request falls back to the active account.
HTTP 404 Escapes Failover:
The active account then fails upstream with HTTP 404. OpenCodex's failover handler only intercepts 429 (rate-limit / exhaustion) and 401/403 (auth), allowing the 404 to crash through to the client (OpenAI Codex / Claude Code), which causes client-side fallback (e.g., Codex switching to Grok).
3. Quota Summary Gap: User-Agent Filters the Argon Group (PR #7283 Follow-up)
While PR #7283 added support for parsing the dedicated Gemini 4 Argon group (gemini-argon-wtu-weekly) from retrieveUserQuotaSummary, in practice the dashboard never shows Argon quota.
Testing retrieveUserQuotaSummary directly against live CCA revealed why:
Under the IDE User-Agent (antigravity/ide/..., which src/providers/quota/antigravity.ts currently sends): Google only returns 2 groups (Gemini Models and Claude and GPT models). The Argon group is omitted upstream.
Under the CLI User-Agent (antigravityCliUserAgent(): antigravity/cli/...): Google returns all 3 groups, including the dedicated Gemini 4 Argon weekly limit bucket:
Switching retrieveUserQuotaSummary's probe header to antigravityCliUserAgent() (or falling back to it) allows the Argon weekly quota bucket to be received.
4. Quota Group Naming in UI (Cla vs Claude and GPT)
In the OpenCodex GUI, quota windows are currently displayed as Gem, Gem (Weekly), Cla, Cla (Weekly).
Upstream's actual second group is:
{
"displayName": "Claude and GPT models",
"description": "Models within this group: Claude Opus, Claude Sonnet, GPT-OSS"
}
As shown in companion tools like AntigravityManager, this shared bucket bounds both Claude and GPT-OSS models. Labeling it solely as Cla can be confusing when users run GPT-OSS workloads and wonder which weekly quota bucket was consumed. Adjusting the label to Claude / GPT (or 3P) matches the upstream contract.
Progress from dev: #7804 (c5c2196) requests the quota summary with the CLI fingerprint so Argon usage shows, and #7835 (343c87b) routes Antigravity models per account with union discovery, disabled-id filtering, tier-aware ranking and bounded per-account model denial. Model-access-aware routing and the clear "no eligible account" error requested here are now in place.
Still open: distinguishing paid Pro subscriptions from Pro trials. loadCodeAssist only gives paidTier/currentTier ids, and both account types report g1-pro-tier; no reliable upstream signal is known, so the status stays unknown. Leaving this issue open for that part.
The routing half of this request is on dev: #7835 routes each Antigravity model only to accounts whose own discovered roster serves it, filters -disabled ids, and returns a clear error when no account can serve the model. The paid-versus-trial label can't be built from what Google returns: loadCodeAssist reports g1-pro-tier for both, and no other field we have seen distinguishes them. Routing already uses the more reliable signal, which is each account's real model access. Closing. If you find a response field that reliably separates trial from paid accounts, please post its redacted name and value and we'll reopen.
Activity
github-actions commentedon Oct 22, 2026
Automated translation bookkeeping — detected language: English.
github-actions commentedon Oct 22, 2026
Issue reopened
The report now contains the information required by the automated check. Thanks for updating it.
[-]Antigravity: Paid Pro vs Trial Pro account detection[/-][+]Antigravity: distinguish paid and trial Pro accounts for model-aware routing[/+]Ingwannu commentedon Oct 22, 2026
I checked this against current dev
bf4eb1209672; there is already a partial model-aware owner to reuse.src/providers/antigravity-account-roster.tsretains each account's own discovered model roster for six hours, andpreferKiroModelSupportinsrc/oauth/generic-account-failover.tsprefers a positively listed Antigravity account, then unknown accounts. However, when every candidate explicitly omits a model, it deliberately falls back to the original candidate list. That is not the strict “none eligible” behavior requested here.The existing plan extractor projects
paidTierorcurrentTierto a tier label; the sharedg1-pro-tiervalue alone does not prove paid versus trial. I will keep this open as an entitlement/routing design request rather than infer subscription status or claim current behavior already meets it. A future change should reuse the per-account roster owner, preserve unknown/stale discovery separately from a proven denial, and explicitly define the all-known-ineligible outcome.For the paid/trial distinction, a minimal redacted example of the relevant tier/entitlement field names and values returned for each case would help establish whether the upstream supplies a reliable signal. Please omit tokens, emails, account/project IDs, request IDs and complete responses. No account or live-provider call was made here.
fix(antigravity): recheck the model roster on every OAuth admission
fix(antigravity): distinct refusal when the failover replacement is u…
fix(antigravity): route models only to accounts whose roster serves t…
NakhimovBot commentedon Oct 24, 2026
Corroborating Findings & Technical Root Cause Analysis for Issue #7500
We recently investigated this exact routing failure across a pool of 10 Google Antigravity accounts (mix of older paid Pro and newer Pro accounts) when requesting
gemini-4-argonand Claude 5.5, and can share concrete upstream findings and trace evidence.1. Account-level Gating Behavior in Google CCA
Calling
v1internal:fetchAvailableModelsreveals how Google gates models across accounts with identicalg1-pro-tierplan labels:gemini-4-argon-low,gemini-4-argon-medium,gemini-4-argon-high.claude-opus-5-5-*andclaude-sonnet-5-5-*.generateContentfor Argon (modelVersion: gemini-4-argon-trial).gemini-4-argon-disabled.claude-opus-4-6-thinking,claude-sonnet-4-6).HTTP 404 NOT_FOUND: Antigravity invalid request: Requested entity was not found.when called with Argon.2. Why OpenCodex Currently Fails to Route to Entitled Siblings
Tracing
src/oauth/generic-account-failover.tsandsrc/codex/catalog/provider-models.tsrevealed two related gaps:OpenCodex only executes
:fetchAvailableModelsfor the currently active account at startup. Sibling accounts remain unprobed, so their entries inrostersmap remainundefined.listingSiblingrequires strict=== true:In
preferKiroModelSupport:gemini-4-argon-disabled(accountListsModel === false), all candidate siblings evaluate toundefined(unknown). Since none are=== true,listingSiblingisundefined, and the request falls back to the active account.The active account then fails upstream with HTTP 404. OpenCodex's failover handler only intercepts
429(rate-limit / exhaustion) and401/403(auth), allowing the 404 to crash through to the client (OpenAI Codex / Claude Code), which causes client-side fallback (e.g., Codex switching to Grok).3. Quota Summary Gap: User-Agent Filters the Argon Group (PR #7283 Follow-up)
While PR #7283 added support for parsing the dedicated
Gemini 4 Argongroup (gemini-argon-wtu-weekly) fromretrieveUserQuotaSummary, in practice the dashboard never shows Argon quota.Testing
retrieveUserQuotaSummarydirectly against live CCA revealed why:antigravity/ide/..., whichsrc/providers/quota/antigravity.tscurrently sends): Google only returns 2 groups (Gemini ModelsandClaude and GPT models). The Argon group is omitted upstream.antigravityCliUserAgent():antigravity/cli/...): Google returns all 3 groups, including the dedicatedGemini 4 Argonweekly limit bucket:{ "displayName": "Gemini 4 Argon", "description": "For paid Pro plans, Argon quota is separate...", "buckets": [ { "bucketId": "gemini-argon-wtu-weekly", "displayName": "Gemini 4 Argon Weekly Limit", "window": "weekly", "remainingFraction": 0.5159 } ] }Switching
retrieveUserQuotaSummary's probe header toantigravityCliUserAgent()(or falling back to it) allows the Argon weekly quota bucket to be received.4. Quota Group Naming in UI (
ClavsClaude and GPT)In the OpenCodex GUI, quota windows are currently displayed as
Gem,Gem (Weekly),Cla,Cla (Weekly).Upstream's actual second group is:
{ "displayName": "Claude and GPT models", "description": "Models within this group: Claude Opus, Claude Sonnet, GPT-OSS" }As shown in companion tools like
AntigravityManager, this shared bucket bounds both Claude and GPT-OSS models. Labeling it solely asClacan be confusing when users run GPT-OSS workloads and wonder which weekly quota bucket was consumed. Adjusting the label toClaude / GPT(or3P) matches the upstream contract.fix(antigravity): consolidate multi-account discovery and model-denia…
lidge-jun commentedon Oct 27, 2026
Progress from
dev: #7804 (c5c2196) requests the quota summary with the CLI fingerprint so Argon usage shows, and #7835 (343c87b) routes Antigravity models per account with union discovery, disabled-id filtering, tier-aware ranking and bounded per-account model denial. Model-access-aware routing and the clear "no eligible account" error requested here are now in place.Still open: distinguishing paid Pro subscriptions from Pro trials.
loadCodeAssistonly givespaidTier/currentTierids, and both account types reportg1-pro-tier; no reliable upstream signal is known, so the status stays unknown. Leaving this issue open for that part.lidge-jun commentedon Nov 15, 2026
The routing half of this request is on
dev: #7835 routes each Antigravity model only to accounts whose own discovered roster serves it, filters-disabledids, and returns a clear error when no account can serve the model. The paid-versus-trial label can't be built from what Google returns:loadCodeAssistreportsg1-pro-tierfor both, and no other field we have seen distinguishes them. Routing already uses the more reliable signal, which is each account's real model access. Closing. If you find a response field that reliably separates trial from paid accounts, please post its redacted name and value and we'll reopen.