fix(antigravity): allow cloudcode envelope through messages guard#7582
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for the mitmRouteAlias namespace in src/mitm/server.cjs to separate client-facing OmniRoute model IDs from mitmAlias, prioritizing it during model mapping. Additionally, it updates src/sse/handlers/chat.ts to identify Antigravity requests by path and bypass the early validation guard requiring messages or input fields, as Antigravity requests utilize a cloudcode request envelope. Corresponding unit tests have been added to validate the routing behavior and the alias resolution order. No review comments were provided, so there is no feedback to address.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
Thanks for tracking down the cloudcode-envelope guard bug — the chat.ts fix (bypassing the OpenAI The src/mitm/server.cjs half has drifted, though: |
|
Rebased onto the current |
7c16f71 to
aa39a6f
Compare
5a5c413 to
c57e07a
Compare
Summary
Closes #7581.
This fixes two Antigravity MITM routing problems:
/v1/antigravitycloudcode envelopes no longer get rejected by the OpenAI top-levelmessagesguard. Antigravity requests carry turns underrequest.contents, so missing top-levelmessagesis valid for this endpoint.mitmRouteAlias.antigravitynamespace and only falls back tomitmAlias.antigravity, keeping MITM model routing separate from executor upstream-id cleanup while preserving compatibility.Verification
Ran targeted regression tests:
Result:
31/31tests passed.The Antigravity cloudcode regression loop covers the Gemini-family model set derived from
ANTIGRAVITY_PUBLIC_MODELS,AGY_PUBLIC_MODELS, andANTIGRAVITY_MODEL_ALIASES/values. It currently verifies 21 model IDs, includinggemini-3.5-flash-low,gemini-3.5-flash-medium,gemini-3.5-flash-high,gemini-3.1-pro-high,gemini-3.1-pro-low,gemini-pro-agent, andrev19-uic3-1p, and asserts they route through the Antigravity executor without returning the missing-messages 400.