@langchain/anthropic 0.3.29 → 0.3.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -702,7 +702,7 @@ class ChatAnthropicMessages extends chat_models_1.BaseChatModel {
702
702
  if (this.topK !== -1) {
703
703
  throw new Error("topK is not supported when thinking is enabled");
704
704
  }
705
- if (this.model.includes("opus-4-1")
705
+ if (this.model.includes("opus-4-1") || this.model.includes("sonnet-4-5")
706
706
  ? this.topP !== undefined
707
707
  : this.topP !== -1) {
708
708
  throw new Error("topP is not supported when thinking is enabled");
@@ -699,7 +699,7 @@ export class ChatAnthropicMessages extends BaseChatModel {
699
699
  if (this.topK !== -1) {
700
700
  throw new Error("topK is not supported when thinking is enabled");
701
701
  }
702
- if (this.model.includes("opus-4-1")
702
+ if (this.model.includes("opus-4-1") || this.model.includes("sonnet-4-5")
703
703
  ? this.topP !== undefined
704
704
  : this.topP !== -1) {
705
705
  throw new Error("topP is not supported when thinking is enabled");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/anthropic",
3
- "version": "0.3.29",
3
+ "version": "0.3.30",
4
4
  "description": "Anthropic integrations for LangChain.js",
5
5
  "type": "module",
6
6
  "engines": {