@ai-sdk/anthropic 3.0.67 → 3.0.69
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/README.md +2 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -1
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +12 -0
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +12 -0
- package/dist/internal/index.mjs.map +1 -1
- package/docs/05-anthropic.mdx +25 -0
- package/package.json +1 -1
- package/src/anthropic-messages-language-model.ts +3 -0
- package/src/anthropic-messages-options.ts +10 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ai-sdk/anthropic
|
|
2
2
|
|
|
3
|
+
## 3.0.69
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 61f1a61: feat (provider/anthropic): add support for inference_geo provider option
|
|
8
|
+
|
|
9
|
+
## 3.0.68
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- d42076d: Add AI Gateway hint to provider READMEs
|
|
14
|
+
|
|
3
15
|
## 3.0.67
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
The **[Anthropic provider](https://ai-sdk.dev/providers/ai-sdk-providers/anthropic)** for the [AI SDK](https://ai-sdk.dev/docs) contains language model support for the [Anthropic Messages API](https://docs.anthropic.com/claude/reference/messages_post).
|
|
4
4
|
|
|
5
|
+
> **Deploying to Vercel?** With Vercel's AI Gateway you can access Anthropic (and hundreds of models from other providers) — no additional packages, API keys, or extra cost. [Get started with AI Gateway](https://vercel.com/ai-gateway).
|
|
6
|
+
|
|
5
7
|
## Setup
|
|
6
8
|
|
|
7
9
|
The Anthropic provider is available in the `@ai-sdk/anthropic` module. You can install it with
|
package/dist/index.d.mts
CHANGED
|
@@ -181,6 +181,10 @@ declare const anthropicLanguageModelOptions: z.ZodObject<{
|
|
|
181
181
|
fast: "fast";
|
|
182
182
|
standard: "standard";
|
|
183
183
|
}>>;
|
|
184
|
+
inferenceGeo: z.ZodOptional<z.ZodEnum<{
|
|
185
|
+
us: "us";
|
|
186
|
+
global: "global";
|
|
187
|
+
}>>;
|
|
184
188
|
anthropicBeta: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
185
189
|
contextManagement: z.ZodOptional<z.ZodObject<{
|
|
186
190
|
edits: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
package/dist/index.d.ts
CHANGED
|
@@ -181,6 +181,10 @@ declare const anthropicLanguageModelOptions: z.ZodObject<{
|
|
|
181
181
|
fast: "fast";
|
|
182
182
|
standard: "standard";
|
|
183
183
|
}>>;
|
|
184
|
+
inferenceGeo: z.ZodOptional<z.ZodEnum<{
|
|
185
|
+
us: "us";
|
|
186
|
+
global: "global";
|
|
187
|
+
}>>;
|
|
184
188
|
anthropicBeta: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
185
189
|
contextManagement: z.ZodOptional<z.ZodObject<{
|
|
186
190
|
edits: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
package/dist/index.js
CHANGED
|
@@ -32,7 +32,7 @@ var import_provider4 = require("@ai-sdk/provider");
|
|
|
32
32
|
var import_provider_utils26 = require("@ai-sdk/provider-utils");
|
|
33
33
|
|
|
34
34
|
// src/version.ts
|
|
35
|
-
var VERSION = true ? "3.0.
|
|
35
|
+
var VERSION = true ? "3.0.69" : "0.0.0-test";
|
|
36
36
|
|
|
37
37
|
// src/anthropic-messages-language-model.ts
|
|
38
38
|
var import_provider3 = require("@ai-sdk/provider");
|
|
@@ -931,6 +931,15 @@ var anthropicLanguageModelOptions = import_v43.z.object({
|
|
|
931
931
|
* Only supported with claude-opus-4-6.
|
|
932
932
|
*/
|
|
933
933
|
speed: import_v43.z.enum(["fast", "standard"]).optional(),
|
|
934
|
+
/**
|
|
935
|
+
* Controls where model inference runs for this request.
|
|
936
|
+
*
|
|
937
|
+
* - `"global"`: Inference may run in any available geography (default).
|
|
938
|
+
* - `"us"`: Inference runs only in US-based infrastructure.
|
|
939
|
+
*
|
|
940
|
+
* See https://platform.claude.com/docs/en/build-with-claude/data-residency
|
|
941
|
+
*/
|
|
942
|
+
inferenceGeo: import_v43.z.enum(["us", "global"]).optional(),
|
|
934
943
|
/**
|
|
935
944
|
* A set of beta features to enable.
|
|
936
945
|
* Allow a provider to receive the full `betas` set if it needs it.
|
|
@@ -3028,6 +3037,9 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
3028
3037
|
...(anthropicOptions == null ? void 0 : anthropicOptions.speed) && {
|
|
3029
3038
|
speed: anthropicOptions.speed
|
|
3030
3039
|
},
|
|
3040
|
+
...(anthropicOptions == null ? void 0 : anthropicOptions.inferenceGeo) && {
|
|
3041
|
+
inference_geo: anthropicOptions.inferenceGeo
|
|
3042
|
+
},
|
|
3031
3043
|
...(anthropicOptions == null ? void 0 : anthropicOptions.cacheControl) && {
|
|
3032
3044
|
cache_control: anthropicOptions.cacheControl
|
|
3033
3045
|
},
|