@ai-sdk/anthropic 2.0.0-beta.2 → 2.0.0-beta.3
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.d.mts +4 -22
- package/dist/index.d.ts +4 -22
- package/dist/index.js +254 -250
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -22
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +254 -250
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +26 -22
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ai-sdk/anthropic
|
|
2
2
|
|
|
3
|
+
## 2.0.0-beta.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a85c85f: fix (provider/anthropic): streaming json output
|
|
8
|
+
- d1a034f: feature: using Zod 4 for internal stuff
|
|
9
|
+
- 0b678b2: feat (provider/anthropic): enable streaming tool calls
|
|
10
|
+
- Updated dependencies [0571b98]
|
|
11
|
+
- Updated dependencies [39a4fab]
|
|
12
|
+
- Updated dependencies [d1a034f]
|
|
13
|
+
- @ai-sdk/provider-utils@3.0.0-beta.2
|
|
14
|
+
|
|
3
15
|
## 2.0.0-beta.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
2
|
import { ProviderV2, LanguageModelV2 } from '@ai-sdk/provider';
|
|
3
3
|
import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
|
|
4
4
|
import { FetchFunction } from '@ai-sdk/provider-utils';
|
|
@@ -7,28 +7,10 @@ type AnthropicMessagesModelId = 'claude-4-opus-20250514' | 'claude-4-sonnet-2025
|
|
|
7
7
|
declare const anthropicProviderOptions: z.ZodObject<{
|
|
8
8
|
sendReasoning: z.ZodOptional<z.ZodBoolean>;
|
|
9
9
|
thinking: z.ZodOptional<z.ZodObject<{
|
|
10
|
-
type: z.ZodUnion<[z.ZodLiteral<"enabled">, z.ZodLiteral<"disabled">]>;
|
|
10
|
+
type: z.ZodUnion<readonly [z.ZodLiteral<"enabled">, z.ZodLiteral<"disabled">]>;
|
|
11
11
|
budgetTokens: z.ZodOptional<z.ZodNumber>;
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
budgetTokens?: number | undefined;
|
|
15
|
-
}, {
|
|
16
|
-
type: "enabled" | "disabled";
|
|
17
|
-
budgetTokens?: number | undefined;
|
|
18
|
-
}>>;
|
|
19
|
-
}, "strip", z.ZodTypeAny, {
|
|
20
|
-
sendReasoning?: boolean | undefined;
|
|
21
|
-
thinking?: {
|
|
22
|
-
type: "enabled" | "disabled";
|
|
23
|
-
budgetTokens?: number | undefined;
|
|
24
|
-
} | undefined;
|
|
25
|
-
}, {
|
|
26
|
-
sendReasoning?: boolean | undefined;
|
|
27
|
-
thinking?: {
|
|
28
|
-
type: "enabled" | "disabled";
|
|
29
|
-
budgetTokens?: number | undefined;
|
|
30
|
-
} | undefined;
|
|
31
|
-
}>;
|
|
12
|
+
}, z.core.$strip>>;
|
|
13
|
+
}, z.core.$strip>;
|
|
32
14
|
type AnthropicProviderOptions = z.infer<typeof anthropicProviderOptions>;
|
|
33
15
|
|
|
34
16
|
declare const anthropicTools: {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
2
|
import { ProviderV2, LanguageModelV2 } from '@ai-sdk/provider';
|
|
3
3
|
import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
|
|
4
4
|
import { FetchFunction } from '@ai-sdk/provider-utils';
|
|
@@ -7,28 +7,10 @@ type AnthropicMessagesModelId = 'claude-4-opus-20250514' | 'claude-4-sonnet-2025
|
|
|
7
7
|
declare const anthropicProviderOptions: z.ZodObject<{
|
|
8
8
|
sendReasoning: z.ZodOptional<z.ZodBoolean>;
|
|
9
9
|
thinking: z.ZodOptional<z.ZodObject<{
|
|
10
|
-
type: z.ZodUnion<[z.ZodLiteral<"enabled">, z.ZodLiteral<"disabled">]>;
|
|
10
|
+
type: z.ZodUnion<readonly [z.ZodLiteral<"enabled">, z.ZodLiteral<"disabled">]>;
|
|
11
11
|
budgetTokens: z.ZodOptional<z.ZodNumber>;
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
budgetTokens?: number | undefined;
|
|
15
|
-
}, {
|
|
16
|
-
type: "enabled" | "disabled";
|
|
17
|
-
budgetTokens?: number | undefined;
|
|
18
|
-
}>>;
|
|
19
|
-
}, "strip", z.ZodTypeAny, {
|
|
20
|
-
sendReasoning?: boolean | undefined;
|
|
21
|
-
thinking?: {
|
|
22
|
-
type: "enabled" | "disabled";
|
|
23
|
-
budgetTokens?: number | undefined;
|
|
24
|
-
} | undefined;
|
|
25
|
-
}, {
|
|
26
|
-
sendReasoning?: boolean | undefined;
|
|
27
|
-
thinking?: {
|
|
28
|
-
type: "enabled" | "disabled";
|
|
29
|
-
budgetTokens?: number | undefined;
|
|
30
|
-
} | undefined;
|
|
31
|
-
}>;
|
|
12
|
+
}, z.core.$strip>>;
|
|
13
|
+
}, z.core.$strip>;
|
|
32
14
|
type AnthropicProviderOptions = z.infer<typeof anthropicProviderOptions>;
|
|
33
15
|
|
|
34
16
|
declare const anthropicTools: {
|