Files
9router/open-sse/providers/registry/xiaomi-tokenplan.js
T
decoluaandCursor d3f61aac2f refactor(open-sse): translator DRY + schema enums, bug fixes, dead code cleanup
- Bug B1-B7: media UI m.kind||m.type, serviceKinds, gemini mediaPriority, schema kind, models/info lookup by kind
- Dead code D1-D6: safeParseJSON, drop PROVIDER_ENDPOINTS, orphan fetcher, GITHUB_CONFIG derive, getProviderConfig internal, legacy kiro file
- Translator concerns: toOpenAIUsage, toOpenAIFinish (gemini/kiro/ollama + fix kiro tool finish), thinking effort maps
- Reorg helpers/ → concerns/ (logic) + formats/ (per-format) + schema/ (pure enums: roles/blocks/finishReasons/defaults)
- Wire ~280 hardcoded role/block/finish/default literals to schema enums across 20+ files
- collapseTextParts + extractTextContent dedup
- Normalize translator fn names to openaiToXRequest / xToOpenAIResponse
- Golden tests lock behavior; 0 regression (byte-for-byte providers/alias, 26=26 known fails)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-14 18:49:38 +07:00

44 lines
1.5 KiB
JavaScript

export default {
id: "xiaomi-tokenplan",
priority: 300,
alias: "xiaomi-tokenplan",
aliases: [
"xmtp",
],
uiAlias: "xmtp",
display: {
name: "Xiaomi MiMo (Token Plan)",
icon: "smart_toy",
color: "#FF6700",
textIcon: "XT",
website: "https://mimo.xiaomi.com",
notice: {
text: "Xiaomi MiMo Token Plan subscription (API key starts with tp-). Token Plan keys are cluster-specific — select the region matching your subscription.",
apiKeyUrl: "https://mimo.xiaomi.com",
},
},
category: "apikey",
hasProviderSpecificData: true,
defaultRegion: "sgp",
transport: {
baseUrl: "https://token-plan-sgp.xiaomimimo.com/v1/chat/completions",
regions: {
sgp: "https://token-plan-sgp.xiaomimimo.com/v1",
cn: "https://token-plan-cn.xiaomimimo.com/v1",
ams: "https://token-plan-ams.xiaomimimo.com/v1",
},
defaultRegion: "sgp",
},
models: [
{ id: "mimo-v2.5-pro", name: "MiMo V2.5 Pro" },
{ id: "mimo-v2.5-pro-claude", name: "MiMo V2.5 Pro (Claude Native)", targetFormat: "claude", upstreamModelId: "mimo-v2.5-pro" },
{ id: "mimo-v2.5", name: "MiMo V2.5" },
{ id: "mimo-v2-pro", name: "MiMo V2 Pro" },
{ id: "mimo-v2-omni", name: "MiMo V2 Omni" },
{ id: "mimo-v2-tts", name: "MiMo V2 TTS" },
{ id: "mimo-v2.5-tts", name: "MiMo V2.5 TTS" },
{ id: "mimo-v2.5-tts-voiceclone", name: "MiMo V2.5 TTS Voice Clone" },
{ id: "mimo-v2.5-tts-voicedesign", name: "MiMo V2.5 TTS Voice Design" },
],
};