-
Notifications
You must be signed in to change notification settings - Fork 729
fix(provider): clamp Xiaomi MiMo public reasoning tiers #1485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2323,6 +2323,24 @@ export const PROVIDER_REGISTRY: readonly ProviderRegistryEntry[] = [ | |
| noVisionModels: OPENCODE_ZEN_TEXT_ONLY_MODELS, | ||
| }, | ||
| { id: "xiaomi", label: "Xiaomi MiMo", baseUrl: "https://api.xiaomimimo.com/anthropic", adapter: "anthropic", authKind: "key", dashboardUrl: "https://xiaomimimo.com", defaultModel: "mimo-v2.5-pro" }, | ||
| // Xiaomi's public OpenAI-compatible endpoint is a distinct transport from both the Anthropic | ||
| // preset above and the paid token-plan host below. Keep a separate fixed-destination contract | ||
| // so existing custom providers are never retargeted while the official route receives the | ||
| // strict reasoning ladder its validator enforces (#1483). | ||
| { | ||
| id: "xiaomi-mimo", | ||
| label: "Xiaomi MiMo (OpenAI Chat)", | ||
| baseUrl: "https://api.xiaomimimo.com/v1", | ||
| adapter: "openai-chat", | ||
| authKind: "key", | ||
| dashboardUrl: "https://platform.xiaomimimo.com/console/balance", | ||
| defaultModel: "mimo-v2.5", | ||
| models: ["mimo-v2.5"], | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
For users selecting this new static preset, AGENTS.md reference: src/AGENTS.md:L18-L18 Useful? React with 👍 / 👎. |
||
| reasoningEfforts: ["low", "medium", "high"], | ||
| reasoningEffortMap: { xhigh: "high", max: "high", ultra: "high" }, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a Responses request explicitly sets AGENTS.md reference: src/AGENTS.md:L18-L18 Useful? React with 👍 / 👎. |
||
| preserveCustomDestination: true, | ||
| note: "Official Xiaomi MiMo OpenAI-compatible Chat endpoint. The upstream validator accepts reasoning_effort none/low/medium/high; higher Codex tiers are clamped to high.", | ||
| }, | ||
| { id: "kilo", label: "Kilo", baseUrl: "https://api.kilo.ai/api/gateway", adapter: "openai-chat", authKind: "key", dashboardUrl: "https://kilo.ai" }, | ||
| { | ||
| id: "mimo-free", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Document the Xiaomi MiMo reasoning contract.
The new rows identify the endpoint, but they do not state that Xiaomi MiMo supports only
low,medium, andhigh. They also do not state thatxhigh,max, andultraare clamped tohigh. Users can otherwise select a tier that the CLI silently changes.docs-site/src/content/docs/guides/providers.md#L294-L294: Add the supported ladder and clamping behavior.docs-site/src/content/docs/ja/guides/providers.md#L221-L221: Add the equivalent localized behavior note.docs-site/src/content/docs/ko/guides/providers.md#L221-L221: Add the equivalent localized behavior note.docs-site/src/content/docs/ru/guides/providers.md#L232-L232: Add the equivalent localized behavior note.docs-site/src/content/docs/zh-cn/guides/providers.md#L209-L209: Add the equivalent localized behavior note.docs-site/src/content/docs/zh-tw/guides/providers.md#L275-L275: Add the equivalent localized behavior note.As per path instructions, user-facing docs must stay in sync with actual CLI/API behavior. The referenced adapter documentation also requires consistent documentation of provider-specific reasoning support and higher-tier clamping.
📍 Affects 6 files
docs-site/src/content/docs/guides/providers.md#L294-L294(this comment)docs-site/src/content/docs/ja/guides/providers.md#L221-L221docs-site/src/content/docs/ko/guides/providers.md#L221-L221docs-site/src/content/docs/ru/guides/providers.md#L232-L232docs-site/src/content/docs/zh-cn/guides/providers.md#L209-L209docs-site/src/content/docs/zh-tw/guides/providers.md#L275-L275🤖 Prompt for AI Agents
Source: Path instructions