@ai-sdk/anthropic 2.0.0-beta.2 → 2.0.0-beta.4

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 CHANGED
@@ -1,5 +1,24 @@
1
1
  # @ai-sdk/anthropic
2
2
 
3
+ ## 2.0.0-beta.4
4
+
5
+ ### Patch Changes
6
+
7
+ - fdff8a4: fix(provider/anthropic): correct Claude 4 model ID format
8
+ - 84577c8: fix (providers/anthropic): remove fine grained tool streaming beta
9
+
10
+ ## 2.0.0-beta.3
11
+
12
+ ### Patch Changes
13
+
14
+ - a85c85f: fix (provider/anthropic): streaming json output
15
+ - d1a034f: feature: using Zod 4 for internal stuff
16
+ - 0b678b2: feat (provider/anthropic): enable streaming tool calls
17
+ - Updated dependencies [0571b98]
18
+ - Updated dependencies [39a4fab]
19
+ - Updated dependencies [d1a034f]
20
+ - @ai-sdk/provider-utils@3.0.0-beta.2
21
+
3
22
  ## 2.0.0-beta.2
4
23
 
5
24
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1,34 +1,16 @@
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';
5
5
 
6
- type AnthropicMessagesModelId = 'claude-4-opus-20250514' | 'claude-4-sonnet-20250514' | 'claude-3-7-sonnet-20250219' | 'claude-3-5-sonnet-latest' | 'claude-3-5-sonnet-20241022' | 'claude-3-5-sonnet-20240620' | 'claude-3-5-haiku-latest' | 'claude-3-5-haiku-20241022' | 'claude-3-opus-latest' | 'claude-3-opus-20240229' | 'claude-3-sonnet-20240229' | 'claude-3-haiku-20240307' | (string & {});
6
+ type AnthropicMessagesModelId = 'claude-opus-4-20250514' | 'claude-sonnet-4-20250514' | 'claude-3-7-sonnet-20250219' | 'claude-3-5-sonnet-latest' | 'claude-3-5-sonnet-20241022' | 'claude-3-5-sonnet-20240620' | 'claude-3-5-haiku-latest' | 'claude-3-5-haiku-20241022' | 'claude-3-opus-latest' | 'claude-3-opus-20240229' | 'claude-3-sonnet-20240229' | 'claude-3-haiku-20240307' | (string & {});
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
- }, "strip", z.ZodTypeAny, {
13
- type: "enabled" | "disabled";
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,34 +1,16 @@
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';
5
5
 
6
- type AnthropicMessagesModelId = 'claude-4-opus-20250514' | 'claude-4-sonnet-20250514' | 'claude-3-7-sonnet-20250219' | 'claude-3-5-sonnet-latest' | 'claude-3-5-sonnet-20241022' | 'claude-3-5-sonnet-20240620' | 'claude-3-5-haiku-latest' | 'claude-3-5-haiku-20241022' | 'claude-3-opus-latest' | 'claude-3-opus-20240229' | 'claude-3-sonnet-20240229' | 'claude-3-haiku-20240307' | (string & {});
6
+ type AnthropicMessagesModelId = 'claude-opus-4-20250514' | 'claude-sonnet-4-20250514' | 'claude-3-7-sonnet-20250219' | 'claude-3-5-sonnet-latest' | 'claude-3-5-sonnet-20241022' | 'claude-3-5-sonnet-20240620' | 'claude-3-5-haiku-latest' | 'claude-3-5-haiku-20241022' | 'claude-3-opus-latest' | 'claude-3-opus-20240229' | 'claude-3-sonnet-20240229' | 'claude-3-haiku-20240307' | (string & {});
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
- }, "strip", z.ZodTypeAny, {
13
- type: "enabled" | "disabled";
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: {