@ai-sdk/anthropic 2.0.9 → 2.0.11

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @ai-sdk/anthropic
2
2
 
3
+ ## 2.0.11
4
+
5
+ ### Patch Changes
6
+
7
+ - c7fee29: feat(anthropic): handle `pause_turn` as value for `stop_reason`
8
+
9
+ ## 2.0.10
10
+
11
+ ### Patch Changes
12
+
13
+ - c152ef7: feat(providers/anthropic): map 'refusal' stop reason to 'content-filter' finishReason
14
+
3
15
  ## 2.0.9
4
16
 
5
17
  ### Patch Changes
package/dist/index.js CHANGED
@@ -802,9 +802,12 @@ function mapAnthropicStopReason({
802
802
  isJsonResponseFromTool
803
803
  }) {
804
804
  switch (finishReason) {
805
+ case "pause_turn":
805
806
  case "end_turn":
806
807
  case "stop_sequence":
807
808
  return "stop";
809
+ case "refusal":
810
+ return "content-filter";
808
811
  case "tool_use":
809
812
  return isJsonResponseFromTool ? "stop" : "tool-calls";
810
813
  case "max_tokens":