@ai-sdk/anthropic 3.0.57 → 3.0.58
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 +8 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -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.d.mts +1 -0
- package/dist/internal/index.d.ts +1 -0
- package/dist/internal/index.js +2 -0
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +2 -0
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/anthropic-messages-api.ts +1 -0
- package/src/anthropic-prepare-tools.ts +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @ai-sdk/anthropic
|
|
2
2
|
|
|
3
|
+
## 3.0.58
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 3fb4e70: feat(anthropic): support eagerInputStreaming option for fine-grained tool streaming
|
|
8
|
+
- Updated dependencies [ad4cfc2]
|
|
9
|
+
- @ai-sdk/provider-utils@4.0.19
|
|
10
|
+
|
|
3
11
|
## 3.0.57
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -221,6 +221,7 @@ type AnthropicLanguageModelOptions = z.infer<typeof anthropicLanguageModelOption
|
|
|
221
221
|
interface AnthropicToolOptions {
|
|
222
222
|
deferLoading?: boolean;
|
|
223
223
|
allowedCallers?: Array<'direct' | 'code_execution_20250825' | 'code_execution_20260120'>;
|
|
224
|
+
eagerInputStreaming?: boolean;
|
|
224
225
|
}
|
|
225
226
|
|
|
226
227
|
declare const anthropicTools: {
|
package/dist/index.d.ts
CHANGED
|
@@ -221,6 +221,7 @@ type AnthropicLanguageModelOptions = z.infer<typeof anthropicLanguageModelOption
|
|
|
221
221
|
interface AnthropicToolOptions {
|
|
222
222
|
deferLoading?: boolean;
|
|
223
223
|
allowedCallers?: Array<'direct' | 'code_execution_20250825' | 'code_execution_20260120'>;
|
|
224
|
+
eagerInputStreaming?: boolean;
|
|
224
225
|
}
|
|
225
226
|
|
|
226
227
|
declare const anthropicTools: {
|
package/dist/index.js
CHANGED
|
@@ -32,7 +32,7 @@ var import_provider4 = require("@ai-sdk/provider");
|
|
|
32
32
|
var import_provider_utils26 = require("@ai-sdk/provider-utils");
|
|
33
33
|
|
|
34
34
|
// src/version.ts
|
|
35
|
-
var VERSION = true ? "3.0.
|
|
35
|
+
var VERSION = true ? "3.0.58" : "0.0.0-test";
|
|
36
36
|
|
|
37
37
|
// src/anthropic-messages-language-model.ts
|
|
38
38
|
var import_provider3 = require("@ai-sdk/provider");
|
|
@@ -1288,6 +1288,7 @@ async function prepareTools({
|
|
|
1288
1288
|
canCache: true
|
|
1289
1289
|
});
|
|
1290
1290
|
const anthropicOptions = (_a = tool.providerOptions) == null ? void 0 : _a.anthropic;
|
|
1291
|
+
const eagerInputStreaming = anthropicOptions == null ? void 0 : anthropicOptions.eagerInputStreaming;
|
|
1291
1292
|
const deferLoading = anthropicOptions == null ? void 0 : anthropicOptions.deferLoading;
|
|
1292
1293
|
const allowedCallers = anthropicOptions == null ? void 0 : anthropicOptions.allowedCallers;
|
|
1293
1294
|
anthropicTools2.push({
|
|
@@ -1295,6 +1296,7 @@ async function prepareTools({
|
|
|
1295
1296
|
description: tool.description,
|
|
1296
1297
|
input_schema: tool.inputSchema,
|
|
1297
1298
|
cache_control: cacheControl,
|
|
1299
|
+
...eagerInputStreaming ? { eager_input_streaming: true } : {},
|
|
1298
1300
|
...supportsStructuredOutput === true && tool.strict != null ? { strict: tool.strict } : {},
|
|
1299
1301
|
...deferLoading != null ? { defer_loading: deferLoading } : {},
|
|
1300
1302
|
...allowedCallers != null ? { allowed_callers: allowedCallers } : {},
|