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:
and on the bottom of config.yaml:
custom_providers:
Alternatives Considered
No response
Feature Type
New tool
Scope
None
Contribution
Debug Report (optional)
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:
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:
and on the bottom of config.yaml:
custom_providers:
base_url: https://token-plan-ams.xiaomimimo.com/v1
api_key: tp-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
model: mimo-v2.5-pro
Alternatives Considered
No response
Feature Type
New tool
Scope
None
Contribution
Debug Report (optional)