@ai-sdk/anthropic 2.0.16 → 2.1.0-beta.0
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 +18 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -1
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +9 -1
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +9 -1
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @ai-sdk/anthropic
|
|
2
2
|
|
|
3
|
+
## 2.1.0-beta.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 78928cb: release: start 5.1 beta
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [78928cb]
|
|
12
|
+
- @ai-sdk/provider@2.1.0-beta.0
|
|
13
|
+
- @ai-sdk/provider-utils@3.1.0-beta.0
|
|
14
|
+
|
|
15
|
+
## 2.0.17
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- da92132: fix(provider/anthorpic): add cacheControl to AnthropicProviderOptions
|
|
20
|
+
|
|
3
21
|
## 2.0.16
|
|
4
22
|
|
|
5
23
|
### 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
|