Skip to content

[Feature]: Add possibility to use Xiaomi MiMo token plan #14285

@acidkill

Description

@acidkill

Problem or Use Case

Currently there is only option to use api with pay as you go for Xiaomi.
Xiaomi released token plan - which generates an custom api key and assign to one of two endpoints:
https://token-plan-ams.xiaomimimo.com/v1
https://token-plan-cn.xiaomimimo.com/v1

Proposed Solution

when choosing provider Xiaomi user should have possible official API's to choose

change reuire (or it did in my case)
editing auth.json and adding:

"custom:xiaomi-token-plan": [
  {
    "id": "0cxxxx",
    "label": "xiaomi-token-plan",
    "auth_type": "api_key",
    "priority": 0,
    "source": "config:xiaomi-token-plan",
    "access_token": "tp-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "last_status": null,
    "last_status_at": null,
    "last_error_code": null,
    "last_error_reason": null,
    "last_error_message": null,
    "last_error_reset_at": null,
    "base_url": "https://token-plan-ams.xiaomimimo.com/v1",
    "request_count": 0
  }
]

and the upper part of config.yaml to:

model:
default: mimo-v2.5-pro
api_mode: chat_completions
provider: custom:xiaomi-token-plan
base_url: https://token-plan-ams.xiaomimimo.com/v1
xiaomi-token-plan:

  • mimo-v2.5-pro
  • mimo-v2.5

and on the bottom of config.yaml:

custom_providers:

Alternatives Considered

No response

Feature Type

New tool

Scope

None

Contribution

  • I'd like to implement this myself and submit a PR

Debug Report (optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havearea/configConfig system, migrations, profilesprovider/xiaomiXiaomi MiLMtype/featureNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions