Skip to content

[Bug]: OpenCode export and catalog advertise reasoning efforts that Mistral rejects for GLM 5.3, GLM 5.3 Flash and DeepSeek V4.1 Flash 1017 #8254

Closed

Description

@Masih-0x3

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

  1. Hub 2.97.0 with a mistral provider (adapter: openai-chat, baseUrl: https://api.mistral.ai/v1) and no reasoningEfforts / modelReasoningEfforts / modelReasoningEffortMap set.
  2. On the hub host: ocx export --client opencode --json. For mistral/zai-glm-5-3, mistral/zai-glm-5-3-flash and mistral/deepseek-v4-1-flash-1017 the variants list contains low, medium, high, xhigh, max, ultra in both the provider and providers blocks.
  3. 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 #medium or #xhigh → status 400 invalid_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):

Possible directions (maintainer's call):

  1. Ship per-model effort ladders for the Mistral rows (documented: GLM 5.3 / Flash low, high, max; Large 4 low, medium, high) so the catalog and exports only list accepted levels.
  2. Fold ultra to max in the native Chat passthrough, as fix(catalog): send native ultra effort as max on the wire (#7590) #7600 did for Responses.
  3. 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_422

Screenshots 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

Activity

  1. coderabbitai commented on Nov 6, 2026

    @coderabbitai
    Contributor
    🔗 Related PRs

    #7531 - fix(reasoning): separate support, thinking toggles and effort controls [merged]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  2. github-actions commented on Nov 6, 2026

    @github-actions
    Contributor

    Automated translation bookkeeping — detected language: English.

  3. added
    bug
    catalog
    on Nov 6, 2026
  4. github-actions commented on Nov 6, 2026

    @github-actions
    Contributor

    Possibly related issues:

    Detected automatically via GitHub Copilot; automatic closure requires separate deterministic evidence.

  5. added a commit that references this issue on Nov 7, 2026
    afd76e0
  6. lidge-jun commented on Nov 7, 2026

    @lidge-jun
    Owner

    Fixed on dev by #8259: #8259 (squash afd76e0). Verified the model-specific OpenCode variants and native ultra folding on current dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcatalog

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions