Repository navigation
Description
Client or integration
Other (OpenCode 2.2.5, config produced by the dashboard integration export / ocx export --client opencode)
Area
Catalog / models
Summary
The three Mistral-hosted reasoning models export the generic Codex ladder low, medium, high, xhigh, max, ultra as OpenCode variants. Mistral does not accept most of those values, so picking them in the client fails.
Measured from OpenCode 2.2.5 through the hub (native Chat inbound, routed to the mistral provider), one short prompt per level:
| model | accepted (HTTP 200) | rejected |
|---|---|---|
zai-glm-5-3 |
low, high, max | medium (400), xhigh (400), ultra (422) |
zai-glm-5-3-flash |
low, high, max | medium (400), xhigh (400), ultra (422) |
deepseek-v4-1-flash-1017 |
low, high, xhigh, max | medium (400), ultra (422) |
Statuses are from the hub's usage.jsonl (provider: mistral, inboundProtocol: chat). Rejected requests surface to the client as an error. I did not see a downgraded replay.
Mistral's documentation agrees for GLM: https://docs.mistral.ai/capabilities/reasoning lists zai-glm-5-3 as low, high, max and GLM 5.3 Flash as low, high, max (none unsupported). The same page says Mistral Large 4 accepts only low, medium, high. The OpenAPI ReasoningEffort enum is none, minimal, low, medium, high, xhigh, max, so ultra is never valid on Mistral. The DeepSeek V4.1 Flash 1017 model card documents no effort values; the table above is empirical and may change.
Expected: the exported variants for each Mistral model contain only levels Mistral accepts, and a client that sends ultra to a routed Chat provider gets it folded to max rather than a 422.
Reproduction
- Hub 2.97.0 with a
mistralprovider (adapter: openai-chat,baseUrl: https://api.mistral.ai/v1) and noreasoningEfforts/modelReasoningEfforts/modelReasoningEffortMapset. - On the hub host:
ocx export --client opencode --json. Formistral/zai-glm-5-3,mistral/zai-glm-5-3-flashandmistral/deepseek-v4-1-flash-1017thevariantslist containslow, medium, high, xhigh, max, ultrain both theproviderandprovidersblocks. - In OpenCode:
opencode run -m 'opencodex/mistral/zai-glm-5-3#ultra' 'Reply with OK'→ "The provider rejected the request." Hub log: status 422,errorCode: http_422. With#mediumor#xhigh→ status 400invalid_request_error. With#low,#high,#max→ status 200.
What I read in the installed 2.97.0 sources (source reading only, no patched build run):
src/reasoning-effort.ts:6-13:CODEX_REASONING_LEVELSis the full low..ultra ladder. With nothing declared for the provider, that is what the export projects (src/clients/config-export/reasoning-metadata.ts,exportReasoningEfforts/legacyReasoningMetadata).src/adapters/openai-chat/passthrough.ts(around lines 96-114): outside the toggle-wire + independent-controls branch,wireEffortis the caller'sreasoning_effortas sent, soultrareaches Mistral unchanged.mapReasoningEffortinsrc/reasoning-effort.tsalready foldsultratomax, but this path does not call it here.- Related and already fixed for native Responses: Catalog advertises reasoning effort
ultrafor gpt-6-astra and gpt-6.1-sol, but the upstream rejects it with HTTP 400 #7590 / fix(catalog): send native ultra effort as max on the wire (#7590) #7600 (catalog listsultra, upstream rejects it, fold tomaxon the wire).
Possible directions (maintainer's call):
- Ship per-model effort ladders for the Mistral rows (documented: GLM 5.3 / Flash
low, high, max; Large 4low, medium, high) so the catalog and exports only list accepted levels. - Fold
ultratomaxin the native Chat passthrough, as fix(catalog): send native ultra effort as max on the wire (#7590) #7600 did for Responses. - Check whether the learned-unsupported downgrade (
planReasoningEffortDowngrade) can recognise Mistral's 400/422 refusal. The body the client sees is only{"error":{"message":"The provider rejected the request.","type":"invalid_request_error",...}}, so I could not tell whether Mistral names the parameter.
Version
2.97.0
Operating system
Ubuntu 24.04.5 LTS (hub host); OpenCode 2.2.5 client on Linux
Provider and model
mistral / zai-glm-5-3, zai-glm-5-3-flash, deepseek-v4-1-flash-1017
Logs or error output
# OpenCode, --format json, GLM 5.3 at #xhigh
{"type":"error","error":{"type":"provider.invalid-request","message":"The provider rejected the request.","status":400,"response":{"body":"{\"error\":{\"message\":\"The provider rejected the request.\",\"type\":\"invalid_request_error\",\"param\":null,\"code\":\"invalid_request_error\"}}"}}}
# hub usage.jsonl, DeepSeek V4.1 Flash 1017 at ultra (fields: status, provider, model, inboundProtocol, errorCode)
requestId=ocx-be1e72a7a3d171392e82fecc64a38041 status=422 provider=mistral model=deepseek-v4-1-flash-1017 inboundProtocol=chat errorCode=http_422Screenshots and supporting files
None.
Redacted configuration
{
"providers": {
"mistral": {
"adapter": "openai-chat",
"baseUrl": "https://api.mistral.ai/v1",
"defaultModel": "codestral-latest",
"modelInputModalities": { "zai-glm-5-3": ["text"] }
}
}
}(apiKey, authMode and promptCacheKey removed. No reasoningEfforts, modelReasoningEfforts or modelReasoningEffortMap present.)
Checks
- I searched existing issues and documentation. (Searched lidge-jun/opencodex for "mistral", "ultra", "reasoning_effort", "ladder"; related: Catalog advertises reasoning effort
ultrafor gpt-6-astra and gpt-6.1-sol, but the upstream rejects it with HTTP 400 #7590, Native Chat passthrough relays Mistral typed content arrays, breaking OpenAI-compatible clients #8251. No issue covers the Mistral ladder.) - I removed secrets, tokens, account details, request credentials, and personal data.
Activity
coderabbitai commentedon Nov 6, 2026
🔗 Related PRs
#7531 - fix(reasoning): separate support, thinking toggles and effort controls [merged]
📝 Issue Planner
Check the box below or use the
@coderabbitai plancommand to generate an implementation plan and prompts that you can use with your favorite coding assistant.🧪 Issue enrichment is currently in open beta.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord!
github-actions commentedon Nov 6, 2026
Automated translation bookkeeping — detected language: English.
github-actions commentedon Nov 6, 2026
Possibly related issues:
ultrafor gpt-6-astra and gpt-6.1-sol, but the upstream rejects it with HTTP 400 #7590 — Both report the catalog advertising a reasoning-effort value ultra/medium/xhigh that the upstream actually rejects with HTTP 400, i.e. catalog-advertised effort levels not accepted by the backend.Detected automatically via GitHub Copilot; automatic closure requires separate deterministic evidence.
fix(mistral): ship per-model effort ladders and fold native Chat ultra (
lidge-jun commentedon Nov 7, 2026
Fixed on dev by #8259: #8259 (squash afd76e0). Verified the model-specific OpenCode variants and native ultra folding on current dev.