@ai-sdk/anthropic 2.0.16 → 2.0.17

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,11 @@
1
1
  # @ai-sdk/anthropic
2
2
 
3
+ ## 2.0.17
4
+
5
+ ### Patch Changes
6
+
7
+ - da92132: fix(provider/anthorpic): add cacheControl to AnthropicProviderOptions
8
+
3
9
  ## 2.0.16
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -11,6 +11,10 @@ declare const anthropicProviderOptions: z.ZodObject<{
11
11
  budgetTokens: z.ZodOptional<z.ZodNumber>;
12
12
  }, z.core.$strip>>;
13
13
  disableParallelToolUse: z.ZodOptional<z.ZodBoolean>;
14
+ cacheControl: z.ZodOptional<z.ZodObject<{
15
+ type: z.ZodLiteral<"ephemeral">;
16
+ ttl: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"5m">, z.ZodLiteral<"1h">]>>;
17
+ }, z.core.$strip>>;
14
18
  }, z.core.$strip>;
15
19
  type AnthropicProviderOptions = z.infer<typeof anthropicProviderOptions>;
16
20
 
package/dist/index.d.ts CHANGED
@@ -11,6 +11,10 @@ declare const anthropicProviderOptions: z.ZodObject<{
11
11
  budgetTokens: z.ZodOptional<z.ZodNumber>;
12
12
  }, z.core.$strip>>;
13
13
  disableParallelToolUse: z.ZodOptional<z.ZodBoolean>;
14
+ cacheControl: z.ZodOptional<z.ZodObject<{
15
+ type: z.ZodLiteral<"ephemeral">;
16
+ ttl: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"5m">, z.ZodLiteral<"1h">]>>;
17
+ }, z.core.$strip>>;
14
18
  }, z.core.$strip>;
15
19
  type AnthropicProviderOptions = z.infer<typeof anthropicProviderOptions>;
16
20
 
package/dist/index.js CHANGED
@@ -94,7 +94,15 @@ var anthropicProviderOptions = import_v42.z.object({
94
94
  * Whether to disable parallel function calling during tool use. Default is false.
95
95
  * When set to true, Claude will use at most one tool per response.
96
96
  */
97
- disableParallelToolUse: import_v42.z.boolean().optional()
97
+ disableParallelToolUse: import_v42.z.boolean().optional(),
98
+ /**
99
+ * Cache control settings for this message.
100
+ * See https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching
101
+ */
102
+ cacheControl: import_v42.z.object({
103
+ type: import_v42.z.literal("ephemeral"),
104
+ ttl: import_v42.z.union([import_v42.z.literal("5m"), import_v42.z.literal("1h")]).optional()
105
+ }).optional()
98
106
  });
99
107
 
100
108
  // src/anthropic-prepare-tools.ts