Client or integration
Codex App
Provider or upstream service
Xiaomi MiMo
OpenCodex version
2.12.0
Endpoint or capability
/v1/chat/completions · streaming tool calls · reasoning_effort
Current behaviour
On OpenCodex 2.12.0, Codex App cannot complete even a plain-text turn through a custom Xiaomi MiMo provider using the official OpenAI-compatible Chat endpoint.
Two failures are reproducible:
- The generated Codex catalog advertises
low, medium, high, xhigh, max, and ultra for xiaomi-mimo/mimo-v2.5. Selecting max sends that value upstream, but MiMo rejects it because the endpoint only accepts none, low, medium, or high.
- After switching the same thread to
medium, the request streams for several seconds and then OpenCodex terminates it with upstream response contained invalid tool calls.
No assistant message is delivered to Codex App. This reproduces with the plain prompt: 晚上好,你用的什么模型 ("Good evening, which model are you?").
Expected behaviour
A plain-text Codex App turn through xiaomi-mimo/mimo-v2.5 should complete with a visible assistant response.
The catalog must not advertise reasoning efforts that the selected Xiaomi endpoint rejects. If the endpoint supports only up to high, higher Codex effort labels should either be omitted or safely clamped according to an explicit provider contract.
If MiMo emits a non-conforming tool_calls streaming frame, OpenCodex should preserve the fail-closed behavior but provide enough redacted diagnostics to identify the incompatible nested shape, and apply a provider-specific normalization only when it is semantically safe.
Minimal redacted request or reproduction
Redacted provider configuration:
{
"providers": {
"xiaomi-mimo": {
"adapter": "openai-chat",
"baseUrl": "https://api.xiaomimimo.com/v1",
"authMode": "key",
"defaultModel": "mimo-v2.5",
"liveModels": true,
"disabled": false
}
}
}
Steps:
1. Start OpenCodex 2.12.0 on macOS and sync the catalog into Codex App.
2. Select `xiaomi-mimo/mimo-v2.5`.
3. Set reasoning effort to `max` and send: `晚上好,你用的什么模型`.
4. Observe the upstream 400 validation error.
5. Roll back the failed turn, set effort to `medium`, and send the same prompt.
6. Observe that the stream ends with `upstream response contained invalid tool calls`.
Codex App version observed: `0.147.0-alpha.6.5`.
No credentials, account identifiers, or request bodies containing secrets are included.
Actual response or error
With `reasoning_effort=max`:
Provider error 400: prefill failed: Input should be 'none', 'low', 'medium' or 'high'; input: 'max'
With `reasoning_effort=medium`:
stream disconnected before completion: Provider stream error: upstream response contained invalid tool calls
The exact malformed upstream `delta.tool_calls` shape is not persisted in the Codex session log, so this report does not claim whether it was a non-array value, a null element, or another invalid nested shape.
Upstream documentation
Xiaomi MiMo OpenAI-compatible Chat API:
https://platform.xiaomimimo.com/docs/en-US/api/chat/openai-api
OpenCodex issue #1325 documents the new fail-closed nested tool_calls validation and explicitly notes that no live provider evidence was available at filing time:
#1325
Suggested mapping or implementation notes
- Add or reuse a registry-owned contract for the official public Xiaomi endpoint
https://api.xiaomimimo.com/v1.
- Advertise only
low, medium, and high, or map xhigh/max/ultra to high, matching the existing MiMo token-plan compatibility contract where appropriate.
- Capture the invalid nested field category in redacted provider diagnostics without recording tool arguments or credentials.
- Add a live-route or deterministic adapter regression case for MiMo streaming tool-call frames.
- Do not silently drop a claimed tool call; normalize only a documented benign provider shape.
Additional context and attachments
Regression evidence:
- The same custom provider and
xiaomi-mimo/mimo-v2.5 completed Codex App turns successfully on OpenCodex 2.10.1.
- The current failure was reproduced repeatedly on 2.12.0 with both
max and medium.
- No existing issue matched the repository search:
mimo "invalid tool calls".
Related:
Checks
Client or integration
Codex App
Provider or upstream service
Xiaomi MiMo
OpenCodex version
2.12.0
Endpoint or capability
/v1/chat/completions · streaming tool calls · reasoning_effort
Current behaviour
On OpenCodex 2.12.0, Codex App cannot complete even a plain-text turn through a custom Xiaomi MiMo provider using the official OpenAI-compatible Chat endpoint.
Two failures are reproducible:
low,medium,high,xhigh,max, andultraforxiaomi-mimo/mimo-v2.5. Selectingmaxsends that value upstream, but MiMo rejects it because the endpoint only acceptsnone,low,medium, orhigh.medium, the request streams for several seconds and then OpenCodex terminates it withupstream response contained invalid tool calls.No assistant message is delivered to Codex App. This reproduces with the plain prompt:
晚上好,你用的什么模型("Good evening, which model are you?").Expected behaviour
A plain-text Codex App turn through
xiaomi-mimo/mimo-v2.5should complete with a visible assistant response.The catalog must not advertise reasoning efforts that the selected Xiaomi endpoint rejects. If the endpoint supports only up to
high, higher Codex effort labels should either be omitted or safely clamped according to an explicit provider contract.If MiMo emits a non-conforming
tool_callsstreaming frame, OpenCodex should preserve the fail-closed behavior but provide enough redacted diagnostics to identify the incompatible nested shape, and apply a provider-specific normalization only when it is semantically safe.Minimal redacted request or reproduction
Redacted provider configuration: { "providers": { "xiaomi-mimo": { "adapter": "openai-chat", "baseUrl": "https://api.xiaomimimo.com/v1", "authMode": "key", "defaultModel": "mimo-v2.5", "liveModels": true, "disabled": false } } } Steps: 1. Start OpenCodex 2.12.0 on macOS and sync the catalog into Codex App. 2. Select `xiaomi-mimo/mimo-v2.5`. 3. Set reasoning effort to `max` and send: `晚上好,你用的什么模型`. 4. Observe the upstream 400 validation error. 5. Roll back the failed turn, set effort to `medium`, and send the same prompt. 6. Observe that the stream ends with `upstream response contained invalid tool calls`. Codex App version observed: `0.147.0-alpha.6.5`. No credentials, account identifiers, or request bodies containing secrets are included.Actual response or error
Upstream documentation
Xiaomi MiMo OpenAI-compatible Chat API:
https://platform.xiaomimimo.com/docs/en-US/api/chat/openai-api
OpenCodex issue #1325 documents the new fail-closed nested
tool_callsvalidation and explicitly notes that no live provider evidence was available at filing time:#1325
Suggested mapping or implementation notes
https://api.xiaomimimo.com/v1.low,medium, andhigh, or mapxhigh/max/ultratohigh, matching the existing MiMo token-plan compatibility contract where appropriate.Additional context and attachments
Regression evidence:
xiaomi-mimo/mimo-v2.5completed Codex App turns successfully on OpenCodex 2.10.1.maxandmedium.mimo "invalid tool calls".Related:
tool_callsshapes now fail closed.Checks