litellm - 💡(How to fix) Fix [Bug]: Gemini vertex ai 3.1 flash lite not supporting minimal

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

File "/home/kavin/PycharmProjects/redacted/.venv/lib/python3.13/site-packages/litellm/utils.py", line 2100, in wrapper_async raise e File "/home/kavin/PycharmProjects/redacted/.venv/lib/python3.13/site-packages/litellm/utils.py", line 1899, in wrapper_async result = await original_function(*args, **kwargs) File "/home/kavin/PycharmProjects/redacted/.venv/lib/python3.13/site-packages/litellm/main.py", line 656, in acompletion raise exception_type( File "/home/kavin/PycharmProjects/redacted/.venv/lib/python3.13/site-packages/litellm/main.py", line 629, in acompletion init_response = await loop.run_in_executor(None, func_with_context) File "/home/kavin/.local/share/uv/python/cpython-3.13.12-linux-x86_64-gnu/lib/python3.13/concurrent/futures/thread.py", line 59, in run result = self.fn(*self.args, **self.kwargs) File "/home/kavin/PycharmProjects/redacted/.venv/lib/python3.13/site-packages/litellm/utils.py", line 1446, in wrapper result = original_function(*args, **kwargs) File "/home/kavin/PycharmProjects/redacted/.venv/lib/python3.13/site-packages/litellm/main.py", line 4502, in completion raise exception_type( File "/home/kavin/PycharmProjects/redacted/.venv/lib/python3.13/site-packages/litellm/main.py", line 1554, in completion optional_params = get_optional_params( File "/home/kavin/PycharmProjects/redacted/.venv/lib/python3.13/site-packages/litellm/utils.py", line 4105, in get_optional_params _check_valid_arg( File "/home/kavin/PycharmProjects/redacted/.venv/lib/python3.13/site-packages/litellm/utils.py", line 4085, in _check_valid_arg raise UnsupportedParamsError( UnsupportedParamsError: litellm.UnsupportedParamsError: vertex_ai does not support parameters: ['reasoning_effort'], for model=gemini-3.1-flash-lite. To drop these, set litellm.drop_params=True or for proxy:

Root Cause

The root cause is that reasoning_effort is only added to the supported params list when supports_reasoning(model) returns True, and that function checks the model's entry in litellm's model database.

Code Example

resp = await acompletion(
        model="vertex_ai/gemini-3.1-flash-lite",
        messages=[
            ....
        ],
        reasoning_effort="minimal",
        response_format=ABC,
    )

---

File "/home/kavin/PycharmProjects/redacted/.venv/lib/python3.13/site-packages/litellm/utils.py", line 2100, in wrapper_async
    raise e
  File "/home/kavin/PycharmProjects/redacted/.venv/lib/python3.13/site-packages/litellm/utils.py", line 1899, in wrapper_async
    result = await original_function(*args, **kwargs)
  File "/home/kavin/PycharmProjects/redacted/.venv/lib/python3.13/site-packages/litellm/main.py", line 656, in acompletion
    raise exception_type(
  File "/home/kavin/PycharmProjects/redacted/.venv/lib/python3.13/site-packages/litellm/main.py", line 629, in acompletion
    init_response = await loop.run_in_executor(None, func_with_context)
  File "/home/kavin/.local/share/uv/python/cpython-3.13.12-linux-x86_64-gnu/lib/python3.13/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/kavin/PycharmProjects/redacted/.venv/lib/python3.13/site-packages/litellm/utils.py", line 1446, in wrapper
    result = original_function(*args, **kwargs)
  File "/home/kavin/PycharmProjects/redacted/.venv/lib/python3.13/site-packages/litellm/main.py", line 4502, in completion
    raise exception_type(
  File "/home/kavin/PycharmProjects/redacted/.venv/lib/python3.13/site-packages/litellm/main.py", line 1554, in completion
    optional_params = get_optional_params(
  File "/home/kavin/PycharmProjects/redacted/.venv/lib/python3.13/site-packages/litellm/utils.py", line 4105, in get_optional_params
    _check_valid_arg(
  File "/home/kavin/PycharmProjects/redacted/.venv/lib/python3.13/site-packages/litellm/utils.py", line 4085, in _check_valid_arg
    raise UnsupportedParamsError(
UnsupportedParamsError: litellm.UnsupportedParamsError: vertex_ai does not support parameters: ['reasoning_effort'], for model=gemini-3.1-flash-lite. To drop these, set `litellm.drop_params=True` or for proxy:
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?

litellm is unaware of the non-preview model from what I can tell.

The root cause is that reasoning_effort is only added to the supported params list when supports_reasoning(model) returns True, and that function checks the model's entry in litellm's model database.

The supports_reasoning(model) call looks up the model name in litellm's model prices/context window database. Your model name is gemini-3.1-flash-lite (no preview suffix), but the model registered in litellm's database is gemini-3.1-flash-lite-preview. Since gemini-3.1-flash-lite has no entry, supports_reasoning returns False, so reasoning_effort is never added to the supported params list, and the _check_valid_arg call raises UnsupportedParamsError.

Steps to Reproduce

    resp = await acompletion(
        model="vertex_ai/gemini-3.1-flash-lite",
        messages=[
            ....
        ],
        reasoning_effort="minimal",
        response_format=ABC,
    )

Relevant log output

File "/home/kavin/PycharmProjects/redacted/.venv/lib/python3.13/site-packages/litellm/utils.py", line 2100, in wrapper_async
    raise e
  File "/home/kavin/PycharmProjects/redacted/.venv/lib/python3.13/site-packages/litellm/utils.py", line 1899, in wrapper_async
    result = await original_function(*args, **kwargs)
  File "/home/kavin/PycharmProjects/redacted/.venv/lib/python3.13/site-packages/litellm/main.py", line 656, in acompletion
    raise exception_type(
  File "/home/kavin/PycharmProjects/redacted/.venv/lib/python3.13/site-packages/litellm/main.py", line 629, in acompletion
    init_response = await loop.run_in_executor(None, func_with_context)
  File "/home/kavin/.local/share/uv/python/cpython-3.13.12-linux-x86_64-gnu/lib/python3.13/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/kavin/PycharmProjects/redacted/.venv/lib/python3.13/site-packages/litellm/utils.py", line 1446, in wrapper
    result = original_function(*args, **kwargs)
  File "/home/kavin/PycharmProjects/redacted/.venv/lib/python3.13/site-packages/litellm/main.py", line 4502, in completion
    raise exception_type(
  File "/home/kavin/PycharmProjects/redacted/.venv/lib/python3.13/site-packages/litellm/main.py", line 1554, in completion
    optional_params = get_optional_params(
  File "/home/kavin/PycharmProjects/redacted/.venv/lib/python3.13/site-packages/litellm/utils.py", line 4105, in get_optional_params
    _check_valid_arg(
  File "/home/kavin/PycharmProjects/redacted/.venv/lib/python3.13/site-packages/litellm/utils.py", line 4085, in _check_valid_arg
    raise UnsupportedParamsError(
UnsupportedParamsError: litellm.UnsupportedParamsError: vertex_ai does not support parameters: ['reasoning_effort'], for model=gemini-3.1-flash-lite. To drop these, set `litellm.drop_params=True` or for proxy:

What part of LiteLLM is this about?

SDK (litellm Python package)

What LiteLLM version are you on ?

v1.86.2

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]: Gemini vertex ai 3.1 flash lite not supporting minimal