Skip to content

fix(antigravity): strip Claude entries from catalog (ampeco Patch 4)#2

Merged
sash merged 1 commit into
mainfrom
fix/antigravity-no-claude-leak
May 22, 2026
Merged

fix(antigravity): strip Claude entries from catalog (ampeco Patch 4)#2
sash merged 1 commit into
mainfrom
fix/antigravity-no-claude-leak

Conversation

@sash
Copy link
Copy Markdown

@sash sash commented May 22, 2026

Strip claude-opus-4-6-thinking and claude-sonnet-4-6 from antigravity catalog so Sonnet sub-agent traffic doesn't leak onto the Google Antigravity OAuth pool and exhaust its quota. See commit message for full diagnosis. After merge → tag v0.1.2-ampeco → GitHub Actions builds binary → bump ansible cliproxyapi_binary_version → deploy mm007.

Antigravity's published model catalog includes `claude-opus-4-6-thinking`
and `claude-sonnet-4-6` because Google's AI Code Assist tier resells
Claude models through `cloudcode-pa.googleapis.com`. With those entries
present, an antigravity OAuth is registered as eligible alongside the
Anthropic OAuth pool for `claude-*` selector picks.

Session-affinity then pins entire Claude Code sessions (parent + child
sub-agents like Plan / Explore / code-reviewer / sub-Skills) to the
antigravity OAuth whenever the parent request was a Gemini call. The
Antigravity Sonnet quota is much smaller than Anthropic's 5h windows
and drains within hours, returning:

  429 RESOURCE_EXHAUSTED { domain: cloudcode-pa.googleapis.com,
                           model: claude-sonnet-4-6,
                           quotaResetDelay: ~5h }

The selector logs from a live battle run on 2026-05-22 show the exact
leak path:

  14:56  model=gemini-3.5-flash-low  auth=antigravity-...json  (intended)
  15:08  model=claude-sonnet-4-6      auth=antigravity-...json  (LEAK)

Patch applies in two places:

  - `internal/registry/models/models.json` — strip Claude entries from
    the in-tree `antigravity` array so `go test ./...` and local dev
    builds see the patched shape (8 entries remain: Gemini 3.x +
    gpt-oss-120b-medium).

  - `.github/workflows/release.yaml` — add a post-refresh step that
    re-applies the strip after the upstream catalog fetch from
    `router-for-me/models`, so tagged builds preserve the patch
    indefinitely without requiring upstream changes.

Filter pattern catches any future Claude variant Google adds to the
Antigravity offering: removes entries where `id.startswith("claude-")`
OR `type == "claude"` OR `owned_by == "anthropic"`.

After deploy, claude-sonnet-4-6 requests can only route to the
`claude-Cooperator*@ampeco.global.json` OAuth files; the antigravity
OAuth becomes Gemini-only.

NB on registry tests: `TestCodexFreeModelsExcludeGPT55` is failing on
upstream main as well (the upstream catalog moved `gpt-5.5` into
`codex-free` but the test wasn't updated). The failure is pre-existing
and unrelated to this patch.

README updated with Patch 4 documentation matching the existing patch
series style.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sash sash merged commit fa25f24 into main May 22, 2026
3 of 4 checks passed
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.

1 participant