#13959·OmniRoute

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:

  1. Transparent TLS MITM proxy bridge (antigravity-bridge.mjs) with selective upstream routing.
  2. Dynamic model catalog injection into Antigravity's /model selector (/v1internal:fetchAvailableModels).
  3. Complete tool-call accumulation and schema translation for Antigravity candidates (open-sse/translator/response/openai-to-antigravity.ts).
  4. Production-ready systemd daemon unit definitions.

Working reference repository: https://github.com/steve25060/omniroute_antigravity


The Problem

  1. 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.
  2. 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.
  3. 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.
  4. SSE Tool-Calling Protocol Differences: OpenAI-compatible providers send incremental tool_calls deltas across multiple streaming chunks. Antigravity's client expects fully assembled functionCall objects 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 20129 using 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/antigravity endpoint.

2. In-Flight Model Catalog Injection

  • Intercepts /v1internal:fetchAvailableModels responses 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_reason is 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.service and omniroute-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