@ai-sdk/anthropic 4.0.0-beta.23 → 4.0.0-beta.25
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 +13 -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 +2 -2
- package/src/anthropic-messages-language-model.ts +3 -0
- package/src/anthropic-messages-options.ts +10 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @ai-sdk/anthropic
|
|
2
2
|
|
|
3
|
+
## 4.0.0-beta.25
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 09bd27b: feat (provider/anthropic): add support for inference_geo provider option
|
|
8
|
+
|
|
9
|
+
## 4.0.0-beta.24
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [3ae1786]
|
|
14
|
+
- @ai-sdk/provider-utils@5.0.0-beta.17
|
|
15
|
+
|
|
3
16
|
## 4.0.0-beta.23
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -185,6 +185,10 @@ declare const anthropicLanguageModelOptions: z.ZodObject<{
|
|
|
185
185
|
fast: "fast";
|
|
186
186
|
standard: "standard";
|
|
187
187
|
}>>;
|
|
188
|
+
inferenceGeo: z.ZodOptional<z.ZodEnum<{
|
|
189
|
+
us: "us";
|
|
190
|
+
global: "global";
|
|
191
|
+
}>>;
|
|
188
192
|
anthropicBeta: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
189
193
|
contextManagement: z.ZodOptional<z.ZodObject<{
|
|
190
194
|
edits: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
package/dist/index.d.ts
CHANGED
|
@@ -185,6 +185,10 @@ declare const anthropicLanguageModelOptions: z.ZodObject<{
|
|
|
185
185
|
fast: "fast";
|
|
186
186
|
standard: "standard";
|
|
187
187
|
}>>;
|
|
188
|
+
inferenceGeo: z.ZodOptional<z.ZodEnum<{
|
|
189
|
+
us: "us";
|
|
190
|
+
global: "global";
|
|
191
|
+
}>>;
|
|
188
192
|
anthropicBeta: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
189
193
|
contextManagement: z.ZodOptional<z.ZodObject<{
|
|
190
194
|
edits: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
package/dist/index.js
CHANGED
|
@@ -1012,6 +1012,15 @@ var anthropicLanguageModelOptions = import_v44.z.object({
|
|
|
1012
1012
|
* Only supported with claude-opus-4-6.
|
|
1013
1013
|
*/
|
|
1014
1014
|
speed: import_v44.z.enum(["fast", "standard"]).optional(),
|
|
1015
|
+
/**
|
|
1016
|
+
* Controls where model inference runs for this request.
|
|
1017
|
+
*
|
|
1018
|
+
* - `"global"`: Inference may run in any available geography (default).
|
|
1019
|
+
* - `"us"`: Inference runs only in US-based infrastructure.
|
|
1020
|
+
*
|
|
1021
|
+
* See https://platform.claude.com/docs/en/build-with-claude/data-residency
|
|
1022
|
+
*/
|
|
1023
|
+
inferenceGeo: import_v44.z.enum(["us", "global"]).optional(),
|
|
1015
1024
|
/**
|
|
1016
1025
|
* A set of beta features to enable.
|
|
1017
1026
|
* Allow a provider to receive the full `betas` set if it needs it.
|
|
@@ -3144,6 +3153,9 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
3144
3153
|
...(anthropicOptions == null ? void 0 : anthropicOptions.speed) && {
|
|
3145
3154
|
speed: anthropicOptions.speed
|
|
3146
3155
|
},
|
|
3156
|
+
...(anthropicOptions == null ? void 0 : anthropicOptions.inferenceGeo) && {
|
|
3157
|
+
inference_geo: anthropicOptions.inferenceGeo
|
|
3158
|
+
},
|
|
3147
3159
|
...(anthropicOptions == null ? void 0 : anthropicOptions.cacheControl) && {
|
|
3148
3160
|
cache_control: anthropicOptions.cacheControl
|
|
3149
3161
|
},
|
|
@@ -5370,7 +5382,7 @@ var AnthropicSkills = class {
|
|
|
5370
5382
|
};
|
|
5371
5383
|
|
|
5372
5384
|
// src/version.ts
|
|
5373
|
-
var VERSION = true ? "4.0.0-beta.
|
|
5385
|
+
var VERSION = true ? "4.0.0-beta.25" : "0.0.0-test";
|
|
5374
5386
|
|
|
5375
5387
|
// src/anthropic-provider.ts
|
|
5376
5388
|
function createAnthropic(options = {}) {
|