@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.mjs
CHANGED
|
@@ -2254,7 +2254,6 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2254
2254
|
toolName: mcpToolCalls[part.tool_use_id].toolName,
|
|
2255
2255
|
isError: part.is_error,
|
|
2256
2256
|
result: part.content,
|
|
2257
|
-
providerExecuted: true,
|
|
2258
2257
|
dynamic: true,
|
|
2259
2258
|
providerMetadata: mcpToolCalls[part.tool_use_id].providerMetadata
|
|
2260
2259
|
});
|
|
@@ -2280,8 +2279,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2280
2279
|
data: part.content.content.source.data
|
|
2281
2280
|
}
|
|
2282
2281
|
}
|
|
2283
|
-
}
|
|
2284
|
-
providerExecuted: true
|
|
2282
|
+
}
|
|
2285
2283
|
});
|
|
2286
2284
|
} else if (part.content.type === "web_fetch_tool_result_error") {
|
|
2287
2285
|
content.push({
|
|
@@ -2292,8 +2290,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2292
2290
|
result: {
|
|
2293
2291
|
type: "web_fetch_tool_result_error",
|
|
2294
2292
|
errorCode: part.content.error_code
|
|
2295
|
-
}
|
|
2296
|
-
providerExecuted: true
|
|
2293
|
+
}
|
|
2297
2294
|
});
|
|
2298
2295
|
}
|
|
2299
2296
|
break;
|
|
@@ -2313,8 +2310,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2313
2310
|
encryptedContent: result.encrypted_content,
|
|
2314
2311
|
type: result.type
|
|
2315
2312
|
};
|
|
2316
|
-
})
|
|
2317
|
-
providerExecuted: true
|
|
2313
|
+
})
|
|
2318
2314
|
});
|
|
2319
2315
|
for (const result of part.content) {
|
|
2320
2316
|
content.push({
|
|
@@ -2339,8 +2335,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2339
2335
|
result: {
|
|
2340
2336
|
type: "web_search_tool_result_error",
|
|
2341
2337
|
errorCode: part.content.error_code
|
|
2342
|
-
}
|
|
2343
|
-
providerExecuted: true
|
|
2338
|
+
}
|
|
2344
2339
|
});
|
|
2345
2340
|
}
|
|
2346
2341
|
break;
|
|
@@ -2357,8 +2352,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2357
2352
|
stdout: part.content.stdout,
|
|
2358
2353
|
stderr: part.content.stderr,
|
|
2359
2354
|
return_code: part.content.return_code
|
|
2360
|
-
}
|
|
2361
|
-
providerExecuted: true
|
|
2355
|
+
}
|
|
2362
2356
|
});
|
|
2363
2357
|
} else if (part.content.type === "code_execution_tool_result_error") {
|
|
2364
2358
|
content.push({
|
|
@@ -2369,8 +2363,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2369
2363
|
result: {
|
|
2370
2364
|
type: "code_execution_tool_result_error",
|
|
2371
2365
|
errorCode: part.content.error_code
|
|
2372
|
-
}
|
|
2373
|
-
providerExecuted: true
|
|
2366
|
+
}
|
|
2374
2367
|
});
|
|
2375
2368
|
}
|
|
2376
2369
|
break;
|
|
@@ -2382,8 +2375,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2382
2375
|
type: "tool-result",
|
|
2383
2376
|
toolCallId: part.tool_use_id,
|
|
2384
2377
|
toolName: "code_execution",
|
|
2385
|
-
result: part.content
|
|
2386
|
-
providerExecuted: true
|
|
2378
|
+
result: part.content
|
|
2387
2379
|
});
|
|
2388
2380
|
break;
|
|
2389
2381
|
}
|
|
@@ -2606,8 +2598,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2606
2598
|
result: {
|
|
2607
2599
|
type: "web_fetch_tool_result_error",
|
|
2608
2600
|
errorCode: part.content.error_code
|
|
2609
|
-
}
|
|
2610
|
-
providerExecuted: true
|
|
2601
|
+
}
|
|
2611
2602
|
});
|
|
2612
2603
|
}
|
|
2613
2604
|
return;
|
|
@@ -2627,8 +2618,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2627
2618
|
encryptedContent: result.encrypted_content,
|
|
2628
2619
|
type: result.type
|
|
2629
2620
|
};
|
|
2630
|
-
})
|
|
2631
|
-
providerExecuted: true
|
|
2621
|
+
})
|
|
2632
2622
|
});
|
|
2633
2623
|
for (const result of part.content) {
|
|
2634
2624
|
controller.enqueue({
|
|
@@ -2653,8 +2643,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2653
2643
|
result: {
|
|
2654
2644
|
type: "web_search_tool_result_error",
|
|
2655
2645
|
errorCode: part.content.error_code
|
|
2656
|
-
}
|
|
2657
|
-
providerExecuted: true
|
|
2646
|
+
}
|
|
2658
2647
|
});
|
|
2659
2648
|
}
|
|
2660
2649
|
return;
|
|
@@ -2671,8 +2660,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2671
2660
|
stdout: part.content.stdout,
|
|
2672
2661
|
stderr: part.content.stderr,
|
|
2673
2662
|
return_code: part.content.return_code
|
|
2674
|
-
}
|
|
2675
|
-
providerExecuted: true
|
|
2663
|
+
}
|
|
2676
2664
|
});
|
|
2677
2665
|
} else if (part.content.type === "code_execution_tool_result_error") {
|
|
2678
2666
|
controller.enqueue({
|
|
@@ -2683,8 +2671,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2683
2671
|
result: {
|
|
2684
2672
|
type: "code_execution_tool_result_error",
|
|
2685
2673
|
errorCode: part.content.error_code
|
|
2686
|
-
}
|
|
2687
|
-
providerExecuted: true
|
|
2674
|
+
}
|
|
2688
2675
|
});
|
|
2689
2676
|
}
|
|
2690
2677
|
return;
|
|
@@ -2696,8 +2683,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2696
2683
|
type: "tool-result",
|
|
2697
2684
|
toolCallId: part.tool_use_id,
|
|
2698
2685
|
toolName: "code_execution",
|
|
2699
|
-
result: part.content
|
|
2700
|
-
providerExecuted: true
|
|
2686
|
+
result: part.content
|
|
2701
2687
|
});
|
|
2702
2688
|
return;
|
|
2703
2689
|
}
|
|
@@ -2726,7 +2712,6 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2726
2712
|
toolName: mcpToolCalls[part.tool_use_id].toolName,
|
|
2727
2713
|
isError: part.is_error,
|
|
2728
2714
|
result: part.content,
|
|
2729
|
-
providerExecuted: true,
|
|
2730
2715
|
dynamic: true,
|
|
2731
2716
|
providerMetadata: mcpToolCalls[part.tool_use_id].providerMetadata
|
|
2732
2717
|
});
|