dsh-mimo-extension: View Xiaomi MiMo Quota and Usage in DSH Web

Preface

When using DeepSeek Harness (DSH) with Xiaomi MiMo, checking the remaining plan quota, pay-as-you-go balance, and the actual MiMo consumption within the current session usually requires opening a separate console or manual tracking. While the conversation page already features usage rings for channels like codebuddy next to the model selector, MiMo lacks an equivalent entry. This article introduces the community plugin dsh-mimo-extension (maintained by upcyan), which adds a Quota Ring and a MiMo Usage details page to the Web client, integrating official quota and session-attributed statistics into a single interface.

What is this

dsh-mimo-extension is a Web client plugin for DSH (injected via @deepseek-ai/dsh-client-ui-conversation). Its positioning can be summarized in one sentence: it displays a plan remaining percentage ring with a mi logo next to the model selector and provides a MiMo Usage Tab showing billing type, plan/balance, current session MiMo usage, daily and historical trends, cost estimates, etc.

The plugin belongs to the GitHub repository upcyan/dsh-mimo-extension, with a community directory page at skillhub.cn/plugins/upcyan/dsh-mimo-extension. The DSH ecosystem is “everything is a plugin”; SkillHub is an independent community directory and has no official affiliation with DeepSeek or Hithink RoyalFlush.

The current package version is 1.1.21, licensed under MIT, requiring Node ^22.19.0 || >=24.0.0.

Core Features

Quota Ring and Summary Card

Entry Display Content
Quota Ring The mi logo is embedded within the ring, representing the plan remaining percentage. For pay-as-you-go models without a total quota, only an empty ring is drawn to avoid displaying misleading 0% or 100% figures.
Click Quota Ring Usage summary: billing type, remaining quota or session tokens, percentage used this month and absolute value of used quota (Credits), total plan quota, request count, current model; a link to the details page is available at the bottom.

The ring’s dimensions are aligned with the dsh-codebuddy usage ring (diameter 26, line width 3) for visual consistency when placed side-by-side. The progress and border use platform theme variables, while the logo uses Xiaomi’s brand orange #ff6900.

MiMo Usage Details Page

The details page includes: current model, billing type, current session MiMo usage, today’s and historical usage, cost estimates, usage trends and forecasts. Forms at the bottom of the page allow configuration of Cookie, quota ring position, toolbar wrapping, visual routing, etc.

Display Ring Only on MiMo Channels

The quota ring is bound to the MiMo channel: it renders only when the current model belongs to MiMo, similar to the codebuddyUsageVisible mechanism in dsh-codebuddy. The determination is based on the API address (domain xiaomimimo.com indicates MiMo); if the address cannot be read, it falls back to checking if the provider/model name contains mimo / xiaomi*. When using other providers like codebuddy, the ring is not rendered to avoid false reporting of MiMo quota. The details page can still display account-level plan information under non-MiMo models, marked as “Current model is not MiMo”; it can also be configured to hide the entire Tab when not using MiMo.

Session Usage Attribution by Channel

If a session mixes multiple providers, session.totalTokens does not equal MiMo usage. The plugin aggregates only the MiMo portion based on models[].provider; when mixed, it lists non-MiMo channels and marks them as “not included in the summary above”. If MiMo is not used at all in the current session, it clarifies that the session usage being 0 is normal, and the plan quota below remains account-level.

Optional: MiMo Visual Routing (Image Input)

The platform intercepts images based on the model’s inputModalities; after enabling “Enable MiMo Visual Routing”, for Xiaomi models in the catalog that have declared image capabilities (e.g., mimo-v2.5), the plugin writes the corresponding model’s input in llm-pi-ai as ["text","image"]. Pure text models (e.g., mimo-v2.5-pro) are not modified by default; the sub-option “Provide visual capability for pure text models simultaneously” is an unauthorized declaration and should only be enabled if you confirm the upstream can read images.

Installation and Activation

Install under the web profile (commands from the repository README):

# Install from GitHub
dsh plugin --profile web add github:upcyan/dsh-mimo-extension

# Or install the pre-built package from Release
dsh plugin --profile web add \
  https://github.com/upcyan/dsh-mimo-extension/releases/latest/download/dsh-mimo-extension.tgz

After installation, restart dsh web and refresh the browser. Confirm the installation location:

P="$DSH_HOME/profiles/web"
grep '"dsh-mimo-extension"' "$P/package.json"
dsh --profile web --dump-config | grep -A2 mimo-extension    # Should print id: mimo-extension

Two environmental notes (unrelated to plugin logic but common pitfalls):

  1. Explicitly set DSH_HOME. If unset, dsh falls back to ~/.dsh; installing in a root shell will place it in /root/.dsh/profiles/web, appearing as a successful installation but with no UI change.
  2. pnpm 11 might require --config.minimumReleaseAge=0, otherwise install may be blocked by the 24-hour minimum release age policy if the lockfile contains newly published packages.

If the profile directory is read-only, manual installation instructions are available at the end of the README.

Typical Usage

Filling in the Cookie is required to read the official Token Plan APIs (tokenPlan/detail, tokenPlan/usage); for pay-as-you-go users, filling in the Cookie mainly allows reading the balance.

Steps to obtain:

  1. Log in to https://platform.xiaomimimo.com
  2. DevTools → Network → Any /api/v1 request → Headers → Copy the complete Cookie
  3. Confirm it contains api-platform_serviceToken and userId, paste it into the form at the bottom of the “MiMo Usage” page and save.

You can also write it to refs.MIMO_CONSOLE_COOKIE in $DSH_HOME/.credentials.yaml, or edit mimo.cookie in cordis.patch.yml. The Cookie is stored locally in the dsh-mimo-extension namespace of settings.yaml and is not sent back to the browser in plaintext.

If the Cookie is not configured, the plan remaining percentage cannot be read (tokenPlan/* returns 401), and the interface falls back to estimation fields such as the local fallback plan total.

2. Adjust Quota Ring Position

Select the Quota Capsule Position in the details page form; changes take effect immediately upon saving:

Value Position
header Right action area of the title row
toolbar (Default) Input box toolbar, next to the model selector
above Occupies a full line above the input box
hidden Do not display the ring, keep only the details page

3. View Usage

When the current model is MiMo, view the remaining percentage on the ring in the toolbar (or your configured position); click the ring to see the summary card, then enter the MiMo Usage Tab to view session attribution, history, and forecasts. On mobile devices (width less than 640px), text on the ring can be hidden leaving only the value, and the details page switches to a single-column layout.

Use Cases and Notes

Who it is for: Developers who use Xiaomi MiMo (pay-as-you-go or Token Plan) in DSH Web daily and want to view account quotas and session-internal MiMo consumption directly on the conversation page, alongside the codebuddy usage ring.

Runtime and Trust: The plugin runs with the current dsh process permissions; please review the source code and MIT license before installation. The Cookie is stored locally only, but it remains a sensitive credential; do not paste it in untrusted environments.

Data Boundaries: Official data depends on Xiaomi platform APIs and a valid Cookie; local estimations apply when APIs fail or the Cookie is not configured. Visual routing modifies the model input declaration in the llm-pi-ai namespace; incorrectly enabling image capabilities for pure text models may cause the upstream to silently drop images.

Conclusion

dsh-mimo-extension integrates the MiMo quota ring, summary card, and usage details into the DSH Web client, distinguishing session statistics by provider, reducing the repetitive labor of “switching consoles + mental math for mixed-model sessions”. Refer to the README for installation and configuration.

  • Community Directory: https://www.skillhub.cn/plugins/upcyan/dsh-mimo-extension
  • GitHub: https://github.com/upcyan/dsh-mimo-extension
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye