Skip to content

[Bug]: Google Gemini Flash 2.0 - Parameter "presence_penalty" not supported #14753

@JFingerle

Description

@JFingerle

What happened?

UnsupportedParamsError occurs when the "presence_penalty" parameter is used with Gemini Flash 2.0 using the Google API.

  • gemini/gemini-2.0-flash-001

  • gemini/gemini-2.0-flash

No error occurs via the openrouter API ( openrouter/google/gemini-2.0-flash-001)

Relevant log output

litellm.UnsupportedParamsError: gemini does not support parameters: ['presence_penalty'], for model=gemini-2.0-flash-001. To drop these, set `litellm.drop_params=True` or for proxy:

`litellm_settings:
 drop_params: true`

Are you a ML Ops Team?

No

What LiteLLM version are you on ?

v1.77.3.dynamic_rates

Twitter / LinkedIn details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions