Bundle
dsh-providers
Model providers for DeepSeek Harness: sign in with OAuth or an API key, and keep every provider's model catalog current
- Source
- tyql688
- stars
- 1 stars
- License
- MIT
- Updated
- Updated 3 days ago
Readme
# dsh-providers **English** · [简体中文](README.zh.md) A [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) plugin that manages model providers: sign in, keep the model list current, see what you spend, and know how much plan quota is left. Built on [`@earendil-works/pi-ai`](https://www.npmjs.com/package/@earendil-works/pi-ai) and [`@lobehub/icons`](https://github.com/lobehub/lobe-icons). ## Features **Accounts** (Settings → Accounts) - Sign in with OAuth or an API key. Signed-in providers' models appear in the model picker. - Keep several accounts of one provider signed in at once — OAuth logins, and for API-key providers the keys you replaced: an older key is kept as an account and can be made the default again. Re-logging a known account updates it in place; a new one joins the list. The default account serves requests, and switching takes effect on the next request. - Refresh a provider's model list from the curated catalog, or read an OpenAI-compatible `/v1/models` endpoint. - Import the OpenAI Codex CLI's existing login instead of signing in again. - Reveal a stored API key, sign out, and remove the route in one step. **Tokens today** (sidebar card) - Today's tokens, estimated cost, the 14-day trend, and the input / output / cache mix. - One bar per account of a plan provider — the provider's name alone when it holds one — showing its fullest window (5-hour, weekly, monthly). - A one-time warning when a window reaches 90%. **Usage** (conversation tab) - Windows: today, 7 / 30 / 90 days, all time, with change against the previous period. - Overview: tokens, cost, cache hit rate, daily trend by total / model / token kind / cost, mix donut. - Chips: active days, peak day, daily average, reasoning share, subagent share, failed turns. - Breakdown: per model (share, tokens, calls, first-token p50 · p95, cost), per provider, recent sessions, projects, tools with error rate. Click a row to list the sessions behind it. - Activity: GitHub-style calendar, hour-of-day heatmap, and a day table with failed turns and median first-token latency. - Enter a price for any model the catalog does not price; figures re-price immediately. **Quota** (conversation tab) - One card per signed-in provider whose usage API the plugin can read — one per account when a provider holds several. - Subscription plans (OpenAI Codex, Kimi For Coding, OpenCode Go, Z.AI / GLM, MiniMax): each 5-hour / weekly / monthly window with a colored bar, reset countdown, and — once two readings exist — how long until it runs out at the current pace. - Pay-as-you-go accounts (OpenRouter, DeepSeek, Moonshot Open Platform): remaining balance. - Queries go from this machine to the provider's own API with the stored credential. Only percentages and balances reach the browser. **Stats** (per-session tab) - The session's own tokens, cost, calls, tool calls, cache hit rate, context peak, and per-call timeline. - Subagents listed and rolled up separately. Nothing polls in the background: the sidebar card refreshes on open and when the page becomes visible again; the tabs fetch when opened. ## Providers pi-ai 0.84.4: - **OAuth**: Anthropic, GitHub Copilot, Kimi For Coding, OpenAI Codex, OpenRouter, Radius, xAI - **API key**: Amazon Bedrock, Ant Ling, Azure OpenAI, Baseten, Cerebras, Cloudflare AI Gateway, Cloudflare Workers AI, DeepSeek, Fireworks, Google, Google Vertex AI, Groq, Hugging Face, MiniMax / MiniMax CN, Mistral, Moonshot AI / CN, NVIDIA, OpenAI, OpenCode Zen / Go, Qwen Token Plan (×3), Together, Vercel AI Gateway, Xiaomi (×4), Z.AI / Z.AI Coding CN ## Install ```sh dsh plugin --profile web add github:tyql688/dsh-providers ``` The first `add` usually fails with `ERR_PNPM_IGNORED_BUILDS` for `@google/genai` and `protobufjs`. Both come with pi-ai; this plugin never runs their install scripts. Deny both, then run the same `add` again: ```sh dsh plugin --profile web approve-builds '!@google/genai' '!protobufjs' dsh plugin --profile web add github:tyql688/dsh-providers ``` From a local clone: ```sh git clone https://github.com/tyql688/dsh-providers.git cd dsh-providers pnpm install dsh plugin --profile web add "$PWD" ``` Uninstall: ```sh dsh plugin --profile web remove dsh-providers ``` ## Files All under `$DSH_HOME` (default `~/.dsh`): | File | Holds | |---|---| | `auth.json` | OAuth tokens; the archived earlier keys of API-key providers | | `.credentials.yaml` | API keys | | `model-catalog.json` | Cached model catalog, including prices | | `prices.json` | Prices you entered by hand | | `settings.yaml` | Provider routes | Keys from environment variables are never stored. Secrets never appear in logs. An API key reaches the browser only when you click reveal; OAuth tokens never do. Verified against `@deepseek-ai/dsh@0.1.1-rc.2`, Node 22+. ## Development ```sh pnpm install pnpm build # rebuild lib/ (committed) after any source change pnpm check # oxlint + tsc + knip ```
Install
dsh plugin --profile web add github:tyql688/dsh-providers
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-providers from the hub
- This package builds from source on install. pnpm will ask you to allow its build script — that is permission to run the package’s code on your machine, outside the agent sandbox. Only allow sources you trust.
- This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.