Skip to content

Antigravity: distinguish paid and trial Pro accounts for model-aware routing #7500

Closed

Description

@youngman07

Area

Proxy and routing

What are you trying to accomplish?

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.
  • I removed secrets and personal data.

Activity

  1. added
    bug
    on Oct 22, 2026
  2. github-actions commented on Oct 22, 2026

    @github-actions
    Contributor

    Automated translation bookkeeping — detected language: English.

  3. added
    catalog
    on Oct 22, 2026
  4. github-actions commented on Oct 22, 2026

    @github-actions
    Contributor

    Issue reopened

    The report now contains the information required by the automated check. Thanks for updating it.

  5. 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
  6. added
    enhancement
    proxy
    on Oct 22, 2026
  7. Ingwannu commented on Oct 22, 2026

    @Ingwannu
    Owner

    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.

  8. NakhimovBot commented on Oct 24, 2026

    @NakhimovBot

    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:

    1. 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.
    2. listingSibling requires strict === true:
      In preferKiroModelSupport:
      const listingSibling = activeLacks
        ? modelEligible.find(id => id !== active && accountListsModel(providerName, id, requestedModelId!) === true)
        : undefined;
      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.
    3. 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:
      {
        "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 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.

  9. lidge-jun commented on Oct 27, 2026

    @lidge-jun
    Owner

    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.

  10. lidge-jun commented on Nov 15, 2026

    @lidge-jun
    Owner

    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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcatalogenhancementproxy

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions