Skip to content

Feature Request: Support Xiaomi MiMo Token Plan API Endpoint & Pricing Model #2621

@springeye

Description

@springeye

Is your feature request related to a problem? Please describe.

CodeWhale already ships a xiaomi/mimo provider for the standard MiMo API (pay-as-you-go), which works well for on-demand usage. However, Xiaomi's newly launched Token Plan subscription model (Lite / Standard / Pro / Max tiers at ¥39–¥659/month) uses a separate API endpoint and authentication scheme that is currently not supported.

Users who purchase a Token Plan subscription cannot use their Token Plan credentials with the existing MiMo provider — the base URL, auth flow, and model resolution paths differ from the standard API. This forces Token Plan subscribers to either:

  • Manually configure a custom OpenAI-compatible endpoint (losing provider-specific optimizations like model lists, rate-limit awareness, and cost tracking), or
  • Continue paying for pay-as-you-go even though they've already subscribed to a Token Plan.

Describe the solution you'd like

Extend the existing xiaomi/mimo provider to support the Token Plan API as a sub-mode or alternative endpoint:

  1. Token Plan API endpoint: Add the official Token Plan base URL as an alternative endpoint option alongside the standard API endpoint
  2. Auth credentials: Support Token Plan-specific API keys (issued from the Token Plan console at platform.xiaomimimo.com/token-plan)
  3. Mode switch: Allow users to choose between "Standard (pay-as-you-go)" and "Token Plan (subscription)" via config — e.g. a config field like provider.xiaomi.mode = "token-plan"
  4. Model resolution: Token Plan subscribers get access to MiMo-V2.5-Pro, MiMo-V2.5, and TTS models — auto-discover or list these models specifically for Token Plan mode
  5. Cost tracking: Since Token Plan uses a credit/point system rather than per-token billing, the cost display should reflect remaining credits rather than token-based cost
  6. Rate-limit awareness: Respect Token Plan tier-specific rate limits

Describe alternatives you've considered

  • Manual OpenAI-compatible endpoint override: Already possible via custom config, but loses CodeWhale's model list discovery, rate-limit tracking, and cost accounting features
  • MCP proxy bridge: A custom MCP server could bridge the Token Plan API, but adds unnecessary complexity and maintenance burden
  • OpenRouter fallback: OpenRouter carries MiMo models but routes through standard API pricing, negating the Token Plan subscription benefit

None of these provide the same UX as a first-class Token Plan mode within the existing MiMo provider.

Additional context

  • CodeWhale already has excellent MiMo standard API support — this request is purely about adding the Token Plan variant as a sub-mode
  • Xiaomi MiMo Token Plan official site: https://platform.xiaomimimo.com/token-plan
  • MiMo API docs: https://platform.xiaomimimo.com/docs
  • Token Plan has seen rapid adoption since launch, and many Chinese developers now access MiMo models exclusively through Token Plan subscriptions
  • I'm happy to help test Token Plan integration once a prototype is available

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Projects

    Status
    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions