hyqhyq3/dsh-gemini-oauth-bridge ↗★ 0
dsh-gemini-oauth-bridge
Google AI 订阅桥接插件:将 Gemini OAuth 和 Code Assist API 桥接为兼容 OpenAI 的模型端点引入 DSH。
AI 分析
核心用途是让 DSH 能够直接调用 Google 官方的 Gemini 系列模型。适合拥有 Google AI 订阅并希望在 DSH 中使用该模型的用户。
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:hyqhyq3/dsh-gemini-oauth-bridge说明文档
阅读完整 README ↗Usage
- Click 登录 Google 账号 (Log in with Google) and finish the flow in your browser. The plugin temporarily listens on
127.0.0.1:51121for the loopback callback — this exact redirect URI is registered for the Antigravity client and the port cannot change. Port conflicts are reported explicitly. - After login the page shows the account, project ID, tier, and model list.
- 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
- 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
baseURLport 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 carryAuthorization: Bearer).
Local state
~/.dsh/gemini-oauth-bridge.json (mode 0600, contains OAuth tokens — treat as a secret):
| Field | Meaning |
|---|---|
tokens | access/refresh tokens and expiry |
email / project / tier | login account and registration result |
models | upstream model cache (refreshable from the UI) |
signatures | thoughtSignature replay cache (by tool-call id, cap 800) |
apiKey | optional local auth for the bridge endpoint |
apiConfig | optional upstream overrides (generateBase / loadBase / onboardBase); defaults match CLIProxyAPI: generation via daily, registration via prod |