@ai-sdk/anthropic 2.0.8 → 2.0.10
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.
- package/CHANGELOG.md +12 -0
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -1
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +3 -1
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +3 -1
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ai-sdk/anthropic
|
|
2
2
|
|
|
3
|
+
## 2.0.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c152ef7: feat(providers/anthropic): map 'refusal' stop reason to 'content-filter' finishReason
|
|
8
|
+
|
|
9
|
+
## 2.0.9
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- cdc6b7a: fix(provider/anthropic): disable parallel tool use when using json output tool for structured responses
|
|
14
|
+
|
|
3
15
|
## 2.0.8
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -805,6 +805,8 @@ function mapAnthropicStopReason({
|
|
|
805
805
|
case "end_turn":
|
|
806
806
|
case "stop_sequence":
|
|
807
807
|
return "stop";
|
|
808
|
+
case "refusal":
|
|
809
|
+
return "content-filter";
|
|
808
810
|
case "tool_use":
|
|
809
811
|
return isJsonResponseFromTool ? "stop" : "tool-calls";
|
|
810
812
|
case "max_tokens":
|
|
@@ -1033,7 +1035,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
1033
1035
|
jsonResponseTool != null ? {
|
|
1034
1036
|
tools: [jsonResponseTool],
|
|
1035
1037
|
toolChoice: { type: "tool", toolName: jsonResponseTool.name },
|
|
1036
|
-
disableParallelToolUse:
|
|
1038
|
+
disableParallelToolUse: true
|
|
1037
1039
|
} : {
|
|
1038
1040
|
tools: tools != null ? tools : [],
|
|
1039
1041
|
toolChoice,
|