@ai-sdk/anthropic 2.0.99 → 2.0.101

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,19 @@
1
1
  # @ai-sdk/anthropic
2
2
 
3
+ ## 2.0.101
4
+
5
+ ### Patch Changes
6
+
7
+ - 78a29c2: feat(anthropic): add fable 5.1 support
8
+
9
+ ## 2.0.100
10
+
11
+ ### Patch Changes
12
+
13
+ - cd8f35c: Preserve tool calls when using JSON structured output.
14
+ - Updated dependencies [26165ee]
15
+ - @ai-sdk/provider-utils@3.0.36
16
+
3
17
  ## 2.0.99
4
18
 
5
19
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -169,11 +169,19 @@ interface AnthropicMessageMetadata {
169
169
  } | null;
170
170
  }
171
171
 
172
- type AnthropicMessagesModelId = 'claude-3-5-haiku-20241022' | 'claude-3-5-haiku-latest' | 'claude-3-7-sonnet-20250219' | 'claude-3-7-sonnet-latest' | 'claude-3-haiku-20240307' | 'claude-haiku-4-5-20251001' | 'claude-haiku-4-5' | 'claude-opus-4-0' | 'claude-opus-4-1-20250805' | 'claude-opus-4-1' | 'claude-opus-4-20250514' | 'claude-opus-4-5' | 'claude-opus-4-5-20251101' | 'claude-sonnet-4-0' | 'claude-sonnet-4-20250514' | 'claude-sonnet-4-5-20250929' | 'claude-sonnet-4-5' | 'claude-sonnet-4-6' | 'claude-opus-4-6' | 'claude-opus-4-7' | 'claude-opus-4-8' | 'claude-opus-5' | 'claude-fable-5' | 'claude-sonnet-5' | (string & {});
172
+ type AnthropicMessagesModelId = 'claude-3-5-haiku-20241022' | 'claude-3-5-haiku-latest' | 'claude-3-7-sonnet-20250219' | 'claude-3-7-sonnet-latest' | 'claude-3-haiku-20240307' | 'claude-haiku-4-5-20251001' | 'claude-haiku-4-5' | 'claude-opus-4-0' | 'claude-opus-4-1-20250805' | 'claude-opus-4-1' | 'claude-opus-4-20250514' | 'claude-opus-4-5' | 'claude-opus-4-5-20251101' | 'claude-sonnet-4-0' | 'claude-sonnet-4-20250514' | 'claude-sonnet-4-5-20250929' | 'claude-sonnet-4-5' | 'claude-sonnet-4-6' | 'claude-opus-4-6' | 'claude-opus-4-7' | 'claude-opus-4-8' | 'claude-opus-5' | 'claude-fable-5' | 'claude-fable-5-1' | 'claude-sonnet-5' | (string & {});
173
173
  /**
174
174
  * Anthropic provider options for system messages.
175
175
  */
176
176
  declare const anthropicSystemMessageProviderOptions: z.ZodObject<{
177
+ clearAt: z.ZodOptional<z.ZodLiteral<"next_user_message">>;
178
+ effort: z.ZodOptional<z.ZodEnum<{
179
+ low: "low";
180
+ medium: "medium";
181
+ high: "high";
182
+ xhigh: "xhigh";
183
+ max: "max";
184
+ }>>;
177
185
  toolChanges: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
178
186
  type: z.ZodLiteral<"tool_addition">;
179
187
  toolName: z.ZodString;
@@ -190,17 +198,28 @@ declare const anthropicProviderOptions: z.ZodObject<{
190
198
  jsonTool: "jsonTool";
191
199
  auto: "auto";
192
200
  }>>;
193
- thinking: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
201
+ thinking: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
194
202
  type: z.ZodLiteral<"adaptive">;
195
203
  display: z.ZodOptional<z.ZodEnum<{
196
204
  omitted: "omitted";
197
205
  summarized: "summarized";
206
+ updates: "updates";
198
207
  }>>;
208
+ blockBinding: z.ZodOptional<z.ZodObject<{
209
+ prefixMismatchBehavior: z.ZodLiteral<"drop_block">;
210
+ }, z.core.$strip>>;
199
211
  }, z.core.$strip>, z.ZodObject<{
200
212
  type: z.ZodLiteral<"enabled">;
201
213
  budgetTokens: z.ZodOptional<z.ZodNumber>;
214
+ blockBinding: z.ZodOptional<z.ZodObject<{
215
+ prefixMismatchBehavior: z.ZodLiteral<"drop_block">;
216
+ }, z.core.$strip>>;
202
217
  }, z.core.$strip>, z.ZodObject<{
203
218
  type: z.ZodLiteral<"disabled">;
219
+ }, z.core.$strip>, z.ZodObject<{
220
+ blockBinding: z.ZodObject<{
221
+ prefixMismatchBehavior: z.ZodLiteral<"drop_block">;
222
+ }, z.core.$strip>;
204
223
  }, z.core.$strip>]>>;
205
224
  disableParallelToolUse: z.ZodOptional<z.ZodBoolean>;
206
225
  cacheControl: z.ZodOptional<z.ZodObject<{
package/dist/index.d.ts CHANGED
@@ -169,11 +169,19 @@ interface AnthropicMessageMetadata {
169
169
  } | null;
170
170
  }
171
171
 
172
- type AnthropicMessagesModelId = 'claude-3-5-haiku-20241022' | 'claude-3-5-haiku-latest' | 'claude-3-7-sonnet-20250219' | 'claude-3-7-sonnet-latest' | 'claude-3-haiku-20240307' | 'claude-haiku-4-5-20251001' | 'claude-haiku-4-5' | 'claude-opus-4-0' | 'claude-opus-4-1-20250805' | 'claude-opus-4-1' | 'claude-opus-4-20250514' | 'claude-opus-4-5' | 'claude-opus-4-5-20251101' | 'claude-sonnet-4-0' | 'claude-sonnet-4-20250514' | 'claude-sonnet-4-5-20250929' | 'claude-sonnet-4-5' | 'claude-sonnet-4-6' | 'claude-opus-4-6' | 'claude-opus-4-7' | 'claude-opus-4-8' | 'claude-opus-5' | 'claude-fable-5' | 'claude-sonnet-5' | (string & {});
172
+ type AnthropicMessagesModelId = 'claude-3-5-haiku-20241022' | 'claude-3-5-haiku-latest' | 'claude-3-7-sonnet-20250219' | 'claude-3-7-sonnet-latest' | 'claude-3-haiku-20240307' | 'claude-haiku-4-5-20251001' | 'claude-haiku-4-5' | 'claude-opus-4-0' | 'claude-opus-4-1-20250805' | 'claude-opus-4-1' | 'claude-opus-4-20250514' | 'claude-opus-4-5' | 'claude-opus-4-5-20251101' | 'claude-sonnet-4-0' | 'claude-sonnet-4-20250514' | 'claude-sonnet-4-5-20250929' | 'claude-sonnet-4-5' | 'claude-sonnet-4-6' | 'claude-opus-4-6' | 'claude-opus-4-7' | 'claude-opus-4-8' | 'claude-opus-5' | 'claude-fable-5' | 'claude-fable-5-1' | 'claude-sonnet-5' | (string & {});
173
173
  /**
174
174
  * Anthropic provider options for system messages.
175
175
  */
176
176
  declare const anthropicSystemMessageProviderOptions: z.ZodObject<{
177
+ clearAt: z.ZodOptional<z.ZodLiteral<"next_user_message">>;
178
+ effort: z.ZodOptional<z.ZodEnum<{
179
+ low: "low";
180
+ medium: "medium";
181
+ high: "high";
182
+ xhigh: "xhigh";
183
+ max: "max";
184
+ }>>;
177
185
  toolChanges: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
178
186
  type: z.ZodLiteral<"tool_addition">;
179
187
  toolName: z.ZodString;
@@ -190,17 +198,28 @@ declare const anthropicProviderOptions: z.ZodObject<{
190
198
  jsonTool: "jsonTool";
191
199
  auto: "auto";
192
200
  }>>;
193
- thinking: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
201
+ thinking: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
194
202
  type: z.ZodLiteral<"adaptive">;
195
203
  display: z.ZodOptional<z.ZodEnum<{
196
204
  omitted: "omitted";
197
205
  summarized: "summarized";
206
+ updates: "updates";
198
207
  }>>;
208
+ blockBinding: z.ZodOptional<z.ZodObject<{
209
+ prefixMismatchBehavior: z.ZodLiteral<"drop_block">;
210
+ }, z.core.$strip>>;
199
211
  }, z.core.$strip>, z.ZodObject<{
200
212
  type: z.ZodLiteral<"enabled">;
201
213
  budgetTokens: z.ZodOptional<z.ZodNumber>;
214
+ blockBinding: z.ZodOptional<z.ZodObject<{
215
+ prefixMismatchBehavior: z.ZodLiteral<"drop_block">;
216
+ }, z.core.$strip>>;
202
217
  }, z.core.$strip>, z.ZodObject<{
203
218
  type: z.ZodLiteral<"disabled">;
219
+ }, z.core.$strip>, z.ZodObject<{
220
+ blockBinding: z.ZodObject<{
221
+ prefixMismatchBehavior: z.ZodLiteral<"drop_block">;
222
+ }, z.core.$strip>;
204
223
  }, z.core.$strip>]>>;
205
224
  disableParallelToolUse: z.ZodOptional<z.ZodBoolean>;
206
225
  cacheControl: z.ZodOptional<z.ZodObject<{