Skip to content

Conversation

linkesch
Copy link
Contributor

Follows up on #9065

Fixes #9067 (comment)

Fixes topP is not supported when thinking is enabled.

const agentModel = new ChatAnthropic({
  modelName: "claude-sonnet-4-5",
  maxTokens: 32_000,
  thinking: { type: "enabled", budget_tokens: 1024 },
});

--
x.com/linkesch

Copy link

changeset-bot bot commented Sep 30, 2025

🦋 Changeset detected

Latest commit: 13161f3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@langchain/anthropic Patch

Not sure what this means? Click here to learn what changesets are.

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

Copy link

vercel bot commented Sep 30, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
langchainjs-docs Ready Ready Preview Sep 30, 2025 0:52am
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
langchainjs-api-refs Ignored Ignored Sep 30, 2025 0:52am

@linkesch linkesch changed the title fix sonnet-4.5 thinking fix(anthropic): fix sonnet-4.5 thinking Sep 30, 2025
Copy link
Member

@hntrl hntrl left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@hntrl hntrl merged commit 6c7eb84 into langchain-ai:main Sep 30, 2025
35 of 36 checks passed
hntrl added a commit that referenced this pull request Oct 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@langchain/anthropic Sends topP for sonnet-4.5 and fails

2 participants