Skip to content

fix(translator): strip Claude output_config before MiniMax - #4448

Merged
diegosouzapw merged 1 commit into
release/v3.8.32from
feat/port-pr-820-minimax-strip-output-config
Jun 20, 2026
Merged

diegosouzapw merged 1 commit into
release/v3.8.32from
feat/port-pr-820-minimax-strip-output-config

Conversation

@diegosouzapw

Copy link
Copy Markdown
Owner

Summary

  • 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 already accept output_config are unaffected.

The existing OmniRoute behaviour in chatCore.ts only stripped output_config.format for non-Anthropic providers (issue #1719) — output_config.effort still leaked through to MiniMax and tripped the 400. This port closes that gap at the translator-helper layer.

Provenance

Ported from upstream decolua/9router#820 by @hiepau1231. The OmniRoute port lives in prepareClaudeRequest() (TypeScript) instead of the upstream's JavaScript helper, mirroring the upstream architecture.

Test plan

  • TDD: new tests/unit/claude-helper-minimax-output-config.test.ts (3/3 cases — minimax strips, minimax-cn strips, claude preserves), RED before the fix → GREEN after.
  • Related suites unchanged: tests/unit/claude-cache-control-passthrough.test.ts + tests/unit/translator-claude-helper-thinking.test.ts (19/19 pass).
  • npm run typecheck:core — clean.
  • Lint: 0 errors on touched files.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

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
@diegosouzapw
diegosouzapw force-pushed the feat/port-pr-820-minimax-strip-output-config branch from 0aff92e to a6ccfdc Compare June 20, 2026 23:25
@diegosouzapw
diegosouzapw merged commit 9708fed into release/v3.8.32 Jun 20, 2026
3 checks passed
@diegosouzapw
diegosouzapw deleted the feat/port-pr-820-minimax-strip-output-config branch June 21, 2026 12:33
tkgo11 pushed a commit to tkgo11/OmniRoute that referenced this pull request Sep 23, 2026
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.

1 participant