Introduction¶
DeepSeek Harness (DSH) adopts a plugin-based architecture. When developers use Ollama Cloud for service invocations, they often need to monitor quota consumption on their own. Currently, there is no convenient way to directly view account usage in the Web chat interface.
The dsh-plugin-ollama-usage plugin embeds a panel in the DSH Web interface to display Ollama Cloud account usage (5-hour rolling window / weekly), and provides configuration for baseURL and credential mode. It is maintained by CJ-SH and licensed under MIT.
Core Features¶
This plugin provides the following capabilities:
- Visual panel: Displays a panel below the composer of the current active session, and also displays another panel on the new session (Hero) page. Both panels have the same content.
- Usage statistics: Reports usage percentage for the session (5-hour rolling) and weekly windows, refreshing every 5 minutes by default.
- Read-only access: The plugin does not touch provider configuration or initiate any conversations; it only reads account usage data.
- Credential modes: Supports two modes: reusing an existing Ollama key or using a plugin-specific key.
Installation and Enablement¶
Before installation, ensure the environment meets the following requirements:
- dsh version 0.2.0-rc.1 (with the web profile enabled).
- Node.js version ^22.19.0 or >=24.0.0.
- A valid Ollama Cloud API Key is configured.
Install it using the official command:
dsh plugin --profile web add github:CJ-SH/dsh-plugin-ollama-usage
The plugin is loaded when dsh starts. After installation, it is recommended to restart dsh to ensure the configuration takes effect.
Configuration and Usage¶
The configuration entry is located under “Ollama Usage” on the Settings page, and the configuration file can also be edited directly.
Configuration file path: ~/.dsh/profiles/<profile>/cordis.patch.yml
Under the configuration block - id: ollama-usage, the following fields can be set:
baseURL: The Ollama Cloud API endpoint.credentialMode: The credential mode.apiKeyEnv: The environment variable name.
Credential mode description:
credential mode(reference, default): Reuses an existing environment variable (default isOLLAMA_API_KEY). This mode does not modify existing key configuration.key mode(direct): Only writes the plugin’s own referenceOLLAMA_USAGE_API_KEY.
Notes¶
- Uninstall behavior: Uninstalling the plugin does not automatically remove configuration and credentials. To remove it completely, manually delete the
- id: ollama-usageblock fromcordis.patch.yml. - Error handling: When credentials are missing, the endpoint is inaccessible, or the response format is invalid, the panel disappears silently without displaying placeholders or error messages.
- Ecosystem positioning: This plugin provides this service by calling Ollama public APIs and is not affiliated with DeepSeek or Ollama officially.
Summary¶
dsh-plugin-ollama-usage solves the problem of lacking intuitive Ollama Cloud usage monitoring during DSH development. By embedding a read-only panel in the Web interface, developers can more conveniently track resource consumption.