Skip to content

Handle models that throw error when temperature is passed in litellm #923

Closed

Description

@Saadmrp1038

Need to handle models that don't take a temperature value and throw an error when a temperature value is passed in litellm.

Got this error when trying to run claude-sonnet-5:

❌ Error during LLM judgment: litellm.BadRequestError: AnthropicException - {"type":"error","error":{"type":"invalid_request_error","message":"`temperature` is deprecated for this model."},"request_id":"req_011CcakeToS63TkKDmKr9xc4"}

It seems temperature is deprecated for claude-sonnet-5.

Activity

  1. changed the title [-]`temperature` is deprecated for Claude Sonnet 5[/-] [+]Handle models that throw error when `temperature` is passed in litellm[/+] on Jul 1, 2026
  2. self-assigned this
    on Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions