Skip to content

fix(antigravity): update CLI fallback to 1.3.4, add Argon/Claude 5.5 models, and preserve weekly quota keys - #16559

Merged
diegosouzapw merged 1 commit into
cheaper-inference:release/v3.8.52from
artickc:fix/antigravity-cli-1.3.4-models-and-weekly-quotas
Oct 16, 2026
Merged

diegosouzapw merged 1 commit into
cheaper-inference:release/v3.8.52from
artickc:fix/antigravity-cli-1.3.4-models-and-weekly-quotas

Conversation

@artickc

@artickc artickc commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Update ANTIGRAVITY_CLI_FALLBACK_VERSION to 1.3.4: The GitHub release endpoint (google-antigravity/antigravity-cli) is not a public repository and always falls back to ANTIGRAVITY_CLI_FALLBACK_VERSION. Updating the floor from 1.1.5 to 1.3.4 unlocks the newly gated models returned by Cloud Code :fetchAvailableModels.
  • Add Gemini 4 Argon & Claude 5.5 tiers to ANTIGRAVITY_SHARED_MODELS: Adds gemini-4-argon-high, gemini-4-argon-medium, gemini-4-argon-low, claude-opus-5-5-high, claude-opus-5-5-medium, claude-opus-5-5-low, claude-sonnet-5-5-high, claude-sonnet-5-5-medium, and claude-sonnet-5-5-low to the shared antigravity / agy public catalog.
  • Preserve *_weekly quota keys in quotaNormalize while excluding them from model discovery:
    • getAntigravityUsage merges gemini_weekly and claude_gpt_weekly into usage.quotas, but isUsageQuotaKeyAllowed / normalizeUsageQuotaKey only whitelisted "credits" and "models", causing sanitizeUsageQuotasForProvider("antigravity", usage) to drop gemini_weekly and claude_gpt_weekly.
    • Meanwhile, isDiscoverableAgyModelId and isDiscoverableAntigravityModelId did not exclude *_weekly (or chat_*), allowing gemini_weekly and claude_gpt_weekly from cached quota keys to leak into model discovery.
  • Surface sanitized error details on OAuth POST /api/oauth/[provider]/[action] failures: Matches the GET handler by returning sanitizeErrorMessage(...) instead of a generic "Internal server error" on token-exchange exceptions.

Test Plan

  • Verified antigravity-version.test.ts, antigravity-retired-public-models.test.ts, antigravity-model-aliases.test.ts, antigravity-per-model-output-cap.test.ts, antigravity-weekly-quota-4017.test.ts, agy-antigravity-shared-catalog-12724.test.ts, agy-gemini-3696-tier-passthrough.test.ts, agy-provider.test.ts, provider-limits-sanitize-scope-3821.test.ts, and providerlimits-quotanormalize-split.test.ts (86/86 passing).

@diegosouzapw
diegosouzapw force-pushed the fix/antigravity-cli-1.3.4-models-and-weekly-quotas branch from 64db542 to b46dcfb Compare October 16, 2026 16:22
@diegosouzapw
diegosouzapw changed the base branch from main to release/v3.8.52 October 16, 2026 16:23
@diegosouzapw
diegosouzapw merged commit 6f78b1c into cheaper-inference:release/v3.8.52 Oct 16, 2026
24 of 39 checks passed
Witroch4 pushed a commit to Witroch4/OmniRoute that referenced this pull request Oct 24, 2026
…the wire

agy/antigravity connections presented a fingerprint no official client uses:
`Antigravity/4.2.0 (X11; Linux x86_64) Chrome/142 Electron/39` (4.2.0 came from
a third-party tool, Antigravity-Manager; the IDE never shipped it) plus
x-client-name, x-client-version, x-machine-id and x-vscode-sessionid on every
content request.

Ground truth (2026-10-24): the official `agy` 1.4.7 was run behind a local TLS
capture proxy that answered every request itself, so nothing reached Google.
All six daily-cloudcode-pa v1internal calls observed carried exactly:

  User-Agent: antigravity/cli/1.4.7 (aidev_client; os_type=linux; arch=amd64; cl=1006008713; auth_method=consumer)
  Authorization, Content-Type: application/json, Accept-Encoding: gzip

with loadCodeAssist metadata {"ideType":"ANTIGRAVITY"}; its Go OAuth calls use
Go-http-client/1.1. Neither the CLI nor the installed IDE 2.5.5 (language
server binary and JS) contains x-client-name/x-machine-id/x-vscode-sessionid
or an Electron UA. Both binaries embed the OAuth client id these connections
use, so the CLI identity matches their tokens. Upstream's cheaper-inference#8013/cheaper-inference#11969/cheaper-inference#16559
format (darwin/arm64 pinned, no cl=, numeric loadCodeAssist enums) also differs
from the real client, so it is deliberately not ported.

Changes:
- open-sse/config/antigravityCliClient.ts (leaf): the CLI build (version +
  changelist pinned as a pair; ANTIGRAVITY_CLI_VERSION + ANTIGRAVITY_CLI_CHANGELIST
  override only together), real host os_type/arch, Cloud Code headers in wire
  order, OAuth token headers, loadCodeAssist metadata.
- Client profile "cli" (legacy stored "harness"/"sdk" read as cli) is now the
  default; "ide" stays as an opt-in legacy profile with its version floor fixed
  to the IDE's real ideVersion 2.5.5 (was 4.2.0).
- Every outbound path uses it: executor buildHeaders + per-attempt profile
  headers (rebuilt to exactly the CLI set), project bootstrap (no longer
  hard-defaults to "ide"; the executor passes the connection profile), token
  refresh (executor + shared refreshGoogleToken for agy/antigravity), OAuth code
  exchange + userinfo, model discovery, quota probes (loadCodeAssist now on the
  daily host the CLI uses, not the sandbox), image generation, registry headers.
- Docs/.env.example: new vars documented; ANTIGRAVITY_USER_AGENT marked as not
  applied by the Antigravity executor (the example had it active).

Known gaps (not header-level): undici fetch still adds accept-language and
sec-fetch-mode, and TLS/HTTP version (HTTP/1.1 vs the CLI's HTTP/2) differ.
The streamGenerateContent request itself was not captured (the CLI needs a
real model catalog to get there); it is inferred from the six uniform calls.

Tests: antigravity-cli-client (new) + 577 across 75 Antigravity/OAuth/usage/
discovery/image suites; translate-path golden regenerated (only the 6
Antigravity UA lines changed; os/arch normalized).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
diegosouzapw added a commit to PranavD2905/OmniRoute that referenced this pull request Oct 29, 2026
Resolve the catalog conflicts hunk by hunk: keep freebuff in the OAuth device-code lists next to codebuddy-intl/workbuddy, drop the API-key gateways entry, and carry the cheaper-inference#15058 official-client-only risk notice and freeNote onto the OAuth catalog entry. Align the cheaper-inference#15058 risk-notice test to look freebuff up in OAUTH_PROVIDERS, the oauth characterization snapshot to include FREEBUFF_CONFIG and the freebuff device_code flow, the flow test to the sanitized 500 detail the route returns since cheaper-inference#16559, and the APIKEY count to 252; regenerate the provider reference.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
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.

2 participants