V1ki/dsh-plugin-subscriptions ↗★ 419

dsh-plugin-subscriptions

Use ChatGPT (Codex), Claude, Grok (X Premium), GitHub Copilot, and Google Antigravity subscriptions as DeepSeek Harness LLM providers, with OAuth login from the web Settings page 适合拥有ChatGPT、Claude等官网订阅,希望免API Key直接在系统内调用的用户。

패키지
dsh-plugin-subscriptions
호환성
미검증
Harness peer 범위
^0.1.1-rc.2 || ^0.1.2-alpha.1 || ^0.1.3-alpha.1 || ^0.1.5-alpha.1 || ^0.1.7-rc.1 || 0.2.0-rc.2
Cordis peer 범위
^4.0.1
버전
0.9.7
라이선스
MIT
최근 업데이트
2026. 10. 1.

같은 패키지 이름의 다른 저장소

설치

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:V1ki/dsh-plugin-subscriptions

dsh-plugin-subscriptions Awesome DSH Plugin

English | 中文

Use your ChatGPT (Codex), Claude, Grok (X Premium), GitHub Copilot, and Google Antigravity subscriptions as LLM providers in DeepSeek Harness — no API keys. Codex, Grok, and Antigravity log in via OAuth in the dsh web UI (Settings → Subscriptions), while Copilot uses the GitHub OAuth device flow; Claude imports credentials from an existing Claude Code session when there is one (macOS Keychain or ~/.claude/.credentials.json) and otherwise falls back to the same browser OAuth flow, so the Claude Code CLI is not required. Tokens live at ~/.dsh/plugins/subscriptions/auth.json (mode 0600) and refresh automatically.

Demo

Settings → Subscriptions: per-provider login/logout, no API keys. Claude imports credentials from Claude Code when available and otherwise uses OAuth, as Codex and Grok always do (settings screenshots use demo accounts and catalog data):

Subscriptions settings page

Configure visibility, default reasoning effort, and context together in Edit model list, with shared Save and Cancel actions:

Model settings

Configure image generation, video generation, and X search per provider. Tool switches apply only to sessions created after saving:

Provider tools

Logged-in providers join the session model picker with their live model catalogs:

Model picker with subscription models

Models that advertise reasoning levels get an Effort selector in the same menu — Codex models, Grok 4.6 / 4.5, and Copilot's reasoning models (levels and defaults come from each provider's live catalog, not a hardcoded list; Copilot's capabilities.supports.reasoning_effort array is sent as reasoning_effort on chat completions and reasoning.effort on the Responses wire). Models listing both Copilot endpoints (gpt-5.4, gpt-5-mini) normally speak chat completions but reroute to /responses when a request combines function tools with an effort — Copilot rejects that combination on the chat wire:

Reasoning effort selector

Codex models whose catalog advertises the fast tier (the codex CLI's fast mode) get a Speed toggle in the composer's tool row, next to the model selector — Standard or Fast (service_tier: priority), per session. The /fast slash command offers the same choice as a popup; it errors with an explanation when the current model has no fast tier.

Speed toggle with the Standard/Fast menu open

The composer's stats row gains a subscription usage pill showing the used percentage and reset window for the provider of the session's current model (Codex for a Codex model, Grok for a Grok model, and so on). It shows at most one provider: when switching to a non-subscription model, it keeps the most recent subscription selected in the mounted conversation view, or stays hidden if there is none. This recent-model history is not persisted across page reloads. Click the pill to expand every logged-in provider and account — the default account is starred, and the current provider is listed first. Antigravity previews only the current model's windows (at most two per account); the other model windows remain available in a closed disclosure.

Settings → Subscriptions → Status-bar quota display selects Current / most recent subscription only (default) or Hidden. The display preference is saved in the current browser, applies immediately, survives reloads, and synchronizes between tabs of the same origin. It does not hide usage details in Settings, change model selection, or change account routing.

Subscription usage pill expanded to show every provider and account

The image_generate tool renders its result inline in the conversation:

image_generate renders the image inline

Its provider parameter picks the image backend — the same prompt through GPT (gpt-image-2, top) and Grok (grok-imagine-image-2.0, bottom):

image_generate with provider gpt vs grok

The video_generate tool plays the generated clip inline:

video_generate plays the clip inline

Providers

RouteSubscriptionModels
codexChatGPT Plus/Prolive catalog from chatgpt.com/backend-api/codex/models
claudeClaude Pro/Maxall models available in your subscription (Opus, Sonnet, Haiku, Fable — static catalog, updated with the plugin)
grokX Premium (xAI)live catalog from api.x.ai/v1/models (chat models only); reasoning efforts from the Grok CLI catalog (cli-chat-proxy.grok.com/v1/models)
copilotGitHub Copilotlive catalog from api.githubcopilot.com/models (chat models on both wires, with per-model vision flags and reasoning efforts); login uses the OAuth device flow (enter the shown code at github.com/login/device)
antigravityGoogle Antigravitylive catalog from Antigravity v1internal:fetchAvailableModels; requests use generateContent / streamGenerateContent with text, image, streaming reasoning, and tool-call conversion

Only logged-in providers appear in the session model picker; the lists above refresh on login/logout. Vision-capable models declare ['text', 'image'] input modalities, and image content is translated to each provider's wire format.

Logged-in cards also show subscription usage — per rate-limit window (5-hour session, weekly, and per-model weekly where the plan has one) with the used percentage, a progress bar, and the reset time, plus a Refresh button. Codex usage comes from chatgpt.com/backend-api/wham/usage (also reports the plan), Claude usage from api.anthropic.com/api/oauth/usage, and Grok usage from the Grok Build CLI proxy's cli-chat-proxy.grok.com/v1/billing (the source of the CLI's /usage panel; reports the shared weekly pool and the subscription tier). Antigravity reports plan, credits, and per-model quotas from loadCodeAssist and fetchAvailableModels when those fields are present. Copilot exposes no usage endpoint, so its card shows no usage section.

