{"id":47717992,"url":"https://github.com/marcodiniz/ag-local-bridge","last_synced_at":"2026-04-02T19:07:33.876Z","repository":{"id":343185372,"uuid":"1176141460","full_name":"marcodiniz/ag-local-bridge","owner":"marcodiniz","description":"OpenAI-compatible API bridge for Antigravity — use Claude, Gemini, and GPT-OSS with any tool","archived":false,"fork":false,"pushed_at":"2026-04-01T14:10:38.000Z","size":1643,"stargazers_count":14,"open_issues_count":0,"forks_count":7,"subscribers_count":0,"default_branch":"beta","last_synced_at":"2026-04-01T16:11:25.548Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marcodiniz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-08T17:12:53.000Z","updated_at":"2026-04-01T14:10:42.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/marcodiniz/ag-local-bridge","commit_stats":null,"previous_names":["marcodiniz/ag-local-bridge"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/marcodiniz/ag-local-bridge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcodiniz%2Fag-local-bridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcodiniz%2Fag-local-bridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcodiniz%2Fag-local-bridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcodiniz%2Fag-local-bridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcodiniz","download_url":"https://codeload.github.com/marcodiniz/ag-local-bridge/tar.gz/refs/heads/beta","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcodiniz%2Fag-local-bridge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31293310,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-02T19:07:33.288Z","updated_at":"2026-04-02T19:07:33.868Z","avatar_url":"https://github.com/marcodiniz.png","language":"JavaScript","funding_links":["https://buymeacoffee.com/marcowm"],"categories":[],"sub_categories":[],"readme":"# AG (Antigravity) Local Bridge\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://open-vsx.org/extension/marcodiniz/ag-local-bridge\"\u003e\u003cimg src=\"https://img.shields.io/open-vsx/v/marcodiniz/ag-local-bridge?logo=open-vsx\u0026label=Open%20VSX\u0026logoColor=white\u0026color=blueviolet\" alt=\"Open VSX Version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://open-vsx.org/extension/marcodiniz/ag-local-bridge\"\u003e\u003cimg src=\"https://img.shields.io/open-vsx/dt/marcodiniz/ag-local-bridge?color=success\u0026label=downloads\" alt=\"Open VSX Downloads\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/marcodiniz/ag-local-bridge/stargazers\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/marcodiniz/ag-local-bridge?style=flat\u0026color=gold\" alt=\"GitHub Stars\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/marcodiniz/ag-local-bridge/issues\"\u003e\u003cimg src=\"https://img.shields.io/github/issues/marcodiniz/ag-local-bridge\" alt=\"GitHub Issues\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/marcodiniz/ag-local-bridge/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/marcodiniz/ag-local-bridge?style=flat\" alt=\"License\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://buymeacoffee.com/marcowm\"\u003e\u003cimg src=\"https://img.shields.io/badge/Buy%20Me%20A%20Coffee-marcowm-FFDD00?style=flat\u0026logo=buy-me-a-coffee\u0026logoColor=black\" alt=\"Buy Me A Coffee\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n**Exposes your running [Antigravity](https://codeium.com/antigravity) instance as a local OpenAI-compatible API** on `localhost:11435`.\n\nUse your Antigravity subscription with any tool that speaks OpenAI — [opencode](https://opencode.ai), [aider](https://aider.chat), [continue.dev](https://continue.dev), or plain `curl`.\n\n## How it Works\n\n```\nYour tool → HTTP :11435 → VS Code extension → Antigravity sidecar (ConnectRPC) → Cloud AI\n```\n\nThe extension runs inside Antigravity's VS Code process, discovers the sidecar via process inspection, intercepts CSRF tokens from Antigravity's own traffic, and proxies your requests through the same authenticated channel Antigravity uses internally.\n\n## Features\n\n- **OpenAI-compatible API** — drop-in replacement for any tool expecting OpenAI format\n- **Image support** — paste screenshots or attach images from OpenAI clients; images are saved to temp files and referenced in the message so the agent can view them\n- **Workspace-aware** — automatically detects and sets the correct project context via `x-workspace-dir` / `x-workspace-uri` headers\n- **Conversation multiplexing** — reuses Cascade conversations for efficiency, with automatic retry on capacity errors\n- **Streaming \u0026 non-streaming** — both modes supported\n\n## Available Models\n\n| Model ID                               | Description                                   |\n| -------------------------------------- | --------------------------------------------- |\n| `antigravity-claude-sonnet-4-6`        | Claude Sonnet 4.6 with Thinking **(default)** |\n| `antigravity-claude-opus-4-6-thinking` | Claude Opus 4.6 with Thinking                 |\n| `antigravity-gemini-3-flash`           | Gemini 3 Flash                                |\n| `antigravity-gemini-3.1-pro-high`      | Gemini 3.1 Pro — High thinking                |\n| `antigravity-gemini-3.1-pro-low`       | Gemini 3.1 Pro — Low thinking                 |\n| `antigravity-gpt-oss-120b`             | GPT-OSS 120B Medium                           |\n\n## Installation\n\n### From Open VSX (recommended)\n\n1. Open Antigravity\n2. Go to **Extensions** (`Ctrl+Shift+X`)\n3. Search for **\"AG Local Bridge\"** by marcodiniz\n4. Click **Install**\n5. Reload Antigravity (`Ctrl+Shift+P` → _Developer: Reload Window_)\n\n### Manual install\n\n1. Clone into your Antigravity extensions directory:\n\n   ```bash\n   # Windows\n   git clone https://github.com/marcodiniz/ag-local-bridge \"%USERPROFILE%\\.antigravity\\extensions\\ag-local-bridge-1.0.0-universal\"\n\n   # macOS / Linux\n   git clone https://github.com/marcodiniz/ag-local-bridge ~/.antigravity/extensions/ag-local-bridge-1.0.0-universal\n   ```\n\n2. Reload Antigravity (`Ctrl+Shift+P` → _Developer: Reload Window_)\n\n### Verify\n\nLook for **\"AG Local Bridge\"** in the Output panel — you should see:\n\n```\n✅ Server running on http://localhost:11435\n```\n\n## Usage\n\n### With opencode\n\nAdd to `~/.config/opencode/opencode.json`:\n\n```json\n{\n  \"provider\": {\n    \"ag-local-bridge\": {\n      \"npm\": \"@ai-sdk/openai-compatible\",\n      \"name\": \"AG Local Bridge\",\n      \"options\": {\n        \"baseURL\": \"http://localhost:11435/v1\",\n        \"apiKey\": \"local\"\n      },\n      \"models\": {\n        \"antigravity-claude-sonnet-4-6\": {\n          \"name\": \"Claude Sonnet 4.6 (Antigravity)\",\n          \"modalities\": { \"input\": [\"text\", \"image\"], \"output\": [\"text\"] },\n          \"limit\": { \"context\": 200000, \"output\": 64000 }\n        },\n        \"antigravity-claude-opus-4-6-thinking\": {\n          \"name\": \"Claude Opus 4.6 Thinking (Antigravity)\",\n          \"modalities\": { \"input\": [\"text\", \"image\"], \"output\": [\"text\"] },\n          \"limit\": { \"context\": 200000, \"output\": 64000 }\n        },\n        \"antigravity-gemini-3.1-pro-high\": {\n          \"name\": \"Gemini 3.1 Pro High (Antigravity)\",\n          \"modalities\": { \"input\": [\"text\", \"image\"], \"output\": [\"text\"] },\n          \"limit\": { \"context\": 1048576, \"output\": 65535 }\n        },\n        \"antigravity-gemini-3.1-pro-low\": {\n          \"name\": \"Gemini 3.1 Pro Low (Antigravity)\",\n          \"modalities\": { \"input\": [\"text\", \"image\"], \"output\": [\"text\"] },\n          \"limit\": { \"context\": 1048576, \"output\": 65535 }\n        },\n        \"antigravity-gemini-3-flash\": {\n          \"name\": \"Gemini 3 Flash (Antigravity)\",\n          \"modalities\": { \"input\": [\"text\", \"image\"], \"output\": [\"text\"] },\n          \"limit\": { \"context\": 1048576, \"output\": 65536 }\n        },\n        \"antigravity-gpt-oss-120b\": {\n          \"name\": \"GPT-OSS 120B Medium (Antigravity)\",\n          \"modalities\": { \"input\": [\"text\", \"image\"], \"output\": [\"text\"] },\n          \"limit\": { \"context\": 128000, \"output\": 16384 }\n        }\n      }\n    }\n  }\n}\n```\n\nThen select `ag-local-bridge/antigravity-claude-sonnet-4-6` as your model.\n\n\u003e **Image support**: The `modalities` field enables image input (clipboard paste, file attach). Images are saved to temp files and the agent views them with its built-in file tools.\n\n### With curl\n\n```bash\n# List models\ncurl http://localhost:11435/v1/models\n\n# Chat completion\ncurl http://localhost:11435/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"antigravity-claude-sonnet-4-6\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"Hello!\"}],\n    \"stream\": false\n  }'\n\n# Streaming\ncurl http://localhost:11435/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"antigravity-gemini-3.1-pro-high\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"Hello!\"}],\n    \"stream\": true\n  }'\n\n# With image (base64 data URL)\ncurl http://localhost:11435/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"antigravity-claude-sonnet-4-6\",\n    \"messages\": [{\"role\": \"user\", \"content\": [\n      {\"type\": \"text\", \"text\": \"What do you see?\"},\n      {\"type\": \"image_url\", \"image_url\": {\"url\": \"data:image/png;base64,iVBOR...\"}}\n    ]}],\n    \"stream\": false\n  }'\n```\n\n### With any OpenAI-compatible client\n\n```\nBase URL: http://localhost:11435/v1\nAPI Key:  anything (not validated)\n```\n\n## API Endpoints\n\n| Method | Path                   | Description                                 |\n| ------ | ---------------------- | ------------------------------------------- |\n| `GET`  | `/v1/models`           | List available models                       |\n| `POST` | `/v1/chat/completions` | Chat completion (streaming \u0026 non-streaming) |\n| `POST` | `/v1/proxy`            | Forward arbitrary RPC to sidecar            |\n| `GET`  | `/v1/debug`            | Debug info (sidecar ports, CSRF, captures)  |\n\n## Image Support\n\nImages sent via the OpenAI `image_url` content type are handled as follows:\n\n1. **Base64 data URLs** (`data:image/png;base64,...`) — decoded and saved to a temp file\n2. **Remote URLs** (`https://...`) — downloaded, then saved to a temp file\n3. **File URIs** (`file:///C:/path/to/image.png`) — read directly from disk\n\nThe image file path is prepended to the message text so the Antigravity agent can use its `view_file` tool to inspect the image.\n\n## Workspace Context\n\nPass workspace context via HTTP headers:\n\n| Header            | Description                                         |\n| ----------------- | --------------------------------------------------- |\n| `x-workspace-dir` | Absolute filesystem path (e.g. `C:\\code\\myproject`) |\n| `x-workspace-uri` | File URI (e.g. `file:///C:/code/myproject`)         |\n\nWhen set, the bridge switches the active VS Code workspace folder before creating a Cascade, ensuring the agent operates in the correct project context.\n\n## Architecture\n\nThe extension uses a 2-tier fallback strategy:\n\n1. **Tier 1 — Sidecar ConnectRPC** (preferred): Discovers the Antigravity sidecar process, connects via HTTP/2 with CSRF authentication, and uses the Cascade API (`StartCascade` → `SendUserCascadeMessage` → poll `GetCascadeTrajectory`). Conversations are multiplexed and the active workspace is auto-detected.\n\n2. **Tier 2 — Command Dispatch**: Last resort — fires the message through `antigravity.executeCascadeAction`.\n\n## Commands\n\n| Command                                                 | Description                                |\n| ------------------------------------------------------- | ------------------------------------------ |\n| `AG Local Bridge: Start Server`                         | Start the HTTP server                      |\n| `AG Local Bridge: Stop Server`                          | Stop the HTTP server                       |\n| `AG Local Bridge: Show Status`                          | Display connection status                  |\n| `AG Local Bridge: Probe Sidecar`                        | Test sidecar connectivity                  |\n| `AG Local Bridge: List Available LM Models`             | List configured models and sidecar status  |\n| `AG Local Bridge: List Available Chat Commands (Debug)` | List chat commands available for debugging |\n\n## Configuration\n\n| Setting                     | Default | Description                  |\n| --------------------------- | ------- | ---------------------------- |\n| `agLocalBridge.port`        | `11435` | HTTP server port             |\n| `agLocalBridge.logRequests` | `false` | Log request/response details |\n\n## Requirements\n\n- [Antigravity](https://codeium.com/antigravity) installed and running\n- Active Antigravity subscription (Free/Pro/Teams/Enterprise)\n\n## Contributing\n\nWe use a **beta → master** release flow:\n\n| Branch   | Role                  | Publishes as    |\n| -------- | --------------------- | --------------- |\n| `beta`   | Default / development | **Pre-release** |\n| `master` | Stable releases only  | **Stable**      |\n\n1. **Fork \u0026 branch** off `beta` (the default branch).\n2. **Open your PR against `beta`** — GitHub will target it automatically.\n3. Once merged, a **pre-release** is published to [Open VSX](https://open-vsx.org/extension/marcodiniz/ag-local-bridge) for beta testers.\n4. When a beta build is ready for general availability, the maintainer merges `beta → master` to cut a **stable release**.\n\n\u003e **Note:** `master` is protected — direct pushes are not allowed. All changes flow through `beta` first.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcodiniz%2Fag-local-bridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcodiniz%2Fag-local-bridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcodiniz%2Fag-local-bridge/lists"}