Skip to content

[Feature]: Add ASR modality and Xiaomi MiMo Token Plan preset #1430

Description

@Jamartin-create

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

  1. 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.
  2. 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

  • A user can select the Xiaomi MiMo Token Plan preset, paste one tp-... key, and have LLM + TTS + ASR all configured and enabled in one click
  • The Token Plan settings page shows an ASR tab for presets that declare it
  • Removing the plan clears the key and disables all three modalities
  • Existing presets (MiniMax, Volcengine Ark) behave exactly as before

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions