Preface¶
When integrating Google Antigravity (Cloud Code PA) into DeepSeek Harness (DSH), the common approach is to build a custom relay layer or modify the client protocol. If protocol fields, stream reasoning, multimodal inputs, or tool calls are not perfectly aligned, debugging costs can be significant. The following introduces the community plugin dsh-antigravity-direct (Maintainer: LingK9999, MIT License, Current Version: 0.3.2): It establishes a local loopback proxy to route OpenAI /v1/chat/completions to Antigravity’s v1internal, and manages quotas and proxies within the DSH settings.
What is this¶
dsh-antigravity-direct is a core local direct-connection proxy plugin for DeepSeek Harness. When the plugin starts with DSH, it listens on the default address 127.0.0.1:8790, providing an OpenAI-compatible interface externally. It connects to Antigravity upstream, enabling DSH to call models listed in the README, such as Gemini 3.8 / 3.1 and Claude 4.6, using standard Provider configurations.
The plugin’s ID in the DSH manifest is antigravity-direct, and its display name is “Antigravity Direct Proxy”. It is categorized as a networking tool. You can view its entry on the community directory page skillhub.cn, and find the source code and documentation in the GitHub repository.
Core Features¶
Protocol Translation and Model Capabilities¶
- Bidirectional translation between OpenAI
/v1/chat/completions(streaming and non-streaming) and Google Antigravity’sgenerateContent/streamGenerateContent. - As stated in the README, support includes: streaming reasoning processes, multimodal inputs (Vision), and native function calling (Function Calling / Tools).
Supported Model IDs and Windows (excerpted from the repository’s model matrix):
| Model ID | Context Window | Max Output Tokens |
|---|---|---|
gemini-3.8-flash / gemini-3.8-flash-high |
300,000 | 128,000 |
gemini-3.1-pro-high |
300,000 | 128,000 |
claude-sonnet-4-6 / claude-opus-4-6-thinking |
200,000 | 64,000 |
Two-Model Pool Quota Dashboard¶
The “Antigravity Direct” section in the DSH settings panel provides a UI to monitor the GEMINI Model Pool and the CLAUDE / GPT Model Pool separately. It displays 5-hour session limits and weekly limit progress, remaining ratios, relative refresh times, and reset times.
Network Proxy Hot-Swapping¶
The settings page offers “Network Proxy Settings (HTTP / HTTPS Proxy)”: allowing dynamic saving and switching of proxies (default http://127.0.0.1:7890, blank means direct connection), and supporting endpoint connectivity and latency checks. The environment variable AG_PROXY defaults to the same value.
Long Text and Tool Call Defense¶
The README outlines three types of mechanisms: sanitizing absolute paths and wrapping tags in Tool Results to reduce misinterpretation by policy layers; protection against incomplete tool syntax and JSON tail debris in ultra-long contexts; and mitigation of 502 / Socket Hang Up errors in deep thinking scenarios via TCP Keep-Alive and exponential backoff retries. The rules file is sanitize-rules.json in the repository.
Multi-Account OAuth¶
Supports multi-Google account credential rotation and persistence; users can initiate OAuth login or remove accounts via the Web interface. It scans ~/.dsh/credentials/antigravity/*.json (JSON containing refresh_token) by default; paths can also be specified using AG_CREDS_DIR or AG_CREDS.
Installation and Activation¶
The desktop profile of the official DSH desktop client (Electron) is exclusively managed by the application. Running dsh plugin --profile desktop add ... in the terminal will be blocked with the error profile "desktop" is managed exclusively by the Electron application. Please choose one of the following methods based on your environment.
Method 1: DSH Desktop One-Click Install (Recommended in README)¶
- Place the repository code in a local directory (the README uses
git cloneto fetch the source). - Enter the directory and run the one-click script:
cd dsh-antigravity-direct
powershell -ExecutionPolicy Bypass -File .\install.ps1
The script handles plugin deployment, dependency synchronization, and profile bundle registration; restart DSH Desktop after completion.
Method 2: Plugin Market or Settings Page¶
If dshmarket is installed or the client supports GUI plugin installation:
- Open Settings → Plugins (or the DSH Plugin Market).
- Enter the following in the installation box:
github:LingK9999/dsh-antigravity-direct
- Install and restart DSH.
Method 3: Command Line Web Profile¶
Applicable to non-desktop environments launched via dsh web:
dsh plugin --profile web add github:LingK9999/dsh-antigravity-direct
Configuration and Typical Usage¶
Registering a Provider¶
After the plugin starts, the local service defaults to port 8790 (can be modified via AG_PORT). In the profile configuration, add an antigravity node under config.providers of the llm-pi-ai plugin, pointing baseURL to the local proxy. For example, the desktop profile path is ~/.dsh/profiles/desktop/cordis.patch.yml. Minimal example:
antigravity:
displayName: Antigravity直连
apiKeyEnv: GEMINI_API_KEY
api: openai-completions
baseURL: http://127.0.0.1:8790/v1
models:
- id: gemini-3.8-flash
name: gemini-3.8-flash
contextWindow: 300000
maxTokens: 128000
reasoningEfforts:
low: low
medium: medium
high: high
input: [text, image]
For full fields, see the repository’s provider-config-snippet.yml.
Credentials and Login¶
In addition to placing JSON credentials in the default directory, you can click “Login New Account” on the settings page to proceed with browser OAuth. The default upstream endpoint is https://daily-cloudcode-pa.googleapis.com (can be overridden by environment variable AG_BASE).
Common Environment Variables¶
| Variable Name | Description | Default Value |
|---|---|---|
AG_PORT |
Local loopback proxy port | 8790 |
AG_PROXY |
HTTP/SOCKS proxy for upstream access | http://127.0.0.1:7890 |
AG_CREDS_DIR |
Credentials directory | ~/.dsh/credentials/antigravity |
AG_BASE |
Upstream Antigravity endpoint | https://daily-cloudcode-pa.googleapis.com |
After following the steps above, simply select the registered Antigravity model in DSH to chat using the OpenAI Provider method; quotas and proxies can be viewed and adjusted in the “Antigravity Direct” panel.
Use Cases and Notes¶
Suitable for developers who need to uniformly use the OpenAI protocol within DSH to call high-configuration Antigravity models, and wish to view dual-pool quotas and switch proxies within the same interface. The permissions declared by the plugin include: local loopback proxy (127.0.0.1:8790), read-only Antigravity credentials, and quota display in the settings page. It runs with the permissions of the current DSH process; please review the source code and MIT license yourself before installation.
The DSH ecosystem emphasizes “Everything is a Plugin”; the plugin directory on skillhub.cn is maintained by the community and has no official affiliation with DeepSeek / High-Flyer. This plugin relies on valid Google OAuth credentials and reachable upstream networks; the default proxy value assumes a common local proxy port exists on the machine. If the environment differs, modifications are needed in the panel or via AG_PROXY.
Conclusion¶
dsh-antigravity-direct consolidates Antigravity protocol differences into a local 8790 proxy and a single Provider configuration, while adding quota visualization, proxy hot-swapping, and long-context protection. For entry information and installation access, see the Plugin Directory Page; for implementation details and updates, refer to the GitHub Repository README.