dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
Ollama Cloud account usage for the dsh web chat: composer dock panel, hero panel, and a Plugin configuration card.
English | 中文
Shows Ollama Cloud account usage (5-hour rolling window / weekly) on the
dsh Web chat page, and provides
a baseURL / credential-mode configuration.
session (5-hour rolling) and weekly windows as percentages, refreshed every 5 minutes by default; credit-plan accounts report a monthly window instead.200 whose shape cannot be read is called out on the Settings page.Requirements: dsh with the web profile (tested with 0.2.0-rc.1), Node ^22.19.0 || >=24.0.0, and a working Ollama Cloud API key.
This package is a dsh bundle: installing it appends the bundle to the profile and applies its patch layer.
dsh plugin --profile web add github:CJ-SH/dsh-plugin-ollama-usage
git clone https://github.com/CJ-SH/dsh-plugin-ollama-usage
dsh plugin --profile web add ./dsh-plugin-ollama-usage
link: installs need one extra stepA plugin installed through link: lives outside the profile, so the profile's install closure has to be linked into the package (idempotent; unnecessary for a materialized install):
npm run link-imports
Do not use npm install to install the @deepseek-ai/schemastery peer — copying it breaks module identity.
The plugin loads at startup, so restart dsh after installing; dsh --profile web --dump-config | grep ollama-usage gives you a pre-flight check.
The panel appears below the composer in the active session and on the new-session (hero) page:
Active session · below composer session 26% · weekly 6%
New session (hero) the same panel
Configuration baseURL / credential mode / key
The configuration entry point is the "Ollama Usage" page in Settings (the Settings page the plugin registers; merged into the hub panel when the suite hub is installed),
or you can edit the config: block of - id: ollama-usage directly in ~/.dsh/profiles/<profile>/cordis.patch.yml
(fields baseURL / credentialMode / apiKeyEnv).
dsh plugin --profile web remove dsh-plugin-ollama-usage
reference, the default) reuses an existing apiKeyEnv (default OLLAMA_API_KEY) and this plugin cannot write to it; key mode (direct) writes only its own reference, OLLAMA_USAGE_API_KEY.GET {baseURL}/api/balance (Authorization: Bearer <key>): legacy plans report remaining_percent and resets_at for session/weekly, and the panel shows the used percentage and the absolute reset time; credit plans report a monthly allowance balance and are shown as a monthly window./api/usage returns only per-day request / cost / token buckets and no per-model breakdown (the official API has no successor endpoint for it).- id: ollama-usage block from the profile patch by hand if you want them gone.Contracts, troubleshooting, and internals are in docs/design-notes.md.
MIT © 2026 HenTaiCJN
Ollama is a product of Ollama Inc.; this plugin is not affiliated with it and only calls its public API.