@ai-sdk/amazon-bedrock 3.1.0-beta.9 → 4.0.0-beta.100
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 +757 -0
- package/dist/index.d.mts +48 -6
- package/dist/index.d.ts +48 -6
- package/dist/index.js +436 -191
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +436 -183
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -7
package/dist/index.d.mts
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
import { FetchFunction } from '@ai-sdk/provider-utils';
|
|
3
|
-
import { anthropicTools } from '@ai-sdk/anthropic/internal';
|
|
1
|
+
export { AnthropicProviderOptions } from '@ai-sdk/anthropic';
|
|
4
2
|
import { z } from 'zod/v4';
|
|
3
|
+
import { anthropicTools } from '@ai-sdk/anthropic/internal';
|
|
4
|
+
import { ProviderV3, LanguageModelV3, EmbeddingModelV3, ImageModelV3, RerankingModelV3 } from '@ai-sdk/provider';
|
|
5
|
+
import { FetchFunction } from '@ai-sdk/provider-utils';
|
|
5
6
|
|
|
6
|
-
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-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-4-20250514-v1:0' | 'us.anthropic.claude-opus-4-20250514-v1:0' | 'us.anthropic.claude-opus-4-1-20250805-v1:0' | '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 & {});
|
|
7
|
+
type BedrockChatModelId = 'amazon.titan-tg1-large' | 'amazon.titan-text-express-v1' | 'anthropic.claude-v2' | 'anthropic.claude-v2:1' | 'anthropic.claude-instant-v1' | 'anthropic.claude-haiku-4-5-20251001-v1:0' | 'anthropic.claude-sonnet-4-20250514-v1:0' | 'anthropic.claude-sonnet-4-5-20250929-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-4-20250514-v1:0' | 'us.anthropic.claude-sonnet-4-5-20250929-v1:0' | 'us.anthropic.claude-opus-4-20250514-v1:0' | 'us.anthropic.claude-opus-4-1-20250805-v1:0' | '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 & {});
|
|
7
8
|
declare const bedrockProviderOptions: z.ZodObject<{
|
|
8
9
|
additionalModelRequestFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
9
10
|
reasoningConfig: z.ZodOptional<z.ZodObject<{
|
|
10
11
|
type: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"enabled">, z.ZodLiteral<"disabled">]>>;
|
|
11
12
|
budgetTokens: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
maxReasoningEffort: z.ZodOptional<z.ZodEnum<{
|
|
14
|
+
low: "low";
|
|
15
|
+
medium: "medium";
|
|
16
|
+
high: "high";
|
|
17
|
+
}>>;
|
|
12
18
|
}, z.core.$strip>>;
|
|
19
|
+
anthropicBeta: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
13
20
|
}, z.core.$strip>;
|
|
14
21
|
type BedrockProviderOptions = z.infer<typeof bedrockProviderOptions>;
|
|
15
22
|
|
|
@@ -24,6 +31,18 @@ interface BedrockCredentials {
|
|
|
24
31
|
sessionToken?: string;
|
|
25
32
|
}
|
|
26
33
|
|
|
34
|
+
type BedrockRerankingModelId = 'amazon.rerank-v1:0' | 'cohere.rerank-v3-5:0' | (string & {});
|
|
35
|
+
type BedrockRerankingOptions = {
|
|
36
|
+
/**
|
|
37
|
+
* 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.
|
|
38
|
+
*/
|
|
39
|
+
nextToken?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Additional model request fields to pass to the model.
|
|
42
|
+
*/
|
|
43
|
+
additionalModelRequestFields?: Record<string, unknown>;
|
|
44
|
+
};
|
|
45
|
+
|
|
27
46
|
interface AmazonBedrockProviderSettings {
|
|
28
47
|
/**
|
|
29
48
|
The AWS region to use for the Bedrock provider. Defaults to the value of the
|
|
@@ -94,7 +113,22 @@ interface AmazonBedrockProviderSettings {
|
|
|
94
113
|
interface AmazonBedrockProvider extends ProviderV3 {
|
|
95
114
|
(modelId: BedrockChatModelId): LanguageModelV3;
|
|
96
115
|
languageModel(modelId: BedrockChatModelId): LanguageModelV3;
|
|
97
|
-
|
|
116
|
+
/**
|
|
117
|
+
* Creates a model for text embeddings.
|
|
118
|
+
*/
|
|
119
|
+
embedding(modelId: BedrockEmbeddingModelId): EmbeddingModelV3;
|
|
120
|
+
/**
|
|
121
|
+
* Creates a model for text embeddings.
|
|
122
|
+
*/
|
|
123
|
+
embeddingModel(modelId: BedrockEmbeddingModelId): EmbeddingModelV3;
|
|
124
|
+
/**
|
|
125
|
+
* @deprecated Use `embedding` instead.
|
|
126
|
+
*/
|
|
127
|
+
textEmbedding(modelId: BedrockEmbeddingModelId): EmbeddingModelV3;
|
|
128
|
+
/**
|
|
129
|
+
* @deprecated Use `embeddingModel` instead.
|
|
130
|
+
*/
|
|
131
|
+
textEmbeddingModel(modelId: BedrockEmbeddingModelId): EmbeddingModelV3;
|
|
98
132
|
/**
|
|
99
133
|
Creates a model for image generation.
|
|
100
134
|
*/
|
|
@@ -104,6 +138,14 @@ interface AmazonBedrockProvider extends ProviderV3 {
|
|
|
104
138
|
*/
|
|
105
139
|
imageModel(modelId: BedrockImageModelId): ImageModelV3;
|
|
106
140
|
/**
|
|
141
|
+
* Creates a model for reranking documents.
|
|
142
|
+
*/
|
|
143
|
+
reranking(modelId: BedrockRerankingModelId): RerankingModelV3;
|
|
144
|
+
/**
|
|
145
|
+
* Creates a model for reranking documents.
|
|
146
|
+
*/
|
|
147
|
+
rerankingModel(modelId: BedrockRerankingModelId): RerankingModelV3;
|
|
148
|
+
/**
|
|
107
149
|
Anthropic-specific tools that can be used with Anthropic models on Bedrock.
|
|
108
150
|
*/
|
|
109
151
|
tools: typeof anthropicTools;
|
|
@@ -119,4 +161,4 @@ declare const bedrock: AmazonBedrockProvider;
|
|
|
119
161
|
|
|
120
162
|
declare const VERSION: string;
|
|
121
163
|
|
|
122
|
-
export { type AmazonBedrockProvider, type AmazonBedrockProviderSettings, type BedrockProviderOptions, VERSION, bedrock, createAmazonBedrock };
|
|
164
|
+
export { type AmazonBedrockProvider, type AmazonBedrockProviderSettings, type BedrockProviderOptions, type BedrockRerankingOptions, VERSION, bedrock, createAmazonBedrock };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
import { FetchFunction } from '@ai-sdk/provider-utils';
|
|
3
|
-
import { anthropicTools } from '@ai-sdk/anthropic/internal';
|
|
1
|
+
export { AnthropicProviderOptions } from '@ai-sdk/anthropic';
|
|
4
2
|
import { z } from 'zod/v4';
|
|
3
|
+
import { anthropicTools } from '@ai-sdk/anthropic/internal';
|
|
4
|
+
import { ProviderV3, LanguageModelV3, EmbeddingModelV3, ImageModelV3, RerankingModelV3 } from '@ai-sdk/provider';
|
|
5
|
+
import { FetchFunction } from '@ai-sdk/provider-utils';
|
|
5
6
|
|
|
6
|
-
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-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-4-20250514-v1:0' | 'us.anthropic.claude-opus-4-20250514-v1:0' | 'us.anthropic.claude-opus-4-1-20250805-v1:0' | '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 & {});
|
|
7
|
+
type BedrockChatModelId = 'amazon.titan-tg1-large' | 'amazon.titan-text-express-v1' | 'anthropic.claude-v2' | 'anthropic.claude-v2:1' | 'anthropic.claude-instant-v1' | 'anthropic.claude-haiku-4-5-20251001-v1:0' | 'anthropic.claude-sonnet-4-20250514-v1:0' | 'anthropic.claude-sonnet-4-5-20250929-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-4-20250514-v1:0' | 'us.anthropic.claude-sonnet-4-5-20250929-v1:0' | 'us.anthropic.claude-opus-4-20250514-v1:0' | 'us.anthropic.claude-opus-4-1-20250805-v1:0' | '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 & {});
|
|
7
8
|
declare const bedrockProviderOptions: z.ZodObject<{
|
|
8
9
|
additionalModelRequestFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
9
10
|
reasoningConfig: z.ZodOptional<z.ZodObject<{
|
|
10
11
|
type: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"enabled">, z.ZodLiteral<"disabled">]>>;
|
|
11
12
|
budgetTokens: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
maxReasoningEffort: z.ZodOptional<z.ZodEnum<{
|
|
14
|
+
low: "low";
|
|
15
|
+
medium: "medium";
|
|
16
|
+
high: "high";
|
|
17
|
+
}>>;
|
|
12
18
|
}, z.core.$strip>>;
|
|
19
|
+
anthropicBeta: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
13
20
|
}, z.core.$strip>;
|
|
14
21
|
type BedrockProviderOptions = z.infer<typeof bedrockProviderOptions>;
|
|
15
22
|
|
|
@@ -24,6 +31,18 @@ interface BedrockCredentials {
|
|
|
24
31
|
sessionToken?: string;
|
|
25
32
|
}
|
|
26
33
|
|
|
34
|
+
type BedrockRerankingModelId = 'amazon.rerank-v1:0' | 'cohere.rerank-v3-5:0' | (string & {});
|
|
35
|
+
type BedrockRerankingOptions = {
|
|
36
|
+
/**
|
|
37
|
+
* 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.
|
|
38
|
+
*/
|
|
39
|
+
nextToken?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Additional model request fields to pass to the model.
|
|
42
|
+
*/
|
|
43
|
+
additionalModelRequestFields?: Record<string, unknown>;
|
|
44
|
+
};
|
|
45
|
+
|
|
27
46
|
interface AmazonBedrockProviderSettings {
|
|
28
47
|
/**
|
|
29
48
|
The AWS region to use for the Bedrock provider. Defaults to the value of the
|
|
@@ -94,7 +113,22 @@ interface AmazonBedrockProviderSettings {
|
|
|
94
113
|
interface AmazonBedrockProvider extends ProviderV3 {
|
|
95
114
|
(modelId: BedrockChatModelId): LanguageModelV3;
|
|
96
115
|
languageModel(modelId: BedrockChatModelId): LanguageModelV3;
|
|
97
|
-
|
|
116
|
+
/**
|
|
117
|
+
* Creates a model for text embeddings.
|
|
118
|
+
*/
|
|
119
|
+
embedding(modelId: BedrockEmbeddingModelId): EmbeddingModelV3;
|
|
120
|
+
/**
|
|
121
|
+
* Creates a model for text embeddings.
|
|
122
|
+
*/
|
|
123
|
+
embeddingModel(modelId: BedrockEmbeddingModelId): EmbeddingModelV3;
|
|
124
|
+
/**
|
|
125
|
+
* @deprecated Use `embedding` instead.
|
|
126
|
+
*/
|
|
127
|
+
textEmbedding(modelId: BedrockEmbeddingModelId): EmbeddingModelV3;
|
|
128
|
+
/**
|
|
129
|
+
* @deprecated Use `embeddingModel` instead.
|
|
130
|
+
*/
|
|
131
|
+
textEmbeddingModel(modelId: BedrockEmbeddingModelId): EmbeddingModelV3;
|
|
98
132
|
/**
|
|
99
133
|
Creates a model for image generation.
|
|
100
134
|
*/
|
|
@@ -104,6 +138,14 @@ interface AmazonBedrockProvider extends ProviderV3 {
|
|
|
104
138
|
*/
|
|
105
139
|
imageModel(modelId: BedrockImageModelId): ImageModelV3;
|
|
106
140
|
/**
|
|
141
|
+
* Creates a model for reranking documents.
|
|
142
|
+
*/
|
|
143
|
+
reranking(modelId: BedrockRerankingModelId): RerankingModelV3;
|
|
144
|
+
/**
|
|
145
|
+
* Creates a model for reranking documents.
|
|
146
|
+
*/
|
|
147
|
+
rerankingModel(modelId: BedrockRerankingModelId): RerankingModelV3;
|
|
148
|
+
/**
|
|
107
149
|
Anthropic-specific tools that can be used with Anthropic models on Bedrock.
|
|
108
150
|
*/
|
|
109
151
|
tools: typeof anthropicTools;
|
|
@@ -119,4 +161,4 @@ declare const bedrock: AmazonBedrockProvider;
|
|
|
119
161
|
|
|
120
162
|
declare const VERSION: string;
|
|
121
163
|
|
|
122
|
-
export { type AmazonBedrockProvider, type AmazonBedrockProviderSettings, type BedrockProviderOptions, VERSION, bedrock, createAmazonBedrock };
|
|
164
|
+
export { type AmazonBedrockProvider, type AmazonBedrockProviderSettings, type BedrockProviderOptions, type BedrockRerankingOptions, VERSION, bedrock, createAmazonBedrock };
|