GooDAnDReaDY/dsh-subscriptions ↗★ 6

@goodandready/dsh-subscriptions

Use ChatGPT Codex, Claude, Grok, Antigravity, Kimi, GLM, Cursor, Kiro, Copilot, Qwen, ERNIE, Spark, JetBrains, Perplexity, Replit, and Cody subscriptions as DeepSeek Harness LLM providers via OAuth. 适合拥有多平台AI订阅并希望在系统内统一调用的用户。

パッケージ
@goodandready/dsh-subscriptions
互換性
未検証
Harness ピア範囲
^0.1.0-rc.6
Cordis ピア範囲
^4.0.1
バージョン
0.6.18
ライセンス
MIT
最終更新
2026/09/22

インストール

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

ドキュメント

README 全文を読む ↗

⚙️ Configuration Reference (settings.yaml)

dsh-subscriptions:
  switchAtRemaining: 1
  cooldownMs: 60000
  autoLoopback: true        # v0.4.9: catch loopback OAuth callbacks automatically
  privacyMask: false        # v0.4.9: mask emails and account identifiers in the UI
  ollamaBaseUrl: http://127.0.0.1:11434  # v0.4.17: local Ollama gateway
  ollamaFallback: true      # v0.4.17: seamless fallback when all accounts are exhausted
  ollamaFallbackModel: ''   # v0.4.17: e.g. qwen2.5-coder; empty = first model from /api/tags
  hideDeprecatedModels: false # v0.4.17: filter test/preview/beta/legacy model ids
  codexVerbosity: ''        # v0.4.17: low | medium | high (text.verbosity)
  codexFastMode: false      # v0.4.17: service_tier priority (1.5x speed tier)
  composerQuota: 'off'      # v0.4.18: composer indicator: off | percent | bar | forecast
  # Per-slot fields (v0.4.9): expiresAt (ms epoch), proxyUrl (http/https/socks5://)
  accounts:
    codex:
      - ref: CODEX_OAUTH_1
        label: "Work Pro Account"
      - ref: CODEX_OAUTH_2
        label: "Personal Plus Account"
    claude:
      - ref: CLAUDE_OAUTH_1
        label: "Claude Max"
    grok:
      - ref: GROK_OAUTH_1
        label: "X Premium"

🛡️ Token Usage Normalization & Session Projection Fix (Added in v0.6.12)

  • Session Projection Fix (GitHub #4): Fixed an issue where ChatGPT Codex and other streaming provider responses caused DSH session recovery to fail on page reload with received NaN, expected number on uncachedInputTokens and outputTokens.
  • Canonical TokenUsage Normalization: Introduced toTokenUsage() across all streaming pipelines (codexResponsesStream, openaiChatStream, anthropicStream, and googleStream) to map raw vendor usage payloads into canonical DSH TokenUsage (inputTokens, outputTokens, cacheReadTokens, cacheWriteTokens, reasoningTokens, totalTokens).
  • Strict Integer Guard: All token counts are strictly guarded to non-negative finite integers (guaranteeing 0 fallback, never NaN or undefined). Disjoint uncached token calculation is performed when cached tokens are folded into prompt totals.
  • Defense in Depth: Added adapter-level stream validation in SubscriptionAdapter to prevent malformed or invalid token usage chunks from ever reaching DSH session persistence.