@ai-sdk/anthropic 3.0.0-beta.47 → 3.0.0-beta.49
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 +15 -0
- package/dist/index.js +14 -29
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -29
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +13 -28
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +13 -28
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/internal/index.js
CHANGED
|
@@ -2243,7 +2243,6 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2243
2243
|
toolName: mcpToolCalls[part.tool_use_id].toolName,
|
|
2244
2244
|
isError: part.is_error,
|
|
2245
2245
|
result: part.content,
|
|
2246
|
-
providerExecuted: true,
|
|
2247
2246
|
dynamic: true,
|
|
2248
2247
|
providerMetadata: mcpToolCalls[part.tool_use_id].providerMetadata
|
|
2249
2248
|
});
|
|
@@ -2269,8 +2268,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2269
2268
|
data: part.content.content.source.data
|
|
2270
2269
|
}
|
|
2271
2270
|
}
|
|
2272
|
-
}
|
|
2273
|
-
providerExecuted: true
|
|
2271
|
+
}
|
|
2274
2272
|
});
|
|
2275
2273
|
} else if (part.content.type === "web_fetch_tool_result_error") {
|
|
2276
2274
|
content.push({
|
|
@@ -2281,8 +2279,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2281
2279
|
result: {
|
|
2282
2280
|
type: "web_fetch_tool_result_error",
|
|
2283
2281
|
errorCode: part.content.error_code
|
|
2284
|
-
}
|
|
2285
|
-
providerExecuted: true
|
|
2282
|
+
}
|
|
2286
2283
|
});
|
|
2287
2284
|
}
|
|
2288
2285
|
break;
|
|
@@ -2302,8 +2299,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2302
2299
|
encryptedContent: result.encrypted_content,
|
|
2303
2300
|
type: result.type
|
|
2304
2301
|
};
|
|
2305
|
-
})
|
|
2306
|
-
providerExecuted: true
|
|
2302
|
+
})
|
|
2307
2303
|
});
|
|
2308
2304
|
for (const result of part.content) {
|
|
2309
2305
|
content.push({
|
|
@@ -2328,8 +2324,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2328
2324
|
result: {
|
|
2329
2325
|
type: "web_search_tool_result_error",
|
|
2330
2326
|
errorCode: part.content.error_code
|
|
2331
|
-
}
|
|
2332
|
-
providerExecuted: true
|
|
2327
|
+
}
|
|
2333
2328
|
});
|
|
2334
2329
|
}
|
|
2335
2330
|
break;
|
|
@@ -2346,8 +2341,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2346
2341
|
stdout: part.content.stdout,
|
|
2347
2342
|
stderr: part.content.stderr,
|
|
2348
2343
|
return_code: part.content.return_code
|
|
2349
|
-
}
|
|
2350
|
-
providerExecuted: true
|
|
2344
|
+
}
|
|
2351
2345
|
});
|
|
2352
2346
|
} else if (part.content.type === "code_execution_tool_result_error") {
|
|
2353
2347
|
content.push({
|
|
@@ -2358,8 +2352,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2358
2352
|
result: {
|
|
2359
2353
|
type: "code_execution_tool_result_error",
|
|
2360
2354
|
errorCode: part.content.error_code
|
|
2361
|
-
}
|
|
2362
|
-
providerExecuted: true
|
|
2355
|
+
}
|
|
2363
2356
|
});
|
|
2364
2357
|
}
|
|
2365
2358
|
break;
|
|
@@ -2371,8 +2364,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2371
2364
|
type: "tool-result",
|
|
2372
2365
|
toolCallId: part.tool_use_id,
|
|
2373
2366
|
toolName: "code_execution",
|
|
2374
|
-
result: part.content
|
|
2375
|
-
providerExecuted: true
|
|
2367
|
+
result: part.content
|
|
2376
2368
|
});
|
|
2377
2369
|
break;
|
|
2378
2370
|
}
|
|
@@ -2595,8 +2587,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2595
2587
|
result: {
|
|
2596
2588
|
type: "web_fetch_tool_result_error",
|
|
2597
2589
|
errorCode: part.content.error_code
|
|
2598
|
-
}
|
|
2599
|
-
providerExecuted: true
|
|
2590
|
+
}
|
|
2600
2591
|
});
|
|
2601
2592
|
}
|
|
2602
2593
|
return;
|
|
@@ -2616,8 +2607,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2616
2607
|
encryptedContent: result.encrypted_content,
|
|
2617
2608
|
type: result.type
|
|
2618
2609
|
};
|
|
2619
|
-
})
|
|
2620
|
-
providerExecuted: true
|
|
2610
|
+
})
|
|
2621
2611
|
});
|
|
2622
2612
|
for (const result of part.content) {
|
|
2623
2613
|
controller.enqueue({
|
|
@@ -2642,8 +2632,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2642
2632
|
result: {
|
|
2643
2633
|
type: "web_search_tool_result_error",
|
|
2644
2634
|
errorCode: part.content.error_code
|
|
2645
|
-
}
|
|
2646
|
-
providerExecuted: true
|
|
2635
|
+
}
|
|
2647
2636
|
});
|
|
2648
2637
|
}
|
|
2649
2638
|
return;
|
|
@@ -2660,8 +2649,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2660
2649
|
stdout: part.content.stdout,
|
|
2661
2650
|
stderr: part.content.stderr,
|
|
2662
2651
|
return_code: part.content.return_code
|
|
2663
|
-
}
|
|
2664
|
-
providerExecuted: true
|
|
2652
|
+
}
|
|
2665
2653
|
});
|
|
2666
2654
|
} else if (part.content.type === "code_execution_tool_result_error") {
|
|
2667
2655
|
controller.enqueue({
|
|
@@ -2672,8 +2660,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2672
2660
|
result: {
|
|
2673
2661
|
type: "code_execution_tool_result_error",
|
|
2674
2662
|
errorCode: part.content.error_code
|
|
2675
|
-
}
|
|
2676
|
-
providerExecuted: true
|
|
2663
|
+
}
|
|
2677
2664
|
});
|
|
2678
2665
|
}
|
|
2679
2666
|
return;
|
|
@@ -2685,8 +2672,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2685
2672
|
type: "tool-result",
|
|
2686
2673
|
toolCallId: part.tool_use_id,
|
|
2687
2674
|
toolName: "code_execution",
|
|
2688
|
-
result: part.content
|
|
2689
|
-
providerExecuted: true
|
|
2675
|
+
result: part.content
|
|
2690
2676
|
});
|
|
2691
2677
|
return;
|
|
2692
2678
|
}
|
|
@@ -2715,7 +2701,6 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2715
2701
|
toolName: mcpToolCalls[part.tool_use_id].toolName,
|
|
2716
2702
|
isError: part.is_error,
|
|
2717
2703
|
result: part.content,
|
|
2718
|
-
providerExecuted: true,
|
|
2719
2704
|
dynamic: true,
|
|
2720
2705
|
providerMetadata: mcpToolCalls[part.tool_use_id].providerMetadata
|
|
2721
2706
|
});
|