litellm - 💡(How to fix) Fix [Bug]: Proxy model with base model support thinking but failing on completion [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

{ "error": { "message": "litellm.UnsupportedParamsError: gemini does not support parameters: ['reasoning_effort'], for model=gemini-3.1-pro. 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=gemini-3.1-pro-preview-wtp\nAvailable Model Group Fallbacks=None", "type": "None", "param": null, "code": "400" } }

Root Cause

For example, configuring a model with a name that doesn't support thinking but setting base_model as one that supports thinking works fine in the UI because the model information is coming from the base_model if provided https://github.com/BerriAI/litellm/blob/aa9e7b9808af4a46d496ca2f2436edf8ed2f5d77/litellm/proxy/proxy_server.py#L6629

Fix Action

Fixed

Code Example

model_list:
- litellm_params:
     model: gemini/gemini-3.1-pro
   model_info:
     base_model: gemini-3.1-pro-preview

---

{
  "error": {
    "message": "litellm.UnsupportedParamsError: gemini does not support parameters: ['reasoning_effort'], for model=gemini-3.1-pro. To drop these, set `litellm.drop_params=True` or for proxy:\n\n`litellm_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=gemini-3.1-pro-preview-wtp\nAvailable Model Group Fallbacks=None",
    "type": "None",
    "param": null,
    "code": "400"
  }
}

---
RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

What happened?

Configuring a model in the proxy with model_info base model supported params in the proxy UI doesn't match the optional_params in the completion call.

For example, configuring a model with a name that doesn't support thinking but setting base_model as one that supports thinking works fine in the UI because the model information is coming from the base_model if provided https://github.com/BerriAI/litellm/blob/aa9e7b9808af4a46d496ca2f2436edf8ed2f5d77/litellm/proxy/proxy_server.py#L6629

For the same model, if we call completion with the thinking parameter, it fails because it is looking from the model name to get the supported parameters, and thinking is not one of them.

If the base_model is provided, it should be used to get the supported parameters, and the behavior should match the proxy model info UI

Steps to Reproduce

  1. Create a proxy config with a model that doesn't support thinking (gemini-3.1-pro is not registed in the cost map today so all model info is None):
model_list:
- litellm_params:
     model: gemini/gemini-3.1-pro
   model_info:
     base_model: gemini-3.1-pro-preview
  1. Start the proxy server with the config
  2. Go to the models page and look for supported_openai_params for this model. thinking is in the list because base_model is being used.
  3. Try to make a call to /chat/completions endpoint with "reasoning_effort": "low". Getting a validation error
{
  "error": {
    "message": "litellm.UnsupportedParamsError: gemini does not support parameters: ['reasoning_effort'], for model=gemini-3.1-pro. To drop these, set `litellm.drop_params=True` or for proxy:\n\n`litellm_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=gemini-3.1-pro-preview-wtp\nAvailable Model Group Fallbacks=None",
    "type": "None",
    "param": null,
    "code": "400"
  }
}

Relevant log output

What part of LiteLLM is this about?

Proxy

What LiteLLM version are you on ?

v1.83.14

Twitter / LinkedIn details

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

litellm - 💡(How to fix) Fix [Bug]: Proxy model with base model support thinking but failing on completion [1 pull requests]