Skip to content

fix: strip output_config for MiniMax - #820

Merged
decolua merged 1 commit into
decolua:masterfrom
hiepau1231:fix/minimax-output-config-817
May 1, 2026
Merged

decolua merged 1 commit into
decolua:masterfrom
hiepau1231:fix/minimax-output-config-817

Conversation

@hiepau1231

Copy link
Copy Markdown
Contributor

Summary

  • Strip Anthropic output_config before sending Claude-format requests to MiniMax providers.
  • Apply the quirk to both minimax and minimax-cn.
  • Preserve output_config for Anthropic Claude.

Fixes #817.

Verification

  • node --check open-sse/translator/helpers/claudeHelper.js
  • node --check tests/unit/translator-request-normalization.test.js
  • Direct Node assertion: MiniMax/minimax-cn strip output_config; Claude preserves output_config.

Note: scoped Vitest run could not start because vitest is not installed in the local project dependencies and tests/vitest.config.js imports vitest/config.

@decolua
decolua merged commit 30b114a into decolua:master May 1, 2026
hohaivu pushed a commit to hohaivu/9router that referenced this pull request May 2, 2026
luckystart79-lang pushed a commit to luckystart79-lang/minirouter that referenced this pull request May 2, 2026
caothu159 pushed a commit to diepxuan/9router that referenced this pull request May 14, 2026
diegosouzapw pushed a commit to diegosouzapw/OmniRoute that referenced this pull request Jun 20, 2026
MiniMax exposes a Claude-compatible endpoint but rejects Anthropic's
extended `output_config` parameter (used to steer reasoning effort and
structured output) with a generic 400 "invalid params" response.

`prepareClaudeRequest()` now strips the entire `output_config` field for
the `minimax` and `minimax-cn` providers before any downstream processing,
so the field never reaches `translateRequest` or the executor. Anthropic
Claude and other Claude-compatible upstreams that do accept `output_config`
are unaffected.

Ported from upstream decolua/9router#820 by @hiepau1231.

Co-authored-by: hiepau1231 <hiepau1231@users.noreply.github.com>
Inspired-by: decolua/9router#820
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MiniMax-M2.7: 400 invalid params - output_config.format.json_schema not supported

2 participants