Skip to content

fix(anthropic): remove deprecated temperature and top_p parameters (Anthropic API 2026-10-21) - #1488

Open
pritpatel2412 wants to merge 1 commit into
VoltAgent:mainfrom
pritpatel2412:driftfix/5f6bd733-5768-4736-81c3-5706177aded2
Open

pritpatel2412 wants to merge 1 commit into
VoltAgent:mainfrom
pritpatel2412:driftfix/5f6bd733-5768-4736-81c3-5706177aded2

Conversation

@pritpatel2412

@pritpatel2412 pritpatel2412 commented Oct 29, 2026 •

Copy link
Copy Markdown

Summary

This pull request updates anthropic call sites for recipe: Anthropic API 2026-10-21: temperature, top_p, top_k removal.

What changed

  • Recipe: Anthropic API 2026-10-21: temperature, top_p, top_k removal
  • Files changed: 1
  • Call sites patched: 8/8
File Lines Call sites AST Re-parse Residual Zero
archive/deprecated-providers/anthropic-ai/src/index.ts L107, L135, L268, L341 8/8 ✓ pass ✓ zero

Why

Risk assessment

Risk level: LOW
Deterministic AST recipe applied cleanly with low blast radius.

Proof (How this was checked)

  • Deterministic AST syntax diagnostics and residual check passed (parse_ok and residual_zero).
  • Every modified file was verified in memory: AST re-parses with 0 syntax errors, and zero deprecated call sites remain.

Not verified

This PR was not validated by running your test suite. Please run CI before merging.

What you must check

  • Run your integration and unit test suite against the updated call sites.
  • Confirm that your provider API keys or client configuration headers align with the new endpoint or model specification.
  • Verify prompt behaviors and parameter values in staging before releasing to production.

How to close or opt out

  • To opt out or reject this change, close this pull request without merging.
  • To revert this change after merging:
git revert 72a46c76b4507e1f98b41d5050a92bd30587eb70

An agent wrote this pull request using DriftFix deterministic recipes. Generated by DriftFix. No LLM wrote this code change.


Summary by cubic

Removes the deprecated temperature and top_p parameters from all four Anthropic API call sites so requests stay compatible with the Anthropic API versioning effective 2026-10-21.

  • Caller-provided temperature and topP provider options are now silently ignored instead of being sent to the API, so generation no longer uses the previous temperature defaults and may produce different results depending on the provider's defaults.

Written for commit c212759. Summary will update on new commits.

View guided diff

Summary by CodeRabbit

  • Behavior Changes
    • Requests sent through the deprecated Anthropic integration no longer include temperature or top-p settings for text and object generation. This removes the previously applied temperature defaults for these requests, as well as forwarding of configured top-p values. Depending on the provider’s own defaults, generated results may differ.

@changeset-bot

changeset-bot Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: c212759

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1a10b402-e53c-4bde-b1d3-b0fce0b7dd07
Commits

Reviewing files that changed from the base of the PR and between a4a07de and c212759.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fec9aaab-ee34-42b9-ae6d-45d104a10206
Commits

Reviewing files that changed from the base of the PR and between 72a46c7 and 3e0619b.

Files selected for processing: 1
  • archive/deprecated-providers/anthropic-ai/src/index.ts
Files with no reviewable changes: 1
  • archive/deprecated-providers/anthropic-ai/src/index.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Walkthrough

Anthropic generateText, streamText, generateObject, and streamObject requests no longer include temperature or top_p.

Changes: Anthropic request parameters

Layer / File(s) Summary
Generation request parameter mapping
archive/deprecated-providers/anthropic-ai/src/index.ts
All four generation methods stop sending temperature and top_p. This removes the previous default temperature values and topP mapping.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: venomhare

Merge Risk: Minimal · previous review 3e061

The parameter cleanup has no identified merge-blocking issue. Complete the planned tests and staging verification before release.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly identifies the provider, the deprecated parameters removed, and the relevant Anthropic API date. It accurately summarizes the main change.
Description check Passed The description gives a clear summary, explains the reason for the change, identifies affected call sites, documents validation results, and states that the test suite was not run. It does not reprodu…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description gives a clear summary, explains the reason for the change, identifies affected call sites, documents validation results, and states that the test suite was not run. It does not reproduce every template heading or confirm related issues, docs, and changesets, but it contains the key information needed for review.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

View guided diff | Re-trigger cubic

@driftfix-mvp
driftfix-mvp Bot force-pushed the driftfix/5f6bd733-5768-4736-81c3-5706177aded2 branch from 3e0619b to a4a07de Compare November 2, 2026 17:08
@driftfix-mvp
driftfix-mvp Bot force-pushed the driftfix/5f6bd733-5768-4736-81c3-5706177aded2 branch from a4a07de to c212759 Compare November 2, 2026 17:12

This branch has not been deployed

No deployments
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