Skip to content

[Bug]: Claude-3.7 'thinking' parameter not support with litellm_proxy #8916

@cauchy221

Description

@cauchy221

What happened?

I'm using litellm_proxy and custom base_url. The request looks like this:

response = litellm.completion(
            api_key=os.environ.get("LITELLM_API_KEY"),
            base_url=MY_URL,
            model='litellm_proxy/xxx/claude-3-7-sonnet-20250219',
            messages=xxx,
            temperature=0.0,
            thinking={
                "type": "enabled",
                "budget_tokens": 200
            }
        )

I got UnsupportedParamsError:

litellm.exceptions.UnsupportedParamsError: litellm.UnsupportedParamsError: litellm_proxy does not support parameters: {'thinking': {'type': 'enabled', 'budget_tokens': 200}}, for model=xxx/claude-3-7-sonnet-20250219. To drop these, set `litellm.drop_params=True` or for proxy:

`litellm_settings:
 drop_params: true`

Relevant log output

Are you a ML Ops Team?

No

What LiteLLM version are you on ?

v1.61.20

Twitter / LinkedIn details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions