Repository navigation
Antigravity CLI: gateway legs reach models agy lists only through its model gateway - #95
Merged
Merged
Conversation
… model gateway On the Gemini API-key route agy validates --model against a built-in list, which lags Google's: a newer model (Gemini 4 Carbon) is refused at launch. In model-gateway mode (AGY_LLM_GATEWAY_URL) agy takes its list from the gateway's GET /v1beta/models instead, and sends no credential of its own. A leg with `gateway: true` (antigravity-cli only) gets agy_gateway, a stdlib relay written to ~/.agy-gateway.py. The launch and resume commands start it on 127.0.0.1:4100 before exec'ing agy (agy accepts a plain-http gateway only on localhost). It adds the leg's virtual key as x-goog-api-key and streams each request to the proxy's /gemini passthrough, so spend stays metered per leg; an unreachable proxy answers 502. Legs without the key are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016kmUsyYSEMPGiwbSuvR9hh
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
Thykof
added a commit
to synthdataco/autoquant
that referenced
this pull request
Nov 12, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016kmUsyYSEMPGiwbSuvR9hh
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.
What
A new per-leg key,
gateway: true, forantigravity-clilegs only.--modelagainst a list built into the CLI, and that list lags Google's. Gemini 4 Carbon is refused at launch withnot recognized as a known model(agy 1.5.2 and 1.5.5).GET /v1beta/models, and sends no credential of its own.synth_lib/benchmark/agy_gateway.pyis a stdlib-only relay, provisioned to~/.agy-gateway.pyin the leg's HOME.127.0.0.1:4100, thenexecagy:sh -c 'python3 "$HOME/.agy-gateway.py" && exec "$@"'. The prompt is passed as an argument, never inside the shell string.x-goog-api-keyand streams each request to the proxy's/geminipassthrough, so spend stays metered per leg.~/.agy-gateway.log.gatewayon any other CLI is rejected at load.Tested
pytest tests/benchmark: 244 passed. New tests cover:--model gemini-4-carbon --effort highexits 0. The answer comes frommodelVersion: gemini-4-carbon, the request is metered under the leg's key, and nothing extra appears on stdout.Note
Gateway mode exposes Google's whole model list, so agy's own sub-agents may pick a model other than the leg's. Any model they use needs a price in the proxy, or it meters at $0.
🤖 Generated with Claude Code
https://claude.ai/code/session_016kmUsyYSEMPGiwbSuvR9hh