Also included, registered when the matching provider is enabled:

  • web_search provider (Codex) — uses Codex's hosted web search through DSH's native tool and citation UI. It follows the default Codex account and the plugin's proxy configuration. It registers as one candidate behind the host's web seam and does not claim it: with no other search provider mounted DSH auto-selects it, and alongside another one you pick the winner with the host's own web.searchProvider setting. Turning Web search off under Codex's Provider tools withdraws this provider, leaving the host's web_search tool to whatever else is registered.
  • x_search tool (Grok) — xAI's hosted X search, returning { answer, citations }.
  • image_generate tool (ChatGPT or Grok) — gpt-image-2 via the Codex backend, or grok-imagine-image-2.0 via api.x.ai/v1/images/generations. The provider argument picks the preferred provider (gpt, the default, or grok); when the preferred one is logged out the other serves as fallback. Images are saved under ~/.dsh/plugins/subscriptions/images/ and the paths returned. The size/quality arguments map onto Grok's aspect_ratio/quality on the Grok path.
  • video_generate tool (Grok) — grok-imagine-video-1.5 via api.x.ai/v1/videos (async submit + poll); MP4s are saved under ~/.dsh/plugins/subscriptions/videos/, the path returned, and the clip plays inline in the conversation. Supports duration (1–15 s), aspect ratio, resolution, and image-to-video via image_url.

image_generate also supports editing: the model passes optional referenceImages (1–5 complete DSH attachment references) to edit or use existing images as sources; omitting it keeps text-to-image generation. References can come from uploads, read_image, or previous generated images. Read local files with read_image first; paths are not attachment references. Copy references from the image reference text or structured tool results. Their order matches the prompt's image order. Edits save new files and return reusable references, including for subsequent edits with another provider.

Codex edits use /backend-api/codex/images/edits; Grok edits use /v1/images/edits. Existing provider preference, logged-out fallback, and session tool policy still apply. Empty arrays, duplicate or invalid references, and attachment-limit violations fail explicitly instead of generating a new image. Editing requires the DSH attachment service.

Image generation and editing share same-provider account scheduling: try the default account first, then prefer the successful account in that session. Explicit quota, authentication, or image-entitlement rejection tries the remaining accounts; a 401 gets at most one credential refresh and retry first. Image-only cooldowns honor provider reset times and clear on login/logout. Transport failures, timeouts, 5xx responses, and invalid requests do not automatically resend, avoiding duplicate images. Set pool.enabled: false or pool.autoAccounts: false (legacy autoFamilies is accepted) to use only the default account. Image scheduling does not use chat catalogs, chat quota scoring, families, or tiers.

Install

DSH compatibility

Version 0.9.7 adds support for DSH 0.2.0-rc.2, with development dependencies pinned to that runtime. It handles request-only messages, first-class tool results, preparing tool views, and offloaded image placeholders while retaining legacy history translation. Other 0.2 prereleases are not implicitly allowed.

