feat(backend): Antigravity IDE & CLI native bridge with dynamic model injection
Author: steve25060Created Sep 17, 2026Updated Sep 17, 2026
Labelsenhancementbacklog
Summary
This proposal introduces native support for Google Antigravity CLI and Antigravity IDE in OmniRoute, featuring:
- Transparent TLS MITM proxy bridge (
antigravity-bridge.mjs) with selective upstream routing. - Dynamic model catalog injection into Antigravity's
/modelselector (/v1internal:fetchAvailableModels). - Complete tool-call accumulation and schema translation for Antigravity candidates (
open-sse/translator/response/openai-to-antigravity.ts). - Production-ready systemd daemon unit definitions.
Working reference repository: https://github.com/steve25060/omniroute_antigravity
The Problem
- Proprietary Endpoint Locking: Antigravity CLI and IDE connect strictly to Google backend endpoints (
cloudcode-pa.googleapis.com). Standard HTTP proxies break when attempting to route traffic because Google's backend performs strict host and certificate validation. - All-or-Nothing Traffic Routing: Directing all Antigravity traffic to an external AI gateway breaks native Google Gemini 3.8 models, authentication renewals, and telemetry.
- Model Selection Isolation: Antigravity clients discover available models via
/v1internal:fetchAvailableModels. Without catalog injection, users cannot select third-party model combos from within the Antigravity interface. - SSE Tool-Calling Protocol Differences: OpenAI-compatible providers send incremental
tool_callsdeltas across multiple streaming chunks. Antigravity's client expects fully assembledfunctionCallobjects with preserved call IDs, names, and JSON argument structures. Without accumulator translation, bash commands and file operations fail during execution.
The Solution
1. Transparent Selective Bridge Proxy (bin/antigravity-bridge.mjs)
- Runs a lightweight TLS MITM proxy on port
20129using locally generated CA certificates. - Selective Upstream Routing: Inspects requests to
cloudcode-pa.googleapis.com:- Native Google Models (
gemini-3.8*): Forwarded 100% untouched to Google's upstream backend, preserving full native reasoning speed and quota. - Auth, Telemetry, and Non-Model Endpoints: Passed directly upstream to Google.
- Third-Party & Custom Models: Intercepted and forwarded to OmniRoute's
/v1/antigravityendpoint.
- Native Google Models (
2. In-Flight Model Catalog Injection
- Intercepts
/v1internal:fetchAvailableModelsresponses from Google and dynamically appends OmniRoute model groups into the native model picker:coding-titans: Deep Architecture & Heavy Refactoring (nemotron-3-super-120b,deepseek-r1,claude-3-7-sonnet).speed-demons: Sub-second coding & fast iteration (llama-3.3-70b,codestral-2501).infinite-context: 1M+ token repository analysis (gemini-2.5-flash,gemini-2.5-pro).zero-cost-fallback: 100% free unmetered safety net (qwen-2.5-coder-32b:free,deepseek-r1:free).
3. Tool-Call SSE Stream Accumulator (open-sse/translator/response/openai-to-antigravity.ts)
- Accumulates streaming tool-call fragments across SSE chunks until
finish_reasonis received. - Emits fully-formed Google Antigravity candidate parts with exact function names, parsed arguments, and call IDs.
- Validated with Antigravity bash command execution, file edits, and MCP integrations.
4. Daemon & Deployment Units (deploy/systemd/)
- Packaged systemd user units (
omniroute.serviceandomniroute-bridge.service) enabling hands-free background execution.
Contributor Information
I would love to contribute this implementation to the official OmniRoute repository and help maintain the Antigravity integration modules.
Full implementation and documentation: https://github.com/steve25060/omniroute_antigravity
Source: diegosouzapw/OmniRoute