Build agents with Claude Agent SDK

Doesn;t work even after setting drop_params=True in the Options

Claude: API Error: 400 {“error”:{“message”:“litellm.UnsupportedParamsError: openrouter does not support parameters: [‘reasoning_effort’], for model=x-ai/grok-code-fast-1. To drop these, set litellm.drop_params=True or for proxy:\n\nlitellm_settings:\n drop_params: true\n. \n If you want to use these params dynamically send allowed_openai_params=[‘reasoning_effort’] in your request… Received Model Group=claude-sonnet-4-20250514\nAvailable Model Group Fallbacks=None”,“type”:“None”,“param”:null,“code”:“400”}}

Is this for a specific lab? A link would be helpful here.

https://learn.kodekloud.com/user/courses/learn-by-doing-building-ai-agents-with-claude-agent-sdk/

task_3_first_query.py

@deepakbehera
Add this to your LiteLLM Proxy config.yaml file: /root/config/config.yaml

litellm_settings:
  drop_params: true  # Drops unsupported params globally [page:1]

Stop litellm proxy
pkill -f "litellm --config"

reinitialize
source /root/venv/bin/activate && python3 /root/code/verify_environment.py

and it works

1 Like

Well done, @ aimhwak! I’ve tried your fix in the lab, and it works indeed. I’ve passed it on to our engineers to repair the lab.

2 Likes

And your fix has been committed. Again, thanks.