hyqhyq3/dsh-gemini-oauth-bridge0

dsh-gemini-oauth-bridge

Bridge Google AI subscription (Antigravity/Gemini OAuth, Code Assist API) into DeepSeek Harness as an OpenAI-compatible model endpoint

AI Analysis

核心用途是让 DSH 能够直接调用 Google 官方的 Gemini 系列模型。适合拥有 Google AI 订阅并希望在 DSH 中使用该模型的用户。

Package
dsh-gemini-oauth-bridge
Version
0.2.1
License
MIT
Last updated
Sep 3, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:hyqhyq3/dsh-gemini-oauth-bridge

Usage

  1. Click 登录 Google 账号 (Log in with Google) and finish the flow in your browser. The plugin temporarily listens on 127.0.0.1:51121 for the loopback callback — this exact redirect URI is registered for the Antigravity client and the port cannot change. Port conflicts are reported explicitly.
  2. After login the page shows the account, project ID, tier, and model list.
  3. Register the bridge as a DSH provider in ~/.dsh/settings.yaml (port matches your DSH web URL, default 3080):
llm-pi-ai:
  providers:
    gemini-oauth:
      api: openai-completions
      baseURL: http://127.0.0.1:3080/gemini-oauth-bridge/v1
      models:
        - id: gemini-3.1-pro-high
        - id: gemini-3.7-flash-high
  1. Restart DSH and pick the models in the model selector. Step 3 is usually unnecessary: logging in and refreshing the model list write this block automatically (the baseURL port follows the address you use to open the DSH UI). No apiKey needed (the bridge does not check auth headers by default; to add local auth, set "apiKey": "some-string" in ~/.dsh/gemini-oauth-bridge.json — requests must then carry Authorization: Bearer ).

Local state

~/.dsh/gemini-oauth-bridge.json (mode 0600, contains OAuth tokens — treat as a secret):

FieldMeaning
tokensaccess/refresh tokens and expiry
email / project / tierlogin account and registration result
modelsupstream model cache (refreshable from the UI)
signaturesthoughtSignature replay cache (by tool-call id, cap 800)
apiKeyoptional local auth for the bridge endpoint
apiConfigoptional upstream overrides (generateBase / loadBase / onboardBase); defaults match CLIProxyAPI: generation via daily, registration via prod