You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Antigravity 429 handling (SoftRetry/InstantRetrySameAuth) & request fingerprinting differences vs official agy CLI
#7541
We compared CLIProxyAPI's Antigravity executor against the official Antigravity CLI (agy v1.5.9) to understand potential client-fingerprinting vectors and 429 retry behavior when using CLIProxyAPI with third-party harnesses (such as omp).
1. Directly Observed Differences (CLIProxyAPI vs agy v1.5.9)
A. 429 Classification & Retry/Rotation Behavior
In internal/runtime/executor/antigravity_executor_credits.go (decideAntigravity429), 429 responses are classified by error.status == "RESOURCE_EXHAUSTED" and google.rpc.ErrorInfo.reason:
RATE_LIMIT_EXCEEDED with retryAfter < 3s → antigravity429DecisionInstantRetrySameAuth
RATE_LIMIT_EXCEEDED with 3s <= retryAfter < 5m → antigravity429DecisionShortCooldownSwitchAuth
RATE_LIMIT_EXCEEDED with retryAfter >= 5m → antigravity429DecisionFullQuotaExhausted
Any other 429 (e.g., non-RESOURCE_EXHAUSTED 429s or RATE_LIMIT_EXCEEDED without retryAfter) → antigravity429DecisionSoftRetry
In internal/runtime/executor/antigravity_executor_execute.go and internal/runtime/executor/antigravity_executor_stream.go, the switch decision.kind block only handles ShortCooldownSwitchAuth and FullQuotaExhausted (evicting idle transports and recording short cooldown).
For InstantRetrySameAuth and SoftRetry, the executor returns newAntigravityStatusErr(http.StatusTooManyRequests, bodyBytes) directly to the conductor (sdk/cliproxy/auth/conductor_selection.goshouldRetryAfterErrorWithAttempted), which can immediately retry or rotate across other auths on the same request.
B. Request Payload & Headers
System prompt (request.systemInstruction): internal/runtime/executor/antigravity_executor.go has // systemInstruction = "You are Antigravity, a powerful agentic AI coding assistant..." commented out, so CLIProxyAPI does not prepend/inject the Antigravity identity prompt. By contrast, agy embeds and sends its own Antigravity system prompt (You are Antigravity, a powerful agentic AI coding assistant designed by the Google Deepmind team working on Advanced Agentic Coding. or the generic-system-prompt variant). Third-party client prompts (e.g., omp's system prompt) are forwarded verbatim while still claiming "userAgent": "antigravity".
requestId format: internal/runtime/executor/antigravity_executor_request.go generates "agent-" + uuid.NewString() for non-image requests, whereas agy's computeRequestID formats slash-delimited IDs (%v/%v/%v/%v/%v, %v/%v/%v/%v, or %v/%v).
safetySettings: antigravity_executor_request.go (geminiToAntigravityDoc) and antigravity_executor_tokens.go unconditionally delete request.safetySettings, whereas agy includes SafetySetting definitions in its request protos.
User-Agent & Connection Pool:
internal/misc/antigravity_version.go emits the macOS/arm64 Hub UA antigravity/hub/2.29.0 (aidev_client; os_type=darwin; arch=arm64; cl=1013060670) regardless of host OS/arch.
resolveAntigravityPoolSettings in antigravity_executor.go disables HTTP/1.1 connection pooling by default (shortMode: true, maxIdleConnsPerHost: -1) unless antigravity.connection-pool.enabled: true is set, resulting in a fresh TCP+TLS handshake per request.
2. Hypothesis (Unverified Server-Side Behavior)
Our hypothesis is that upstream may combine positive markers ("green flags" such as the "You are Antigravity..." system prompt prefix, slash-delimited requestId, and safetySettings) with negative markers (such as non-Antigravity harness prompts under "userAgent": "antigravity", or SoftRetry/InstantRetrySameAuth immediately replaying/rotating an identical non-Antigravity payload across multiple auths after a firewall/bot-detection 429).
Questions for Maintainers / Community
Is antigravity429DecisionSoftRetry / InstantRetrySameAuth intentionally bypassing per-auth cooldown and transport eviction, or should non-RESOURCE_EXHAUSTED 429s avoid immediate multi-auth rotation on the same request?
Was systemInstruction in antigravity_executor.go intentionally commented out, and would an opt-in config for Antigravity-aligned systemInstruction prefixing / safetySettings / connection-pool defaults make sense?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
We compared
CLIProxyAPI's Antigravity executor against the official Antigravity CLI (agyv1.5.9) to understand potential client-fingerprinting vectors and 429 retry behavior when usingCLIProxyAPIwith third-party harnesses (such asomp).1. Directly Observed Differences (
CLIProxyAPIvsagyv1.5.9)A. 429 Classification & Retry/Rotation Behavior
internal/runtime/executor/antigravity_executor_credits.go(decideAntigravity429), 429 responses are classified byerror.status == "RESOURCE_EXHAUSTED"andgoogle.rpc.ErrorInfo.reason:QUOTA_EXHAUSTED/INSUFFICIENT_G1_CREDITS_BALANCE→antigravity429DecisionFullQuotaExhaustedRATE_LIMIT_EXCEEDEDwithretryAfter < 3s→antigravity429DecisionInstantRetrySameAuthRATE_LIMIT_EXCEEDEDwith3s <= retryAfter < 5m→antigravity429DecisionShortCooldownSwitchAuthRATE_LIMIT_EXCEEDEDwithretryAfter >= 5m→antigravity429DecisionFullQuotaExhaustedRESOURCE_EXHAUSTED429s orRATE_LIMIT_EXCEEDEDwithoutretryAfter) →antigravity429DecisionSoftRetryinternal/runtime/executor/antigravity_executor_execute.goandinternal/runtime/executor/antigravity_executor_stream.go, theswitch decision.kindblock only handlesShortCooldownSwitchAuthandFullQuotaExhausted(evicting idle transports and recording short cooldown).InstantRetrySameAuthandSoftRetry, the executor returnsnewAntigravityStatusErr(http.StatusTooManyRequests, bodyBytes)directly to the conductor (sdk/cliproxy/auth/conductor_selection.goshouldRetryAfterErrorWithAttempted), which can immediately retry or rotate across other auths on the same request.B. Request Payload & Headers
request.systemInstruction):internal/runtime/executor/antigravity_executor.gohas// systemInstruction = "You are Antigravity, a powerful agentic AI coding assistant..."commented out, soCLIProxyAPIdoes not prepend/inject the Antigravity identity prompt. By contrast,agyembeds and sends its own Antigravity system prompt (You are Antigravity, a powerful agentic AI coding assistant designed by the Google Deepmind team working on Advanced Agentic Coding.or thegeneric-system-promptvariant). Third-party client prompts (e.g.,omp's system prompt) are forwarded verbatim while still claiming"userAgent": "antigravity".requestIdformat:internal/runtime/executor/antigravity_executor_request.gogenerates"agent-" + uuid.NewString()for non-image requests, whereasagy'scomputeRequestIDformats slash-delimited IDs (%v/%v/%v/%v/%v,%v/%v/%v/%v, or%v/%v).safetySettings:antigravity_executor_request.go(geminiToAntigravityDoc) andantigravity_executor_tokens.gounconditionally deleterequest.safetySettings, whereasagyincludesSafetySettingdefinitions in its request protos.User-Agent& Connection Pool:internal/misc/antigravity_version.goemits the macOS/arm64 Hub UAantigravity/hub/2.29.0 (aidev_client; os_type=darwin; arch=arm64; cl=1013060670)regardless of host OS/arch.resolveAntigravityPoolSettingsinantigravity_executor.godisables HTTP/1.1 connection pooling by default (shortMode: true,maxIdleConnsPerHost: -1) unlessantigravity.connection-pool.enabled: trueis set, resulting in a fresh TCP+TLS handshake per request.2. Hypothesis (Unverified Server-Side Behavior)
Our hypothesis is that upstream may combine positive markers ("green flags" such as the
"You are Antigravity..."system prompt prefix, slash-delimitedrequestId, andsafetySettings) with negative markers (such as non-Antigravity harness prompts under"userAgent": "antigravity", orSoftRetry/InstantRetrySameAuthimmediately replaying/rotating an identical non-Antigravity payload across multiple auths after a firewall/bot-detection 429).Questions for Maintainers / Community
antigravity429DecisionSoftRetry/InstantRetrySameAuthintentionally bypassing per-auth cooldown and transport eviction, or should non-RESOURCE_EXHAUSTED429s avoid immediate multi-auth rotation on the same request?systemInstructioninantigravity_executor.gointentionally commented out, and would an opt-in config for Antigravity-alignedsystemInstructionprefixing /safetySettings/connection-pooldefaults make sense?All reactions