fix(antigravity): strip Claude entries from catalog (ampeco Patch 4)#2
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.