@ai-sdk/amazon-bedrock 3.0.0-alpha.9 → 3.0.0-beta.2
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 +87 -0
- package/dist/index.d.mts +4 -27
- package/dist/index.d.ts +4 -27
- package/dist/index.js +223 -159
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +149 -89
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,92 @@
|
|
|
1
1
|
# @ai-sdk/amazon-bedrock
|
|
2
2
|
|
|
3
|
+
## 3.0.0-beta.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d1a034f: feature: using Zod 4 for internal stuff
|
|
8
|
+
- Updated dependencies [0571b98]
|
|
9
|
+
- Updated dependencies [39a4fab]
|
|
10
|
+
- Updated dependencies [d1a034f]
|
|
11
|
+
- @ai-sdk/provider-utils@3.0.0-beta.2
|
|
12
|
+
|
|
13
|
+
## 3.0.0-beta.1
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [742b7be]
|
|
18
|
+
- Updated dependencies [7cddb72]
|
|
19
|
+
- Updated dependencies [ccce59b]
|
|
20
|
+
- Updated dependencies [e2b9e4b]
|
|
21
|
+
- Updated dependencies [45c1ea2]
|
|
22
|
+
- Updated dependencies [e025824]
|
|
23
|
+
- Updated dependencies [0d06df6]
|
|
24
|
+
- Updated dependencies [472524a]
|
|
25
|
+
- Updated dependencies [dd3ff01]
|
|
26
|
+
- Updated dependencies [7435eb5]
|
|
27
|
+
- Updated dependencies [cb68df0]
|
|
28
|
+
- Updated dependencies [bfdca8d]
|
|
29
|
+
- Updated dependencies [44f4aba]
|
|
30
|
+
- Updated dependencies [023ba40]
|
|
31
|
+
- Updated dependencies [5e57fae]
|
|
32
|
+
- Updated dependencies [71f938d]
|
|
33
|
+
- Updated dependencies [28a5ed5]
|
|
34
|
+
- @ai-sdk/provider@2.0.0-beta.1
|
|
35
|
+
- @ai-sdk/provider-utils@3.0.0-beta.1
|
|
36
|
+
|
|
37
|
+
## 3.0.0-alpha.15
|
|
38
|
+
|
|
39
|
+
### Patch Changes
|
|
40
|
+
|
|
41
|
+
- Updated dependencies [48d257a]
|
|
42
|
+
- Updated dependencies [8ba77a7]
|
|
43
|
+
- @ai-sdk/provider@2.0.0-alpha.15
|
|
44
|
+
- @ai-sdk/provider-utils@3.0.0-alpha.15
|
|
45
|
+
|
|
46
|
+
## 3.0.0-alpha.14
|
|
47
|
+
|
|
48
|
+
### Patch Changes
|
|
49
|
+
|
|
50
|
+
- Updated dependencies [b5da06a]
|
|
51
|
+
- Updated dependencies [63f9e9b]
|
|
52
|
+
- Updated dependencies [2e13791]
|
|
53
|
+
- @ai-sdk/provider@2.0.0-alpha.14
|
|
54
|
+
- @ai-sdk/provider-utils@3.0.0-alpha.14
|
|
55
|
+
|
|
56
|
+
## 3.0.0-alpha.13
|
|
57
|
+
|
|
58
|
+
### Patch Changes
|
|
59
|
+
|
|
60
|
+
- Updated dependencies [68ecf2f]
|
|
61
|
+
- @ai-sdk/provider@2.0.0-alpha.13
|
|
62
|
+
- @ai-sdk/provider-utils@3.0.0-alpha.13
|
|
63
|
+
|
|
64
|
+
## 3.0.0-alpha.12
|
|
65
|
+
|
|
66
|
+
### Patch Changes
|
|
67
|
+
|
|
68
|
+
- e2aceaf: feat: add raw chunk support
|
|
69
|
+
- Updated dependencies [e2aceaf]
|
|
70
|
+
- @ai-sdk/provider@2.0.0-alpha.12
|
|
71
|
+
- @ai-sdk/provider-utils@3.0.0-alpha.12
|
|
72
|
+
|
|
73
|
+
## 3.0.0-alpha.11
|
|
74
|
+
|
|
75
|
+
### Patch Changes
|
|
76
|
+
|
|
77
|
+
- d546725: fix(provider/amazon-bedrock): use consistent document names for prompt cache effectiveness
|
|
78
|
+
- Updated dependencies [c1e6647]
|
|
79
|
+
- @ai-sdk/provider@2.0.0-alpha.11
|
|
80
|
+
- @ai-sdk/provider-utils@3.0.0-alpha.11
|
|
81
|
+
|
|
82
|
+
## 3.0.0-alpha.10
|
|
83
|
+
|
|
84
|
+
### Patch Changes
|
|
85
|
+
|
|
86
|
+
- Updated dependencies [c4df419]
|
|
87
|
+
- @ai-sdk/provider@2.0.0-alpha.10
|
|
88
|
+
- @ai-sdk/provider-utils@3.0.0-alpha.10
|
|
89
|
+
|
|
3
90
|
## 3.0.0-alpha.9
|
|
4
91
|
|
|
5
92
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1,38 +1,15 @@
|
|
|
1
1
|
import { ProviderV2, LanguageModelV2, EmbeddingModelV2, ImageModelV2 } from '@ai-sdk/provider';
|
|
2
2
|
import { FetchFunction } from '@ai-sdk/provider-utils';
|
|
3
|
-
import { z } from 'zod';
|
|
3
|
+
import { z } from 'zod/v4';
|
|
4
4
|
|
|
5
5
|
type BedrockChatModelId = 'amazon.titan-tg1-large' | 'amazon.titan-text-express-v1' | 'anthropic.claude-v2' | 'anthropic.claude-v2:1' | 'anthropic.claude-instant-v1' | 'anthropic.claude-sonnet-4-20250514-v1:0' | 'anthropic.claude-opus-4-20250514-v1:0' | 'anthropic.claude-3-7-sonnet-20250219-v1:0' | 'anthropic.claude-3-5-sonnet-20240620-v1:0' | 'anthropic.claude-3-5-sonnet-20241022-v2:0' | 'anthropic.claude-3-5-haiku-20241022-v1:0' | 'anthropic.claude-3-sonnet-20240229-v1:0' | 'anthropic.claude-3-haiku-20240307-v1:0' | 'anthropic.claude-3-opus-20240229-v1:0' | 'cohere.command-text-v14' | 'cohere.command-light-text-v14' | 'cohere.command-r-v1:0' | 'cohere.command-r-plus-v1:0' | 'meta.llama3-70b-instruct-v1:0' | 'meta.llama3-8b-instruct-v1:0' | 'meta.llama3-1-405b-instruct-v1:0' | 'meta.llama3-1-70b-instruct-v1:0' | 'meta.llama3-1-8b-instruct-v1:0' | 'meta.llama3-2-11b-instruct-v1:0' | 'meta.llama3-2-1b-instruct-v1:0' | 'meta.llama3-2-3b-instruct-v1:0' | 'meta.llama3-2-90b-instruct-v1:0' | 'mistral.mistral-7b-instruct-v0:2' | 'mistral.mixtral-8x7b-instruct-v0:1' | 'mistral.mistral-large-2402-v1:0' | 'mistral.mistral-small-2402-v1:0' | 'amazon.titan-text-express-v1' | 'amazon.titan-text-lite-v1' | (string & {});
|
|
6
6
|
declare const bedrockProviderOptions: z.ZodObject<{
|
|
7
|
-
/**
|
|
8
|
-
* Additional inference parameters that the model supports,
|
|
9
|
-
* beyond the base set of inference parameters that Converse
|
|
10
|
-
* supports in the inferenceConfig field
|
|
11
|
-
*/
|
|
12
7
|
additionalModelRequestFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
13
8
|
reasoningConfig: z.ZodOptional<z.ZodObject<{
|
|
14
|
-
type: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"enabled">, z.ZodLiteral<"disabled">]>>;
|
|
9
|
+
type: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"enabled">, z.ZodLiteral<"disabled">]>>;
|
|
15
10
|
budgetTokens: z.ZodOptional<z.ZodNumber>;
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
budgetTokens?: number | undefined;
|
|
19
|
-
}, {
|
|
20
|
-
type?: "enabled" | "disabled" | undefined;
|
|
21
|
-
budgetTokens?: number | undefined;
|
|
22
|
-
}>>;
|
|
23
|
-
}, "strip", z.ZodTypeAny, {
|
|
24
|
-
additionalModelRequestFields?: Record<string, any> | undefined;
|
|
25
|
-
reasoningConfig?: {
|
|
26
|
-
type?: "enabled" | "disabled" | undefined;
|
|
27
|
-
budgetTokens?: number | undefined;
|
|
28
|
-
} | undefined;
|
|
29
|
-
}, {
|
|
30
|
-
additionalModelRequestFields?: Record<string, any> | undefined;
|
|
31
|
-
reasoningConfig?: {
|
|
32
|
-
type?: "enabled" | "disabled" | undefined;
|
|
33
|
-
budgetTokens?: number | undefined;
|
|
34
|
-
} | undefined;
|
|
35
|
-
}>;
|
|
11
|
+
}, z.core.$strip>>;
|
|
12
|
+
}, z.core.$strip>;
|
|
36
13
|
type BedrockProviderOptions = z.infer<typeof bedrockProviderOptions>;
|
|
37
14
|
|
|
38
15
|
type BedrockEmbeddingModelId = 'amazon.titan-embed-text-v1' | 'amazon.titan-embed-text-v2:0' | 'cohere.embed-english-v3' | 'cohere.embed-multilingual-v3' | (string & {});
|
package/dist/index.d.ts
CHANGED
|
@@ -1,38 +1,15 @@
|
|
|
1
1
|
import { ProviderV2, LanguageModelV2, EmbeddingModelV2, ImageModelV2 } from '@ai-sdk/provider';
|
|
2
2
|
import { FetchFunction } from '@ai-sdk/provider-utils';
|
|
3
|
-
import { z } from 'zod';
|
|
3
|
+
import { z } from 'zod/v4';
|
|
4
4
|
|
|
5
5
|
type BedrockChatModelId = 'amazon.titan-tg1-large' | 'amazon.titan-text-express-v1' | 'anthropic.claude-v2' | 'anthropic.claude-v2:1' | 'anthropic.claude-instant-v1' | 'anthropic.claude-sonnet-4-20250514-v1:0' | 'anthropic.claude-opus-4-20250514-v1:0' | 'anthropic.claude-3-7-sonnet-20250219-v1:0' | 'anthropic.claude-3-5-sonnet-20240620-v1:0' | 'anthropic.claude-3-5-sonnet-20241022-v2:0' | 'anthropic.claude-3-5-haiku-20241022-v1:0' | 'anthropic.claude-3-sonnet-20240229-v1:0' | 'anthropic.claude-3-haiku-20240307-v1:0' | 'anthropic.claude-3-opus-20240229-v1:0' | 'cohere.command-text-v14' | 'cohere.command-light-text-v14' | 'cohere.command-r-v1:0' | 'cohere.command-r-plus-v1:0' | 'meta.llama3-70b-instruct-v1:0' | 'meta.llama3-8b-instruct-v1:0' | 'meta.llama3-1-405b-instruct-v1:0' | 'meta.llama3-1-70b-instruct-v1:0' | 'meta.llama3-1-8b-instruct-v1:0' | 'meta.llama3-2-11b-instruct-v1:0' | 'meta.llama3-2-1b-instruct-v1:0' | 'meta.llama3-2-3b-instruct-v1:0' | 'meta.llama3-2-90b-instruct-v1:0' | 'mistral.mistral-7b-instruct-v0:2' | 'mistral.mixtral-8x7b-instruct-v0:1' | 'mistral.mistral-large-2402-v1:0' | 'mistral.mistral-small-2402-v1:0' | 'amazon.titan-text-express-v1' | 'amazon.titan-text-lite-v1' | (string & {});
|
|
6
6
|
declare const bedrockProviderOptions: z.ZodObject<{
|
|
7
|
-
/**
|
|
8
|
-
* Additional inference parameters that the model supports,
|
|
9
|
-
* beyond the base set of inference parameters that Converse
|
|
10
|
-
* supports in the inferenceConfig field
|
|
11
|
-
*/
|
|
12
7
|
additionalModelRequestFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
13
8
|
reasoningConfig: z.ZodOptional<z.ZodObject<{
|
|
14
|
-
type: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"enabled">, z.ZodLiteral<"disabled">]>>;
|
|
9
|
+
type: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"enabled">, z.ZodLiteral<"disabled">]>>;
|
|
15
10
|
budgetTokens: z.ZodOptional<z.ZodNumber>;
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
budgetTokens?: number | undefined;
|
|
19
|
-
}, {
|
|
20
|
-
type?: "enabled" | "disabled" | undefined;
|
|
21
|
-
budgetTokens?: number | undefined;
|
|
22
|
-
}>>;
|
|
23
|
-
}, "strip", z.ZodTypeAny, {
|
|
24
|
-
additionalModelRequestFields?: Record<string, any> | undefined;
|
|
25
|
-
reasoningConfig?: {
|
|
26
|
-
type?: "enabled" | "disabled" | undefined;
|
|
27
|
-
budgetTokens?: number | undefined;
|
|
28
|
-
} | undefined;
|
|
29
|
-
}, {
|
|
30
|
-
additionalModelRequestFields?: Record<string, any> | undefined;
|
|
31
|
-
reasoningConfig?: {
|
|
32
|
-
type?: "enabled" | "disabled" | undefined;
|
|
33
|
-
budgetTokens?: number | undefined;
|
|
34
|
-
} | undefined;
|
|
35
|
-
}>;
|
|
11
|
+
}, z.core.$strip>>;
|
|
12
|
+
}, z.core.$strip>;
|
|
36
13
|
type BedrockProviderOptions = z.infer<typeof bedrockProviderOptions>;
|
|
37
14
|
|
|
38
15
|
type BedrockEmbeddingModelId = 'amazon.titan-embed-text-v1' | 'amazon.titan-embed-text-v2:0' | 'cohere.embed-english-v3' | 'cohere.embed-multilingual-v3' | (string & {});
|