@ai-sdk/anthropic 3.0.18 → 3.0.20
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 +1 -1
- package/dist/index.mjs +1 -1
- package/docs/05-anthropic.mdx +1096 -0
- package/package.json +8 -3
- package/src/__fixtures__/anthropic-code-execution-20250825.1.chunks.txt +248 -0
- package/src/__fixtures__/anthropic-code-execution-20250825.1.json +70 -0
- package/src/__fixtures__/anthropic-code-execution-20250825.2.chunks.txt +984 -0
- package/src/__fixtures__/anthropic-code-execution-20250825.2.json +111 -0
- package/src/__fixtures__/anthropic-code-execution-20250825.pptx-skill.chunks.txt +691 -0
- package/src/__fixtures__/anthropic-code-execution-20250825.pptx-skill.json +1801 -0
- package/src/__fixtures__/anthropic-json-other-tool.1.chunks.txt +13 -0
- package/src/__fixtures__/anthropic-json-other-tool.1.json +26 -0
- package/src/__fixtures__/anthropic-json-output-format.1.chunks.txt +120 -0
- package/src/__fixtures__/anthropic-json-output-format.1.json +25 -0
- package/src/__fixtures__/anthropic-json-tool.1.chunks.txt +9 -0
- package/src/__fixtures__/anthropic-json-tool.1.json +37 -0
- package/src/__fixtures__/anthropic-json-tool.2.chunks.txt +14 -0
- package/src/__fixtures__/anthropic-mcp.1.chunks.txt +17 -0
- package/src/__fixtures__/anthropic-mcp.1.json +39 -0
- package/src/__fixtures__/anthropic-memory-20250818.1.json +28 -0
- package/src/__fixtures__/anthropic-message-delta-input-tokens.chunks.txt +8 -0
- package/src/__fixtures__/anthropic-programmatic-tool-calling.1.chunks.txt +278 -0
- package/src/__fixtures__/anthropic-programmatic-tool-calling.1.json +106 -0
- package/src/__fixtures__/anthropic-tool-no-args.chunks.txt +13 -0
- package/src/__fixtures__/anthropic-tool-no-args.json +31 -0
- package/src/__fixtures__/anthropic-tool-search-bm25.1.chunks.txt +47 -0
- package/src/__fixtures__/anthropic-tool-search-bm25.1.json +67 -0
- package/src/__fixtures__/anthropic-tool-search-regex.1.chunks.txt +51 -0
- package/src/__fixtures__/anthropic-tool-search-regex.1.json +65 -0
- package/src/__fixtures__/anthropic-web-fetch-tool.1.chunks.txt +64 -0
- package/src/__fixtures__/anthropic-web-fetch-tool.1.json +54 -0
- package/src/__fixtures__/anthropic-web-fetch-tool.2.json +56 -0
- package/src/__fixtures__/anthropic-web-fetch-tool.error.json +46 -0
- package/src/__fixtures__/anthropic-web-search-tool.1.chunks.txt +120 -0
- package/src/__fixtures__/anthropic-web-search-tool.1.json +181 -0
- package/src/__snapshots__/anthropic-messages-language-model.test.ts.snap +16719 -0
- package/src/anthropic-error.test.ts +42 -0
- package/src/anthropic-error.ts +26 -0
- package/src/anthropic-message-metadata.ts +105 -0
- package/src/anthropic-messages-api.ts +1188 -0
- package/src/anthropic-messages-language-model.test.ts +7170 -0
- package/src/anthropic-messages-language-model.ts +2067 -0
- package/src/anthropic-messages-options.ts +213 -0
- package/src/anthropic-prepare-tools.test.ts +1219 -0
- package/src/anthropic-prepare-tools.ts +341 -0
- package/src/anthropic-provider.test.ts +162 -0
- package/src/anthropic-provider.ts +152 -0
- package/src/anthropic-tools.ts +182 -0
- package/src/convert-anthropic-messages-usage.ts +32 -0
- package/src/convert-to-anthropic-messages-prompt.test.ts +2902 -0
- package/src/convert-to-anthropic-messages-prompt.ts +1050 -0
- package/src/forward-anthropic-container-id-from-last-step.ts +38 -0
- package/src/get-cache-control.ts +63 -0
- package/src/index.ts +10 -0
- package/src/internal/index.ts +4 -0
- package/src/map-anthropic-stop-reason.ts +28 -0
- package/src/tool/bash_20241022.ts +33 -0
- package/src/tool/bash_20250124.ts +33 -0
- package/src/tool/code-execution_20250522.ts +61 -0
- package/src/tool/code-execution_20250825.ts +281 -0
- package/src/tool/computer_20241022.ts +87 -0
- package/src/tool/computer_20250124.ts +130 -0
- package/src/tool/memory_20250818.ts +62 -0
- package/src/tool/text-editor_20241022.ts +63 -0
- package/src/tool/text-editor_20250124.ts +63 -0
- package/src/tool/text-editor_20250429.ts +64 -0
- package/src/tool/text-editor_20250728.ts +80 -0
- package/src/tool/tool-search-bm25_20251119.ts +98 -0
- package/src/tool/tool-search-regex_20251119.ts +110 -0
- package/src/tool/web-fetch-20250910.ts +145 -0
- package/src/tool/web-search_20250305.ts +136 -0
- package/src/version.ts +6 -0
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -32,7 +32,7 @@ var import_provider4 = require("@ai-sdk/provider");
|
|
|
32
32
|
var import_provider_utils22 = require("@ai-sdk/provider-utils");
|
|
33
33
|
|
|
34
34
|
// src/version.ts
|
|
35
|
-
var VERSION = true ? "3.0.
|
|
35
|
+
var VERSION = true ? "3.0.20" : "0.0.0-test";
|
|
36
36
|
|
|
37
37
|
// src/anthropic-messages-language-model.ts
|
|
38
38
|
var import_provider3 = require("@ai-sdk/provider");
|