Skip to content

go: /v1/chat/completions returns 400 for reasoning_effort=max|minimal on mimo-v2.6-flash (low/medium/high succeed) #50818

Open

Description

@zouyuanqing

Summary

POST https://opencode.ai/zen/go/v1/chat/completions rejects reasoning_effort=max (and minimal) for mimo-v2.6-flash with HTTP 400, while low, medium and high all succeed. The gateway surfaces the failure as:

{"error":{"param":"","type":"server_error","message":"Upstream request failed: [400] Invalid request parameters"}}

The Upstream request failed: [400] wrapper suggests the gateway forwards the effort value to its upstream unchanged and the upstream rejects the enum value.

This matters because Xiaomi's official channel does support a max thinking level for mimo-v2.6-flash (their Anthropic-style endpoint accepts it), so clients that expose a max level for this model work against the official endpoint but break whenever the request is routed through zen/go.

Reproduction

curl https://opencode.ai/zen/go/v1/chat/completions \
  -H "Authorization: Bearer $OPENCODE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "x-opencode-session: 3f1c9a2e-7b4d-4c8a-9e2f-1a2b3c4d5e6f" \
  -d '{"model":"mimo-v2.6-flash","messages":[{"role":"user","content":"say ok"}],"max_tokens":16,"reasoning_effort":"max"}'

Results (tested 2026-09-23)

reasoning_effort HTTP
minimal 400
low 200 ✅
medium 200 ✅
high 200 ✅
max 400

Evidence this is model/upstream-specific, not gateway-wide

  • On the same gateway with the same session header: deepseek-v4.1-flash with reasoning: {"effort": "max"} via POST /v1/responses returns 200 — the gateway clearly supports max for models whose upstream accepts it.
  • Xiaomi's official endpoint accepts a max thinking level for the very same model (mimo-v2.6-flash).

So for mimo on zen/go, the accepted effort set is effectively {low, medium, high} (plus on/off), and anything else becomes a raw upstream 400.

Suggested fix

  1. Clamp effort values the upstream does not accept to the nearest supported one (max → high, minimal → low) instead of surfacing a raw upstream 400 to the client; and/or
  2. Advertise the supported effort values per model (e.g. in /v1/models metadata) so clients can render accurate controls instead of discovering the failure at request time.

Related

Activity

  1. ruixiaozi commented on Sep 25, 2026

    @ruixiaozi

    +1

  2. opencodejr commented on Oct 28, 2026

    @opencodejr

    Thanks for the detailed report and the clear repro table!

    In short, you're asking the Go gateway to handle reasoning_effort values that some upstreams don't support. For mimo-v2.6-flash, that would mean either clamping them (max → high, minimal → low) or listing the supported effort values per model in /v1/models. Today a request with one of those values fails with a raw upstream 400. Right now the gateway passes the effort value to the upstream unchanged, and that upstream only seems to accept low, medium and high. So I've filed this as a gateway improvement rather than a bug. Maintainers will consider it.

    Related issues:

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions