@ai-sdk/amazon-bedrock 5.0.100 → 5.0.102

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/dist/index.d.ts CHANGED
@@ -1,243 +1,250 @@
1
- export { AnthropicProviderOptions } from '@ai-sdk/anthropic';
2
- import { z } from 'zod/v4';
3
- import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
4
- import { InferSchema, FetchFunction } from '@ai-sdk/provider-utils';
5
- import { anthropicTools } from '@ai-sdk/anthropic/internal';
6
- import { ProviderV4, LanguageModelV4, EmbeddingModelV4, ImageModelV4, RerankingModelV4 } from '@ai-sdk/provider';
7
-
1
+ import { anthropicTools } from "@ai-sdk/anthropic/internal";
2
+ import { FetchFunction, InferSchema } from "@ai-sdk/provider-utils";
3
+ import { z } from "zod/v4";
4
+ import { EmbeddingModelV4, ImageModelV4, LanguageModelV4, ProviderV4, RerankingModelV4 } from "@ai-sdk/provider";
5
+ import { AnthropicProviderOptions } from "@ai-sdk/anthropic";
6
+ //#region src/amazon-bedrock-embedding-model-options.d.ts
8
7
  type AmazonBedrockEmbeddingModelId = 'amazon.titan-embed-text-v1' | 'amazon.titan-embed-text-v2:0' | 'cohere.embed-english-v3' | 'cohere.embed-multilingual-v3' | (string & {});
9
8
  type AmazonBedrockEmbeddingModelSettings = {
10
- /**
11
- * The embedding model family.
12
- *
13
- * Specify this when the model ID does not identify the underlying model,
14
- * such as an application inference profile ARN.
15
- */
16
- modelFamily?: 'titan' | 'cohere' | 'nova';
9
+ /**
10
+ * The embedding model family.
11
+ *
12
+ * Specify this when the model ID does not identify the underlying model,
13
+ * such as an application inference profile ARN.
14
+ */
15
+ modelFamily?: 'titan' | 'cohere' | 'nova';
17
16
  };
18
17
  declare const amazonBedrockEmbeddingModelOptionsSchema: z.ZodObject<{
19
- dimensions: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1024>, z.ZodLiteral<512>, z.ZodLiteral<256>]>>;
20
- normalize: z.ZodOptional<z.ZodBoolean>;
21
- embeddingDimension: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<256>, z.ZodLiteral<384>, z.ZodLiteral<1024>, z.ZodLiteral<3072>]>>;
22
- embeddingPurpose: z.ZodOptional<z.ZodEnum<{
23
- GENERIC_INDEX: "GENERIC_INDEX";
24
- TEXT_RETRIEVAL: "TEXT_RETRIEVAL";
25
- IMAGE_RETRIEVAL: "IMAGE_RETRIEVAL";
26
- VIDEO_RETRIEVAL: "VIDEO_RETRIEVAL";
27
- DOCUMENT_RETRIEVAL: "DOCUMENT_RETRIEVAL";
28
- AUDIO_RETRIEVAL: "AUDIO_RETRIEVAL";
29
- GENERIC_RETRIEVAL: "GENERIC_RETRIEVAL";
30
- CLASSIFICATION: "CLASSIFICATION";
31
- CLUSTERING: "CLUSTERING";
32
- }>>;
33
- inputType: z.ZodOptional<z.ZodEnum<{
34
- search_document: "search_document";
35
- search_query: "search_query";
36
- classification: "classification";
37
- clustering: "clustering";
38
- }>>;
39
- truncate: z.ZodOptional<z.ZodEnum<{
40
- NONE: "NONE";
41
- START: "START";
42
- END: "END";
43
- }>>;
44
- outputDimension: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<256>, z.ZodLiteral<512>, z.ZodLiteral<1024>, z.ZodLiteral<1536>]>>;
18
+ dimensions: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1024>, z.ZodLiteral<512>, z.ZodLiteral<256>]>>;
19
+ normalize: z.ZodOptional<z.ZodBoolean>;
20
+ embeddingDimension: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<256>, z.ZodLiteral<384>, z.ZodLiteral<1024>, z.ZodLiteral<3072>]>>;
21
+ embeddingPurpose: z.ZodOptional<z.ZodEnum<{
22
+ GENERIC_INDEX: "GENERIC_INDEX";
23
+ TEXT_RETRIEVAL: "TEXT_RETRIEVAL";
24
+ IMAGE_RETRIEVAL: "IMAGE_RETRIEVAL";
25
+ VIDEO_RETRIEVAL: "VIDEO_RETRIEVAL";
26
+ DOCUMENT_RETRIEVAL: "DOCUMENT_RETRIEVAL";
27
+ AUDIO_RETRIEVAL: "AUDIO_RETRIEVAL";
28
+ GENERIC_RETRIEVAL: "GENERIC_RETRIEVAL";
29
+ CLASSIFICATION: "CLASSIFICATION";
30
+ CLUSTERING: "CLUSTERING";
31
+ }>>;
32
+ inputType: z.ZodOptional<z.ZodEnum<{
33
+ search_document: "search_document";
34
+ search_query: "search_query";
35
+ classification: "classification";
36
+ clustering: "clustering";
37
+ }>>;
38
+ truncate: z.ZodOptional<z.ZodEnum<{
39
+ NONE: "NONE";
40
+ START: "START";
41
+ END: "END";
42
+ }>>;
43
+ outputDimension: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<256>, z.ZodLiteral<512>, z.ZodLiteral<1024>, z.ZodLiteral<1536>]>>;
45
44
  }, z.core.$strip>;
46
45
  type AmazonBedrockEmbeddingModelOptions = z.infer<typeof amazonBedrockEmbeddingModelOptionsSchema>;
47
-
48
- declare const amazonBedrockImageModelOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
49
- quality?: "standard" | "premium" | undefined;
50
- negativeText?: string | undefined;
51
- cfgScale?: number | undefined;
52
- style?: "3D_ANIMATED_FAMILY_FILM" | "DESIGN_SKETCH" | "FLAT_VECTOR_ILLUSTRATION" | "GRAPHIC_NOVEL_ILLUSTRATION" | "MAXIMALISM" | "MIDCENTURY_RETRO" | "PHOTOREALISM" | "SOFT_DIGITAL_PAINTING" | undefined;
53
- taskType?: "TEXT_IMAGE" | "IMAGE_VARIATION" | "INPAINTING" | "OUTPAINTING" | "BACKGROUND_REMOVAL" | undefined;
54
- maskPrompt?: string | undefined;
55
- outPaintingMode?: "DEFAULT" | "PRECISE" | undefined;
56
- similarityStrength?: number | undefined;
46
+ //#endregion
47
+ //#region src/amazon-bedrock-image-model-options.d.ts
48
+ declare const amazonBedrockImageModelOptionsSchema: import("@ai-sdk/provider-utils").LazySchema<{
49
+ quality?: "standard" | "premium" | undefined;
50
+ negativeText?: string | undefined;
51
+ cfgScale?: number | undefined;
52
+ style?: "3D_ANIMATED_FAMILY_FILM" | "DESIGN_SKETCH" | "FLAT_VECTOR_ILLUSTRATION" | "GRAPHIC_NOVEL_ILLUSTRATION" | "MAXIMALISM" | "MIDCENTURY_RETRO" | "PHOTOREALISM" | "SOFT_DIGITAL_PAINTING" | undefined;
53
+ taskType?: "TEXT_IMAGE" | "IMAGE_VARIATION" | "INPAINTING" | "OUTPAINTING" | "BACKGROUND_REMOVAL" | undefined;
54
+ maskPrompt?: string | undefined;
55
+ outPaintingMode?: "DEFAULT" | "PRECISE" | undefined;
56
+ similarityStrength?: number | undefined;
57
57
  }>;
58
58
  type AmazonBedrockImageModelOptions = InferSchema<typeof amazonBedrockImageModelOptionsSchema>;
59
-
59
+ //#endregion
60
+ //#region src/amazon-bedrock-chat-language-model-options.d.ts
60
61
  type AmazonBedrockChatModelId = 'amazon.titan-tg1-large' | 'amazon.titan-text-express-v1' | 'anthropic.claude-v2' | 'anthropic.claude-v2:1' | 'anthropic.claude-instant-v1' | 'anthropic.claude-sonnet-5' | 'anthropic.claude-sonnet-5-5' | 'anthropic.claude-fable-5' | 'anthropic.claude-fable-5-1' | 'anthropic.claude-opus-5' | 'anthropic.claude-opus-5-5' | 'anthropic.claude-opus-4-8' | 'anthropic.claude-opus-4-7' | 'anthropic.claude-opus-4-6-v1' | 'anthropic.claude-sonnet-4-6-v1' | 'anthropic.claude-opus-4-5-20251101-v1:0' | 'anthropic.claude-haiku-4-5-20251001-v1:0' | 'anthropic.claude-sonnet-4-5-20250929-v1:0' | 'anthropic.claude-sonnet-4-20250514-v1:0' | 'anthropic.claude-opus-4-20250514-v1:0' | 'anthropic.claude-opus-4-1-20250805-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' | 'openai.gpt-oss-120b-1:0' | 'openai.gpt-oss-20b-1:0' | 'amazon.titan-text-express-v1' | 'amazon.titan-text-lite-v1' | 'us.amazon.nova-premier-v1:0' | 'us.amazon.nova-pro-v1:0' | 'us.amazon.nova-micro-v1:0' | 'us.amazon.nova-lite-v1:0' | 'us.anthropic.claude-3-sonnet-20240229-v1:0' | 'us.anthropic.claude-3-opus-20240229-v1:0' | 'us.anthropic.claude-3-haiku-20240307-v1:0' | 'us.anthropic.claude-3-5-sonnet-20240620-v1:0' | 'us.anthropic.claude-3-5-haiku-20241022-v1:0' | 'us.anthropic.claude-3-5-sonnet-20241022-v2:0' | 'us.anthropic.claude-3-7-sonnet-20250219-v1:0' | 'us.anthropic.claude-sonnet-5' | 'us.anthropic.claude-sonnet-5-5' | 'us.anthropic.claude-fable-5' | 'us.anthropic.claude-fable-5-1' | 'us.anthropic.claude-opus-5' | 'us.anthropic.claude-opus-5-5' | 'us.anthropic.claude-opus-4-8' | 'us.anthropic.claude-opus-4-7' | 'us.anthropic.claude-opus-4-6-v1' | 'us.anthropic.claude-sonnet-4-6-v1' | 'us.anthropic.claude-opus-4-5-20251101-v1:0' | 'us.anthropic.claude-sonnet-4-5-20250929-v1:0' | 'us.anthropic.claude-sonnet-4-20250514-v1:0' | 'us.anthropic.claude-opus-4-20250514-v1:0' | 'us.anthropic.claude-opus-4-1-20250805-v1:0' | 'us.anthropic.claude-haiku-4-5-20251001-v1:0' | 'global.anthropic.claude-fable-5-1' | 'us.meta.llama3-2-11b-instruct-v1:0' | 'us.meta.llama3-2-3b-instruct-v1:0' | 'us.meta.llama3-2-90b-instruct-v1:0' | 'us.meta.llama3-2-1b-instruct-v1:0' | 'us.meta.llama3-1-8b-instruct-v1:0' | 'us.meta.llama3-1-70b-instruct-v1:0' | 'us.meta.llama3-3-70b-instruct-v1:0' | 'us.deepseek.r1-v1:0' | 'us.mistral.pixtral-large-2502-v1:0' | 'us.meta.llama4-scout-17b-instruct-v1:0' | 'us.meta.llama4-maverick-17b-instruct-v1:0' | (string & {});
61
62
  type AmazonBedrockChatModelSettings = {
62
- /**
63
- * The chat model family.
64
- *
65
- * Specify this when the model ID does not identify the underlying model,
66
- * such as an application inference profile ARN.
67
- */
68
- modelFamily?: 'anthropic';
63
+ /**
64
+ * The chat model family.
65
+ *
66
+ * Specify this when the model ID does not identify the underlying model,
67
+ * such as an application inference profile ARN.
68
+ */
69
+ modelFamily?: 'anthropic';
69
70
  };
70
71
  declare const amazonBedrockLanguageModelChatOptions: z.ZodObject<{
71
- structuredOutputMode: z.ZodOptional<z.ZodEnum<{
72
- outputFormat: "outputFormat";
73
- jsonTool: "jsonTool";
74
- auto: "auto";
72
+ structuredOutputMode: z.ZodOptional<z.ZodEnum<{
73
+ outputFormat: "outputFormat";
74
+ jsonTool: "jsonTool";
75
+ auto: "auto";
76
+ }>>;
77
+ additionalModelRequestFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
78
+ reasoningConfig: z.ZodOptional<z.ZodObject<{
79
+ type: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"enabled">, z.ZodLiteral<"disabled">, z.ZodLiteral<"adaptive">]>>;
80
+ budgetTokens: z.ZodOptional<z.ZodNumber>;
81
+ maxReasoningEffort: z.ZodOptional<z.ZodEnum<{
82
+ low: "low";
83
+ medium: "medium";
84
+ high: "high";
85
+ xhigh: "xhigh";
86
+ max: "max";
75
87
  }>>;
76
- additionalModelRequestFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
77
- reasoningConfig: z.ZodOptional<z.ZodObject<{
78
- type: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"enabled">, z.ZodLiteral<"disabled">, z.ZodLiteral<"adaptive">]>>;
79
- budgetTokens: z.ZodOptional<z.ZodNumber>;
80
- maxReasoningEffort: z.ZodOptional<z.ZodEnum<{
81
- low: "low";
82
- medium: "medium";
83
- high: "high";
84
- xhigh: "xhigh";
85
- max: "max";
86
- }>>;
87
- display: z.ZodOptional<z.ZodEnum<{
88
- omitted: "omitted";
89
- summarized: "summarized";
90
- }>>;
91
- }, z.core.$strip>>;
92
- anthropicBeta: z.ZodOptional<z.ZodArray<z.ZodString>>;
93
- serviceTier: z.ZodOptional<z.ZodEnum<{
94
- default: "default";
95
- reserved: "reserved";
96
- priority: "priority";
97
- flex: "flex";
88
+ display: z.ZodOptional<z.ZodEnum<{
89
+ omitted: "omitted";
90
+ summarized: "summarized";
98
91
  }>>;
92
+ }, z.core.$strip>>;
93
+ anthropicBeta: z.ZodOptional<z.ZodArray<z.ZodString>>;
94
+ serviceTier: z.ZodOptional<z.ZodEnum<{
95
+ default: "default";
96
+ reserved: "reserved";
97
+ priority: "priority";
98
+ flex: "flex";
99
+ }>>;
99
100
  }, z.core.$strip>;
100
101
  type AmazonBedrockLanguageModelChatOptions = z.infer<typeof amazonBedrockLanguageModelChatOptions>;
101
-
102
+ //#endregion
103
+ //#region src/amazon-bedrock-image-settings.d.ts
102
104
  type AmazonBedrockImageModelId = 'amazon.nova-canvas-v1:0' | (string & {});
103
-
105
+ //#endregion
106
+ //#region src/amazon-bedrock-sigv4-fetch.d.ts
104
107
  interface AmazonBedrockCredentials {
105
- region: string;
106
- accessKeyId: string;
107
- secretAccessKey: string;
108
- sessionToken?: string;
108
+ region: string;
109
+ accessKeyId: string;
110
+ secretAccessKey: string;
111
+ sessionToken?: string;
109
112
  }
110
-
113
+ //#endregion
114
+ //#region src/reranking/amazon-bedrock-reranking-model-options.d.ts
111
115
  type AmazonBedrockRerankingModelId = 'amazon.rerank-v1:0' | 'cohere.rerank-v3-5:0' | (string & {});
112
116
  type AmazonBedrockRerankingModelOptions = {
113
- /**
114
- * If the total number of results was greater than could fit in a response, a token is returned in the nextToken field. You can enter that token in this field to return the next batch of results.
115
- */
116
- nextToken?: string;
117
- /**
118
- * Additional model request fields to pass to the model.
119
- */
120
- additionalModelRequestFields?: Record<string, unknown>;
117
+ /**
118
+ * If the total number of results was greater than could fit in a response, a token is returned in the nextToken field. You can enter that token in this field to return the next batch of results.
119
+ */
120
+ nextToken?: string;
121
+ /**
122
+ * Additional model request fields to pass to the model.
123
+ */
124
+ additionalModelRequestFields?: Record<string, unknown>;
121
125
  };
122
-
126
+ //#endregion
127
+ //#region src/amazon-bedrock-provider.d.ts
123
128
  interface AmazonBedrockProviderSettings {
124
- /**
125
- * The AWS region to use for the Bedrock provider. Defaults to the value of the
126
- * `AWS_REGION` environment variable.
127
- */
128
- region?: string;
129
- /**
130
- * API key for authenticating requests using Bearer token authentication.
131
- * When provided, this will be used instead of AWS SigV4 authentication.
132
- * Defaults to the value of the `AWS_BEARER_TOKEN_BEDROCK` environment variable.
133
- *
134
- * @example
135
- * ```typescript
136
- * // Using API key directly
137
- * const bedrock = createAmazonBedrock({
138
- * apiKey: 'your-api-key-here',
139
- * region: 'us-east-1'
140
- * });
141
- *
142
- * // Using environment variable AWS_BEARER_TOKEN_BEDROCK
143
- * const bedrock = createAmazonBedrock({
144
- * region: 'us-east-1'
145
- * });
146
- * ```
147
- *
148
- * Note: When `apiKey` is provided, it takes precedence over AWS SigV4 authentication.
149
- * If neither `apiKey` nor `AWS_BEARER_TOKEN_BEDROCK` environment variable is set,
150
- * the provider will fall back to AWS SigV4 authentication using AWS credentials.
151
- */
152
- apiKey?: string;
153
- /**
154
- * The AWS access key ID to use for the Bedrock provider. Defaults to the value of the
155
- * `AWS_ACCESS_KEY_ID` environment variable.
156
- */
157
- accessKeyId?: string;
158
- /**
159
- * The AWS secret access key to use for the Bedrock provider. Defaults to the value of the
160
- * `AWS_SECRET_ACCESS_KEY` environment variable.
161
- */
162
- secretAccessKey?: string;
163
- /**
164
- * The AWS session token to use for the Bedrock provider. When `accessKeyId` and
165
- * `secretAccessKey` are both passed explicitly as options, only this field is used
166
- * If either access key field is omitted and resolved from the environment, the
167
- * session token also falls back to `AWS_SESSION_TOKEN` when not set here.
168
- */
169
- sessionToken?: string;
170
- /**
171
- * Base URL for the Bedrock API calls.
172
- */
173
- baseURL?: string;
174
- /**
175
- * Custom headers to include in the requests.
176
- */
177
- headers?: Record<string, string>;
178
- /**
179
- * Custom fetch implementation. You can use it as a middleware to intercept requests,
180
- * or to provide a custom fetch implementation for e.g. testing.
181
- */
182
- fetch?: FetchFunction;
183
- /**
184
- * The AWS credential provider to use for the Bedrock provider to get dynamic
185
- * credentials similar to the AWS SDK. Setting a provider here will cause its
186
- * credential values to be used instead of the `accessKeyId`, `secretAccessKey`,
187
- * and `sessionToken` settings.
188
- */
189
- credentialProvider?: () => PromiseLike<Omit<AmazonBedrockCredentials, 'region'>>;
190
- generateId?: () => string;
129
+ /**
130
+ * The AWS region to use for the Bedrock provider. Defaults to the value of the
131
+ * `AWS_REGION` environment variable.
132
+ */
133
+ region?: string;
134
+ /**
135
+ * API key for authenticating requests using Bearer token authentication.
136
+ * When provided, this will be used instead of AWS SigV4 authentication.
137
+ * Defaults to the value of the `AWS_BEARER_TOKEN_BEDROCK` environment variable.
138
+ *
139
+ * @example
140
+ * ```typescript
141
+ * // Using API key directly
142
+ * const bedrock = createAmazonBedrock({
143
+ * apiKey: 'your-api-key-here',
144
+ * region: 'us-east-1'
145
+ * });
146
+ *
147
+ * // Using environment variable AWS_BEARER_TOKEN_BEDROCK
148
+ * const bedrock = createAmazonBedrock({
149
+ * region: 'us-east-1'
150
+ * });
151
+ * ```
152
+ *
153
+ * Note: When `apiKey` is provided, it takes precedence over AWS SigV4 authentication.
154
+ * If neither `apiKey` nor `AWS_BEARER_TOKEN_BEDROCK` environment variable is set,
155
+ * the provider will fall back to AWS SigV4 authentication using AWS credentials.
156
+ */
157
+ apiKey?: string;
158
+ /**
159
+ * The AWS access key ID to use for the Bedrock provider. Defaults to the value of the
160
+ * `AWS_ACCESS_KEY_ID` environment variable.
161
+ */
162
+ accessKeyId?: string;
163
+ /**
164
+ * The AWS secret access key to use for the Bedrock provider. Defaults to the value of the
165
+ * `AWS_SECRET_ACCESS_KEY` environment variable.
166
+ */
167
+ secretAccessKey?: string;
168
+ /**
169
+ * The AWS session token to use for the Bedrock provider. When `accessKeyId` and
170
+ * `secretAccessKey` are both passed explicitly as options, only this field is used
171
+ * If either access key field is omitted and resolved from the environment, the
172
+ * session token also falls back to `AWS_SESSION_TOKEN` when not set here.
173
+ */
174
+ sessionToken?: string;
175
+ /**
176
+ * Base URL for the Bedrock API calls.
177
+ */
178
+ baseURL?: string;
179
+ /**
180
+ * Custom headers to include in the requests.
181
+ */
182
+ headers?: Record<string, string>;
183
+ /**
184
+ * Custom fetch implementation. You can use it as a middleware to intercept requests,
185
+ * or to provide a custom fetch implementation for e.g. testing.
186
+ */
187
+ fetch?: FetchFunction;
188
+ /**
189
+ * The AWS credential provider to use for the Bedrock provider to get dynamic
190
+ * credentials similar to the AWS SDK. Setting a provider here will cause its
191
+ * credential values to be used instead of the `accessKeyId`, `secretAccessKey`,
192
+ * and `sessionToken` settings.
193
+ */
194
+ credentialProvider?: () => PromiseLike<Omit<AmazonBedrockCredentials, 'region'>>;
195
+ generateId?: () => string;
191
196
  }
192
197
  interface AmazonBedrockProvider extends ProviderV4 {
193
- (modelId: AmazonBedrockChatModelId, settings?: AmazonBedrockChatModelSettings): LanguageModelV4;
194
- languageModel(modelId: AmazonBedrockChatModelId, settings?: AmazonBedrockChatModelSettings): LanguageModelV4;
195
- /**
196
- * Creates a model for text embeddings.
197
- */
198
- embedding(modelId: AmazonBedrockEmbeddingModelId, settings?: AmazonBedrockEmbeddingModelSettings): EmbeddingModelV4;
199
- /**
200
- * Creates a model for text embeddings.
201
- */
202
- embeddingModel(modelId: AmazonBedrockEmbeddingModelId, settings?: AmazonBedrockEmbeddingModelSettings): EmbeddingModelV4;
203
- /**
204
- * @deprecated Use `embedding` instead.
205
- */
206
- textEmbedding(modelId: AmazonBedrockEmbeddingModelId, settings?: AmazonBedrockEmbeddingModelSettings): EmbeddingModelV4;
207
- /**
208
- * @deprecated Use `embeddingModel` instead.
209
- */
210
- textEmbeddingModel(modelId: AmazonBedrockEmbeddingModelId, settings?: AmazonBedrockEmbeddingModelSettings): EmbeddingModelV4;
211
- /**
212
- * Creates a model for image generation.
213
- */
214
- image(modelId: AmazonBedrockImageModelId): ImageModelV4;
215
- /**
216
- * Creates a model for image generation.
217
- */
218
- imageModel(modelId: AmazonBedrockImageModelId): ImageModelV4;
219
- /**
220
- * Creates a model for reranking documents.
221
- */
222
- reranking(modelId: AmazonBedrockRerankingModelId): RerankingModelV4;
223
- /**
224
- * Creates a model for reranking documents.
225
- */
226
- rerankingModel(modelId: AmazonBedrockRerankingModelId): RerankingModelV4;
227
- /**
228
- * Anthropic-specific tools that can be used with Anthropic models on Bedrock.
229
- */
230
- tools: typeof anthropicTools;
198
+ (modelId: AmazonBedrockChatModelId, settings?: AmazonBedrockChatModelSettings): LanguageModelV4;
199
+ languageModel(modelId: AmazonBedrockChatModelId, settings?: AmazonBedrockChatModelSettings): LanguageModelV4;
200
+ /**
201
+ * Creates a model for text embeddings.
202
+ */
203
+ embedding(modelId: AmazonBedrockEmbeddingModelId, settings?: AmazonBedrockEmbeddingModelSettings): EmbeddingModelV4;
204
+ /**
205
+ * Creates a model for text embeddings.
206
+ */
207
+ embeddingModel(modelId: AmazonBedrockEmbeddingModelId, settings?: AmazonBedrockEmbeddingModelSettings): EmbeddingModelV4;
208
+ /**
209
+ * @deprecated Use `embedding` instead.
210
+ */
211
+ textEmbedding(modelId: AmazonBedrockEmbeddingModelId, settings?: AmazonBedrockEmbeddingModelSettings): EmbeddingModelV4;
212
+ /**
213
+ * @deprecated Use `embeddingModel` instead.
214
+ */
215
+ textEmbeddingModel(modelId: AmazonBedrockEmbeddingModelId, settings?: AmazonBedrockEmbeddingModelSettings): EmbeddingModelV4;
216
+ /**
217
+ * Creates a model for image generation.
218
+ */
219
+ image(modelId: AmazonBedrockImageModelId): ImageModelV4;
220
+ /**
221
+ * Creates a model for image generation.
222
+ */
223
+ imageModel(modelId: AmazonBedrockImageModelId): ImageModelV4;
224
+ /**
225
+ * Creates a model for reranking documents.
226
+ */
227
+ reranking(modelId: AmazonBedrockRerankingModelId): RerankingModelV4;
228
+ /**
229
+ * Creates a model for reranking documents.
230
+ */
231
+ rerankingModel(modelId: AmazonBedrockRerankingModelId): RerankingModelV4;
232
+ /**
233
+ * Anthropic-specific tools that can be used with Anthropic models on Bedrock.
234
+ */
235
+ tools: typeof anthropicTools;
231
236
  }
232
237
  /**
233
238
  * Create an Amazon Bedrock provider instance.
234
239
  */
235
- declare function createAmazonBedrock(options?: AmazonBedrockProviderSettings): AmazonBedrockProvider;
240
+ export declare function createAmazonBedrock(options?: AmazonBedrockProviderSettings): AmazonBedrockProvider;
236
241
  /**
237
242
  * Default Amazon Bedrock provider instance.
238
243
  */
239
- declare const amazonBedrock: AmazonBedrockProvider;
240
-
241
- declare const VERSION: string;
242
-
243
- export { type AmazonBedrockChatModelSettings, type AmazonBedrockEmbeddingModelOptions, type AmazonBedrockEmbeddingModelSettings, type AmazonBedrockImageModelOptions, type AmazonBedrockLanguageModelChatOptions, type AmazonBedrockLanguageModelChatOptions as AmazonBedrockLanguageModelOptions, type AmazonBedrockProvider, type AmazonBedrockProviderSettings, type AmazonBedrockRerankingModelOptions, type AmazonBedrockLanguageModelChatOptions as BedrockProviderOptions, type AmazonBedrockRerankingModelOptions as BedrockRerankingOptions, VERSION, amazonBedrock, amazonBedrock as bedrock, createAmazonBedrock };
244
+ export declare const amazonBedrock: AmazonBedrockProvider;
245
+ //#endregion
246
+ //#region src/version.d.ts
247
+ export declare const VERSION: string;
248
+ //#endregion
249
+ export { type AmazonBedrockChatModelSettings, type AmazonBedrockEmbeddingModelOptions, type AmazonBedrockEmbeddingModelSettings, type AmazonBedrockImageModelOptions, type AmazonBedrockLanguageModelChatOptions, type AmazonBedrockLanguageModelChatOptions as AmazonBedrockLanguageModelOptions, type AmazonBedrockLanguageModelChatOptions as BedrockProviderOptions, type AmazonBedrockProvider, type AmazonBedrockProviderSettings, type AmazonBedrockRerankingModelOptions, type AmazonBedrockRerankingModelOptions as BedrockRerankingOptions, type AnthropicProviderOptions, amazonBedrock as bedrock };
250
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/amazon-bedrock-embedding-model-options.ts","../src/amazon-bedrock-image-model-options.ts","../src/amazon-bedrock-chat-language-model-options.ts","../src/amazon-bedrock-image-settings.ts","../src/amazon-bedrock-sigv4-fetch.ts","../src/reranking/amazon-bedrock-reranking-model-options.ts","../src/amazon-bedrock-provider.ts","../src/version.ts"],"mappings":";;;;;;KAEY;KAOA;;;;;;;EAOV;;cAGW,0CAAwC,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEnD,EAAA,KAAA;KAEU,qCAAqC,EAAE,aAC1C;;;cC/EI,uEAAoC;;;;;;;;;;KAkCrC,iCAAiC,mBACpC;;;KCvCG;KA2FA;;;;;;;EAOV;;cAqDW,uCAAqC,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6ChD,EAAA,KAAA;KAEU,wCAAwC,EAAE,aAC7C;;;KC1MG;;;UCUK;EACf;EACA;EACA;EACA;;;;KCVU;KAKA;;;;EAIV;;;;EAKA,+BAA+B;;;;UCmBhB;;;;;EAKf;;;;;;;;;;;;;;;;;;;;;;;;EAyBA;;;;;EAMA;;;;;EAMA;;;;;;;EAQA;;;;EAKA;;;;EAKA,UAAU;;;;;EAMV,QAAQ;;;;;;;EAQR,2BAA2B,YACzB,KAAK;EAIP;;UAGe,8BAA8B;GAE3C,SAAS,0BACT,WAAW,iCACV;EAEH,cACE,SAAS,0BACT,WAAW,iCACV;;;;EAKH,UACE,SAAS,+BACT,WAAW,sCACV;;;;EAKH,eACE,SAAS,+BACT,WAAW,sCACV;;;;EAKH,cACE,SAAS,+BACT,WAAW,sCACV;;;;EAKH,mBACE,SAAS,+BACT,WAAW,sCACV;;;;EAKH,MAAM,SAAS,4BAA4B;;;;EAK3C,WAAW,SAAS,4BAA4B;;;;EAKhD,UAAU,SAAS,gCAAgC;;;;EAKnD,eAAe,SAAS,gCAAgC;;;;EAKxD,cAAc;;;;;wBAMA,oBACd,UAAS,gCACR;;;;qBA+MU,eAAa;;;qBC9Yb"}