tianxia--/dsh-llm-local-token0

dsh-llm-local-token

DeepSeek Harness plugin: serve LLM calls with the OAuth tokens your local Codex CLI and Claude Code already hold, instead of a separately configured API key.

包名
dsh-llm-local-token
版本
1.2.0
许可证
MIT
最近更新
2026年8月17日

安装

此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗

Configuration

All keys are optional; the defaults match a stock CLI install.

KeyDefaultMeaning
codexAuthPath$CODEX_HOME/auth.json, else ~/.codex/auth.jsonCodex credential file
claudeAuthPath~/.claude/.credentials.jsonLegacy Claude Code credential file
claudeKeychainServiceClaude Code-credentialsmacOS Keychain service holding the Claude OAuth payload
requireClaudefalseFail activation when no Claude credential is found, instead of skipping the route
codexTransport"sse"Streaming transport for the Codex route: sse / websocket / websocket-cached / auto. The quota badge depends on sse: pi-ai's default auto streams over WebSocket, and the x-codex-* quota headers exist only on the SSE response, so the badge stays empty under WS. Set auto to prefer WebSocket and accept no Codex quota data.

Subscription usage badge

Both providers return their quota state in response headers, so the plugin reads it for free — no polling, no extra endpoint hits. A badge appears in the composer bar next to the context ring; click it for the breakdown.

ProviderHeaders readShown
openai-codexx-codex-primary-*, x-codex-secondary-*, x-codex-plan-type, x-codex-credits-balanceplan, used % per window, reset countdown, credit balance
anthropicanthropic-ratelimit-unified-{5h,7d}-{utilization,reset,status}used % for the 5-hour and 7-day windows, reset countdown

The badge is green under 60%, amber under 85%, red above. Usage is whatever the last real request reported, so a freshly started host shows "no data yet" until you send one message. The browser half polls GET /llm-local-token/usage every 15s; that route only reads the in-memory snapshot.

The badge shows only the provider serving the currently selected model: pick Codex and you see Codex's windows, switch to Claude and it swaps — the two are never mixed into one number. When the selected model belongs to another adapter (a plain API key, another plugin) the badge hides itself, because that quota is not this plugin's to report. The popover still lists every route, with the active one first and marked "current" and the rest dimmed. The selection comes from ctx.modelDirectories; a composition without that service (non-Web) falls back to the previous union-of-all-routes view.