OpenHands / OpenHands/software-agent-sdk

SDK sends unsupported reasoning_effort to MiniMax M3

Open
#4,934 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug llm priority:medium sdk
Dominant language
Python
Stars
1.1k
Forks
539
Avg merge
1d 19h
Merged PRs (30d)
137

Description

Summary

Switching an OpenHands conversation/profile to MiniMax M3 can fail on the next LLM call because the SDK sends the default reasoning_effort=high parameter to minimax/MiniMax-M3.

LiteLLM rejects that request with:

litellm.UnsupportedParamsError: minimax does not support parameters: ['reasoning_effort'], for model=MiniMax-M3

Reproduction

  1. Start a conversation with a model that can use the switch-model/profile tool, for example deepseek-v4-flash.

  2. Ask it to switch to the minimax-m3 profile and continue the task, e.g.:

    hey switch to minimax-m3 then tell me a fun fact about today
    
  3. The switch succeeds, e.g. the UI shows:

    Switched to profile openhands_minimax-m3
    
  4. The next model call errors because reasoning_effort is sent to MiniMax M3.

This is reproducible independently of the Model Router; the switch-model/profile tool is enough to expose it.

Expected behavior

MiniMax M3 is a valid model/profile target. Switching to it should produce a valid request shape, and the SDK should not send provider-invalid default parameters.

Likely cause

The SDK currently treats generic LiteLLM/model metadata supports_reasoning: true as equivalent to support for the OpenAI-compatible reasoning_effort parameter. MiniMax M3 appears to support reasoning/thinking features, but LiteLLM's MiniMax adapter does not accept the reasoning_effort parameter; it supports other thinking-related parameters instead.

The SDK should distinguish:

  • supports_reasoning: model has some reasoning/thinking capability
  • supports_reasoning_effort: safe to send the exact OpenAI-style reasoning_effort parameter

Suggested fix

Only send reasoning_effort when the exact parameter is known to be supported, such as via explicit capability_overrides.supports_reasoning_effort, model_info.supports_reasoning_effort, model_info.supported_openai_params containing reasoning_effort, LiteLLM get_supported_openai_params(...) containing reasoning_effort, or an SDK explicit allowlist.

Generic model_info.supports_reasoning alone should not cause reasoning_effort to be sent.


This issue was created by an AI agent (OpenHands) on behalf of Juan Michelini.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Search the SDK's model capability handling and request construction for supports_reasoning, reasoning_effort, capability_overrides, and supported_openai_params; the issue does not name specific files or tests. Reproduce the profile switch to minimax-m3, then verify that MiniMax M3 requests no longer include reasoning_effort while models with explicit support still can use it.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, backend-api-design
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.