Problem or Motivation
The Token Plan framework (lib/config/token-plan-presets.ts) is explicitly data-driven — adding a vendor is supposed to be "one entry here, no code changes" — but its modality set is fixed to llm | image | video | tts | webSearch, and ASR is called out in a comment as deliberately omitted ("ASR is omitted = not adapted").
Xiaomi MiMo's Token Plan is exactly the kind of plan the framework exists for: one tp- key authenticates against regional Token Plan clusters (token-plan-cn/sgp/ams.xiaomimimo.com) and covers LLM (mimo-v2.5-pro, mimo-v2.5), TTS (mimo-v2.5-tts family), and ASR (mimo-v2.5-asr). Without an ASR modality, one third of the plan's value is unreachable through the one-click apply flow, and users must hand-fill the ASR provider afterwards.
Proposed Solution
- Add
'asr' to the modality framework:
TokenPlanModality and MODALITY_ORDER gain 'asr'.
apply-token-plan.ts: TokenPlanActions gains setASRProviderConfig; applyModality / removeModality handle asr symmetrically to tts (fill key + base URL + default model on apply; clear and disable on remove).
- Settings UI (
token-plan-settings.tsx): an ASR tab with a microphone icon and the existing settings.asrSettings label, actions wired through.
- Add the
xiaomi-mimo preset (category: 'token_plan'):
llm → provider xiaomi, https://token-plan-cn.xiaomimimo.com/v1, curated models mimo-v2.5-pro, mimo-v2.5
tts → provider xiaomi-tts, same base URL, default model mimo-v2.5-tts
asr → provider xiaomi-asr, same base URL, default model mimo-v2.5-asr
apiKeyPlaceholder: 'tp-...', icon /logos/xiaomi.svg, link https://mimo.mi.com
- A comment documents that
tp- keys authenticate only against Token Plan hosts (the pay-as-you-go api.xiaomimimo.com host rejects them), and that users in other regions can switch the base URL to the SGP/AMS cluster after applying.
Acceptance Criteria
Alternatives Considered
- Ship the preset without the ASR modality: leaves the framework's "one key, every modality" promise half-kept for this vendor, and the ASR gap would need exactly this framework change later anyway.
Area
Model / provider integration
Additional Context
Problem or Motivation
The Token Plan framework (
lib/config/token-plan-presets.ts) is explicitly data-driven — adding a vendor is supposed to be "one entry here, no code changes" — but its modality set is fixed tollm | image | video | tts | webSearch, and ASR is called out in a comment as deliberately omitted ("ASR is omitted = not adapted").Xiaomi MiMo's Token Plan is exactly the kind of plan the framework exists for: one
tp-key authenticates against regional Token Plan clusters (token-plan-cn/sgp/ams.xiaomimimo.com) and covers LLM (mimo-v2.5-pro,mimo-v2.5), TTS (mimo-v2.5-ttsfamily), and ASR (mimo-v2.5-asr). Without an ASR modality, one third of the plan's value is unreachable through the one-click apply flow, and users must hand-fill the ASR provider afterwards.Proposed Solution
'asr'to the modality framework:TokenPlanModalityandMODALITY_ORDERgain'asr'.apply-token-plan.ts:TokenPlanActionsgainssetASRProviderConfig;applyModality/removeModalityhandleasrsymmetrically totts(fill key + base URL + default model on apply; clear and disable on remove).token-plan-settings.tsx): an ASR tab with a microphone icon and the existingsettings.asrSettingslabel, actions wired through.xiaomi-mimopreset (category: 'token_plan'):llm→ providerxiaomi,https://token-plan-cn.xiaomimimo.com/v1, curated modelsmimo-v2.5-pro,mimo-v2.5tts→ providerxiaomi-tts, same base URL, default modelmimo-v2.5-ttsasr→ providerxiaomi-asr, same base URL, default modelmimo-v2.5-asrapiKeyPlaceholder: 'tp-...', icon/logos/xiaomi.svg, link https://mimo.mi.comtp-keys authenticate only against Token Plan hosts (the pay-as-you-goapi.xiaomimimo.comhost rejects them), and that users in other regions can switch the base URL to the SGP/AMS cluster after applying.Acceptance Criteria
tp-...key, and have LLM + TTS + ASR all configured and enabled in one clickAlternatives Considered
Area
Model / provider integration
Additional Context
xiaomi-tts/xiaomi-asrprovider implementations (referenced by string id, so this compiles independently; suggested merge order: after [Feature]: Support Xiaomi MiMo TTS and ASR providers #1429).