Skip to content

[Bug] temperature parameter sent to claude-opus-4-7 causes 400 from Anthropic #2400

@ksugimoto29-slv

Description

@ksugimoto29-slv

Git provider

Github Enterprise

System Info

  • PR-Agent: 0.35.0 (Docker pragent/pr-agent:latest)
  • LiteLLM: 1.84.0
  • Deployment: CircleCI + Docker (CLI mode)
  • Model: vertex_ai/claude-opus-4-7
  • Provider: Vertex AI

Bug details

Summary

When running PR-Agent against claude-opus-4-7, every command fails because PR-Agent sends temperature to a model that no longer accepts it. Anthropic returns:

temperature is deprecated for this model.

Steps to reproduce

  1. Set CONFIG_MODEL=vertex_ai/claude-opus-4-7
  2. Run any command (e.g. python -m pr_agent.cli --pr_url <URL> review) with pragent/pr-agent:latest

Actual log

WARNING | pr_agent.algo.ai_handlers.litellm_ai_handler:chat_completion:567 -
Error during LLM inference: litellm.BadRequestError: Vertex_aiException BadRequestError -
{"type":"error","error":{"type":"invalid_request_error","message":"`temperature` is deprecated for this model."}}
WARNING | pr_agent.algo.pr_processing:retry_with_fallback_models:333 -
Failed to generate prediction with vertex_ai/claude-opus-4-7

The same error occurs with anthropic/claude-opus-4-7 and the Bedrock variants — temperature is rejected at the Anthropic API layer for the entire claude-opus-4-7 family.

Expected behavior

PR-Agent commands should run successfully against claude-opus-4-7. Currently every command fails.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions