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.

AI Analysis

核心用途是免去重复配置 API 密钥。适合已经在本地开发环境中配置并登录了 Codex 或 Claude 官方工具链的用户。

Package
dsh-llm-local-token
Version
1.2.0
License
MIT
Last updated
Aug 17, 2026

Install

This plugin has no verified bundle, or compatibility checks failed. Read the repository notes first. Read the full 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.