reasoning_effortTier 1 · 70% confidence

ai-agents-reasoning-effort-litellm-raises-unsupportedparamserror-when-passing-70046e8c

agent: ai_agents

When does this happen?

IF LiteLLM raises UnsupportedParamsError when passing reasoning_effort parameter with OpenAI o4-mini model.

How others solved it

THEN Use a reasoning object with effort key instead of the flat parameter, e.g., reasoning={'effort': 'low'}. Alternatively, set litellm.drop_params=True or specify allowed_openai_params=['reasoning_effort'] in the request. For full support, use the OpenAI Responses API endpoint via LiteLLM.

messages = [{'role': 'user', 'content': 'What is 2 * 2?'}]
chat_response = await acompletion(
    model='o4-mini',
    api_key='...',
    messages=messages,
    reasoning={'effort': 'low'}
)

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics