Skip to content

Fix Anthropic PR lens request body - #77

Closed
haasonsaas wants to merge 1 commit into
mainfrom
codex/fix-pr-lens-anthropic-temperature-20260514
Closed

Fix Anthropic PR lens request body#77
haasonsaas wants to merge 1 commit into
mainfrom
codex/fix-pr-lens-anthropic-temperature-20260514

Conversation

@haasonsaas

Copy link
Copy Markdown
Contributor

Summary

  • remove the deprecated temperature parameter from Anthropic Messages API calls used by EvalOps PR lens reviews
  • add a regression test that captures the Anthropic request body and asserts temperature is omitted

Why

evalops-pr-lens/* status contexts are currently erroring across open deploy/platform PRs with:

Anthropic API failed with HTTP 400: ... "temperature" is deprecated for this model.

That is blocking deploy train PRs, including evalops/deploy#2828 and the active train cut PR.

Validation

  • ruby -Itest test/evalops_pr_lens_review_test.rb --name test_call_anthropic_omits_deprecated_temperature_parameter
  • ruby -Itest test/evalops_pr_lens_review_test.rb
  • ruby -Itest test/check_pr_review_threads_test.rb
  • ruby -Itest test/classify_agent_authorship_test.rb
  • ruby -Itest test/publish_codex_structured_review_test.rb
  • ruby -Itest test/validate_services_catalog_test.rb
  • ruby -Itest test/sweep_recent_review_feedback_test.rb

@cursor

cursor Bot commented May 14, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Low risk: a small change to the Anthropic request payload plus a focused regression test; behavior change is limited to removing a single (now-invalid) field from API calls.

Overview
Fixes EvalOps PR lens Anthropic calls by removing the deprecated temperature field from the request body in call_anthropic, preventing 400s on newer Claude models.

Adds a regression test that stubs Net::HTTP.start, captures the outgoing JSON payload, and asserts temperature is not sent.

Reviewed by Cursor Bugbot for commit 69843e0. Bugbot is set up for automated code reviews on this repo. Configure here.

@haasonsaas

Copy link
Copy Markdown
Contributor Author

Closing as superseded: main now contains cca3cef (Fix Opus PR lens request parameters), which removes the deprecated Anthropic temperature parameter and covers this failure path.

@haasonsaas haasonsaas closed this May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant