Skip to content

fix: skip thinking param for MiniMax Anthropic-compatible endpoints#13464

Closed
nintendomustdie wants to merge 1 commit intoNousResearch:mainfrom
nintendomustdie:main
Closed

fix: skip thinking param for MiniMax Anthropic-compatible endpoints#13464
nintendomustdie wants to merge 1 commit intoNousResearch:mainfrom
nintendomustdie:main

Conversation

@nintendomustdie
Copy link
Copy Markdown

MiniMax's Anthropic-compatible API does not support the thinking parameter. This change adds a MiniMax check to skip thinking when using minimax-cn provider.

@teknium1
Copy link
Copy Markdown
Contributor

Thanks for the PR, but closing — this reverts a deliberate change from commit d442f25 ("fix: align MiniMax provider with official API docs", Apr 10) which removed exactly this guard after reading MiniMax's official docs.

Per https://platform.minimax.io/docs/api-reference/text-anthropic-api, MiniMax's Anthropic-compat endpoint does support the thinking parameter in manual mode (type=enabled + budget_tokens). The adapter already sends manual thinking (not adaptive) to MiniMax — see _supports_adaptive_thinking(model) branch in build_anthropic_kwargs. Tests test_minimax_m27_gets_manual_thinking and test_minimax_m25_gets_manual_thinking pin this behavior, and this PR would break them.

The only recent report of Messages.create() got an unexpected keyword argument 'thinking' was issue #5777, which turned out to be an old local anthropic Python SDK that didn't know the kwarg — not MiniMax's server rejecting it. That was fixed in #5782 by skipping thinking kwargs when the installed SDK doesn't support them. If you hit that error on hermes update, upgrading the anthropic package resolves it.

If you're seeing a real rejection from MiniMax's server (a 4xx HTTP response body, not a local TypeError), please open an issue with:

  • the full HTTP response body
  • which endpoint (api.minimax.io/anthropic vs api.minimaxi.com/anthropic)
  • the installed anthropic SDK version (pip show anthropic)
  • an updated link to the MiniMax docs if they've changed

A targeted fix would key on _requires_bearer_auth(base_url) rather than a model-name substring, so it handles all MiniMax Anthropic-compat deployments consistently.

@teknium1 teknium1 closed this Apr 21, 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.

2 participants