The current release supports the published DSH 0.1.1-rc.2, 0.1.2-alpha/rc, 0.1.3-alpha, 0.1.5-alpha/rc, and 0.1.7-rc lines, including 0.1.5-rc.2 and 0.1.7-rc.2. The 0.1.5-alpha.1 peer-range anchor intentionally covers the later 0.1.5-alpha, 0.1.5-rc, and stable 0.1.5 builds under npm semver rules; the 0.1.7-rc.1 anchor likewise covers the later 0.1.7-rc and stable 0.1.7 builds. DSH 0.1.6-alpha and 0.1.7-alpha are not included until they have been separately verified.

Managing accounts and pool models

Open Settings → Subscriptions → provider → Manage to edit account aliases, automatic-pool participation and model allowlists, and independent account model entries. Existing accounts continue using automatic pooling by default. Independent entries stay bound to one account and never fall back to another account when unavailable. These settings govern LLM routing, not image/video/search tool account policies. See Account and model management.

Refreshing model lists

In Settings → Subscriptions → provider → Edit model list, use Refresh to bypass the five-minute catalog cache and refresh the conversation model picker too. This is separate from refreshing subscription usage. If models. is explicitly configured with a non-empty list, that list still overrides discovery.

Codex catalog visibility depends on the client_version request parameter. By default the plugin reads the stable version from the official npm @openai/codex package's public metadata (no CLI installation or subscription credentials sent to npm). Successful lookups are cached in memory for six hours; failures retry after five minutes and retain the last successful version, or the verified 0.153.4 fallback on first use. The lookup has a 5-second deadline, shares in-flight work across accounts, and ignores prerelease or regressed versions. On load the plugin also raises Node's Happy Eyeballs per-address connect attempt timeout to at least 1.5 seconds (never lowering a larger host value), because the 250ms default drops every connection on links where one TCP handshake takes longer than that. Manual model-list refresh also rechecks the version. An explicit plugin configuration field, codexClientVersion: '0.153.4', takes precedence and disables automatic lookup; restart DSH after changing it. Model availability remains account-dependent; see verification notes.

Claude requests present themselves as Claude Code, and the endpoint gates newer models on the Claude Code version (for example, Opus 5.5 requires 2.1.280 or newer). The plugin therefore reads the latest version from the official npm @anthropic-ai/claude-code package's public metadata, with the same caching, deadline, and retry rules as the Codex lookup, and no subscription credentials sent to npm. It never presents a version older than the locally installed claude CLI or the bundled fallback, which is also what it uses while npm is unreachable. Manual model-list refresh also rechecks the version. Settings → Subscriptions shows the version Codex and Claude currently present next to each name, along with its source: the latest on npm, the local CLI, the built-in fallback, or your configured value. A fallback there means the npm lookup is not getting through.

Installation commands

With the dsh CLI available, install from npm (prebuilt artifacts, no build permission needed):

dsh plugin --profile web add dsh-plugin-subscriptions

Or install the sources from GitHub:

dsh plugin --profile web add github:V1ki/dsh-plugin-subscriptions

pnpm will ask you to allow this package's build script on first install (git installs fetch sources, not built artifacts); add the printed key to the profile's pnpm-workspace.yaml:

allowBuilds:
  dsh-plugin-subscriptions: true

and re-run the add. Only grant this to packages you trust — it runs the package's code at install time.

From a local checkout instead:

git clone https://github.com/V1ki/dsh-plugin-subscriptions.git
cd dsh-plugin-subscriptions && pnpm install && pnpm build
dsh plugin --profile web add ./dsh-plugin-subscriptions

Headless-only usage without installing into a profile (log in via the web UI first — the token file is shared):

cp overlay.example.yml overlay.yml   # then edit the name: to this checkout's absolute lib/index.js path
dsh --profile headless --patch /overlay.yml "your task"

Update

Installed from npm:

dsh plugin --profile web update --latest dsh-plugin-subscriptions

Installed from GitHub: re-run the same add github:V1ki/dsh-plugin-subscriptions command — it re-fetches the sources and rebuilds. A linked local checkout just needs git pull && pnpm build in the checkout.

Either way, restart dsh web afterwards so the new version loads.

Use

  1. dsh web, open the printed URL.
  2. Settings → Subscriptions: click Connect on a provider. For Claude, credentials are imported instantly if you have run claude and logged in at least once; without them, Claude authorizes in the browser like the others. For Codex,