@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/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @ai-sdk/amazon-bedrock
2
2
 
3
+ ## 5.0.102
4
+
5
+ ### Patch Changes
6
+
7
+ - ede5b89: chore: migrate package builds from tsup to tsdown
8
+ - Updated dependencies [040033b]
9
+ - Updated dependencies [ede5b89]
10
+ - Updated dependencies [a587f55]
11
+ - @ai-sdk/openai@4.0.82
12
+ - @ai-sdk/anthropic@4.0.69
13
+ - @ai-sdk/provider@4.0.20
14
+ - @ai-sdk/provider-utils@5.0.52
15
+
16
+ ## 5.0.101
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies [4e94782]
21
+ - @ai-sdk/openai@4.0.81
22
+
3
23
  ## 5.0.100
4
24
 
5
25
  ### Patch Changes
@@ -1,91 +1,94 @@
1
- import { ProviderV4, LanguageModelV4 } from '@ai-sdk/provider';
2
- import { Resolvable, FetchFunction } from '@ai-sdk/provider-utils';
3
- import { anthropicTools } from '@ai-sdk/anthropic/internal';
4
-
1
+ import { LanguageModelV4, ProviderV4 } from "@ai-sdk/provider";
2
+ import { FetchFunction, Resolvable } from "@ai-sdk/provider-utils";
3
+ import { anthropicTools } from "@ai-sdk/anthropic/internal";
4
+ //#region src/amazon-bedrock-sigv4-fetch.d.ts
5
5
  interface AmazonBedrockCredentials {
6
- region: string;
7
- accessKeyId: string;
8
- secretAccessKey: string;
9
- sessionToken?: string;
6
+ region: string;
7
+ accessKeyId: string;
8
+ secretAccessKey: string;
9
+ sessionToken?: string;
10
10
  }
11
-
11
+ //#endregion
12
+ //#region src/anthropic/amazon-bedrock-anthropic-options.d.ts
12
13
  type AmazonBedrockAnthropicModelId = '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-sonnet-4-5-20250929-v1:0' | 'anthropic.claude-opus-4-20250514-v1:0' | 'anthropic.claude-sonnet-4-20250514-v1:0' | 'anthropic.claude-opus-4-1-20250805-v1:0' | 'anthropic.claude-haiku-4-5-20251001-v1:0' | 'anthropic.claude-3-7-sonnet-20250219-v1:0' | 'anthropic.claude-3-5-sonnet-20241022-v2:0' | 'anthropic.claude-3-5-sonnet-20240620-v1:0' | 'anthropic.claude-3-5-haiku-20241022-v1:0' | 'anthropic.claude-3-opus-20240229-v1:0' | 'anthropic.claude-3-sonnet-20240229-v1:0' | 'anthropic.claude-3-haiku-20240307-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-opus-4-20250514-v1:0' | 'us.anthropic.claude-sonnet-4-20250514-v1:0' | 'us.anthropic.claude-opus-4-1-20250805-v1:0' | 'us.anthropic.claude-haiku-4-5-20251001-v1:0' | 'us.anthropic.claude-3-7-sonnet-20250219-v1:0' | 'us.anthropic.claude-3-5-sonnet-20241022-v2:0' | 'us.anthropic.claude-3-5-sonnet-20240620-v1:0' | 'us.anthropic.claude-3-5-haiku-20241022-v1:0' | 'us.anthropic.claude-3-opus-20240229-v1:0' | 'us.anthropic.claude-3-sonnet-20240229-v1:0' | 'us.anthropic.claude-3-haiku-20240307-v1:0' | 'global.anthropic.claude-fable-5-1' | (string & {});
13
-
14
+ //#endregion
15
+ //#region src/anthropic/amazon-bedrock-anthropic-provider.d.ts
14
16
  interface AmazonBedrockAnthropicProvider extends ProviderV4 {
15
- /**
16
- * Creates a model for text generation.
17
- */
18
- (modelId: AmazonBedrockAnthropicModelId): LanguageModelV4;
19
- /**
20
- * Creates a model for text generation.
21
- */
22
- languageModel(modelId: AmazonBedrockAnthropicModelId): LanguageModelV4;
23
- /**
24
- * Anthropic-specific computer use tool.
25
- */
26
- tools: typeof anthropicTools;
27
- /**
28
- * @deprecated Use `embeddingModel` instead.
29
- */
30
- textEmbeddingModel(modelId: string): never;
17
+ /**
18
+ * Creates a model for text generation.
19
+ */
20
+ (modelId: AmazonBedrockAnthropicModelId): LanguageModelV4;
21
+ /**
22
+ * Creates a model for text generation.
23
+ */
24
+ languageModel(modelId: AmazonBedrockAnthropicModelId): LanguageModelV4;
25
+ /**
26
+ * Anthropic-specific computer use tool.
27
+ */
28
+ tools: typeof anthropicTools;
29
+ /**
30
+ * @deprecated Use `embeddingModel` instead.
31
+ */
32
+ textEmbeddingModel(modelId: string): never;
31
33
  }
32
34
  interface AmazonBedrockAnthropicProviderSettings {
33
- /**
34
- * The AWS region to use for the Bedrock provider. Defaults to the value of the
35
- * `AWS_REGION` environment variable.
36
- */
37
- region?: string;
38
- /**
39
- * API key for authenticating requests using Bearer token authentication.
40
- * When provided, this will be used instead of AWS SigV4 authentication.
41
- * Defaults to the value of the `AWS_BEARER_TOKEN_BEDROCK` environment variable.
42
- */
43
- apiKey?: string;
44
- /**
45
- * The AWS access key ID to use for the Bedrock provider. Defaults to the value of the
46
- * `AWS_ACCESS_KEY_ID` environment variable.
47
- */
48
- accessKeyId?: string;
49
- /**
50
- * The AWS secret access key to use for the Bedrock provider. Defaults to the value of the
51
- * `AWS_SECRET_ACCESS_KEY` environment variable.
52
- */
53
- secretAccessKey?: string;
54
- /**
55
- * The AWS session token to use for the Bedrock provider. Defaults to the value of the
56
- * `AWS_SESSION_TOKEN` environment variable.
57
- */
58
- sessionToken?: string;
59
- /**
60
- * Base URL for the Bedrock API calls.
61
- */
62
- baseURL?: string;
63
- /**
64
- * Custom headers to include in the requests.
65
- */
66
- headers?: Resolvable<Record<string, string | undefined>>;
67
- /**
68
- * Custom fetch implementation. You can use it as a middleware to intercept requests,
69
- * or to provide a custom fetch implementation for e.g. testing.
70
- */
71
- fetch?: FetchFunction;
72
- /**
73
- * The AWS credential provider to use for the Bedrock provider to get dynamic
74
- * credentials similar to the AWS SDK. Setting a provider here will cause its
75
- * credential values to be used instead of the `accessKeyId`, `secretAccessKey`,
76
- * and `sessionToken` settings.
77
- */
78
- credentialProvider?: () => PromiseLike<Omit<AmazonBedrockCredentials, 'region'>>;
35
+ /**
36
+ * The AWS region to use for the Bedrock provider. Defaults to the value of the
37
+ * `AWS_REGION` environment variable.
38
+ */
39
+ region?: string;
40
+ /**
41
+ * API key for authenticating requests using Bearer token authentication.
42
+ * When provided, this will be used instead of AWS SigV4 authentication.
43
+ * Defaults to the value of the `AWS_BEARER_TOKEN_BEDROCK` environment variable.
44
+ */
45
+ apiKey?: string;
46
+ /**
47
+ * The AWS access key ID to use for the Bedrock provider. Defaults to the value of the
48
+ * `AWS_ACCESS_KEY_ID` environment variable.
49
+ */
50
+ accessKeyId?: string;
51
+ /**
52
+ * The AWS secret access key to use for the Bedrock provider. Defaults to the value of the
53
+ * `AWS_SECRET_ACCESS_KEY` environment variable.
54
+ */
55
+ secretAccessKey?: string;
56
+ /**
57
+ * The AWS session token to use for the Bedrock provider. Defaults to the value of the
58
+ * `AWS_SESSION_TOKEN` environment variable.
59
+ */
60
+ sessionToken?: string;
61
+ /**
62
+ * Base URL for the Bedrock API calls.
63
+ */
64
+ baseURL?: string;
65
+ /**
66
+ * Custom headers to include in the requests.
67
+ */
68
+ headers?: Resolvable<Record<string, string | undefined>>;
69
+ /**
70
+ * Custom fetch implementation. You can use it as a middleware to intercept requests,
71
+ * or to provide a custom fetch implementation for e.g. testing.
72
+ */
73
+ fetch?: FetchFunction;
74
+ /**
75
+ * The AWS credential provider to use for the Bedrock provider to get dynamic
76
+ * credentials similar to the AWS SDK. Setting a provider here will cause its
77
+ * credential values to be used instead of the `accessKeyId`, `secretAccessKey`,
78
+ * and `sessionToken` settings.
79
+ */
80
+ credentialProvider?: () => PromiseLike<Omit<AmazonBedrockCredentials, 'region'>>;
79
81
  }
80
82
  /**
81
83
  * Create an Amazon Bedrock Anthropic provider instance.
82
84
  * This provider uses the native Anthropic API through Bedrock's InvokeModel endpoint,
83
85
  * bypassing the Converse API for better feature compatibility.
84
86
  */
85
- declare function createAmazonBedrockAnthropic(options?: AmazonBedrockAnthropicProviderSettings): AmazonBedrockAnthropicProvider;
87
+ export declare function createAmazonBedrockAnthropic(options?: AmazonBedrockAnthropicProviderSettings): AmazonBedrockAnthropicProvider;
86
88
  /**
87
89
  * Default Bedrock Anthropic provider instance.
88
90
  */
89
- declare const amazonBedrockAnthropic: AmazonBedrockAnthropicProvider;
90
-
91
- export { type AmazonBedrockAnthropicModelId, type AmazonBedrockAnthropicProvider, type AmazonBedrockAnthropicProviderSettings, type AmazonBedrockAnthropicModelId as BedrockAnthropicModelId, type AmazonBedrockAnthropicProvider as BedrockAnthropicProvider, type AmazonBedrockAnthropicProviderSettings as BedrockAnthropicProviderSettings, amazonBedrockAnthropic, amazonBedrockAnthropic as bedrockAnthropic, createAmazonBedrockAnthropic, createAmazonBedrockAnthropic as createBedrockAnthropic };
91
+ export declare const amazonBedrockAnthropic: AmazonBedrockAnthropicProvider;
92
+ //#endregion
93
+ export { type AmazonBedrockAnthropicModelId, type AmazonBedrockAnthropicModelId as BedrockAnthropicModelId, type AmazonBedrockAnthropicProvider, type AmazonBedrockAnthropicProvider as BedrockAnthropicProvider, type AmazonBedrockAnthropicProviderSettings, type AmazonBedrockAnthropicProviderSettings as BedrockAnthropicProviderSettings, amazonBedrockAnthropic as bedrockAnthropic, createAmazonBedrockAnthropic as createBedrockAnthropic };
94
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/amazon-bedrock-sigv4-fetch.ts","../../src/anthropic/amazon-bedrock-anthropic-options.ts","../../src/anthropic/amazon-bedrock-anthropic-provider.ts"],"mappings":";;;;UAUiB;EACf;EACA;EACA;EACA;;;;KCdU;;;UC2DK,uCAAuC;;;;GAIrD,SAAS,gCAAgC;;;;EAK1C,cAAc,SAAS,gCAAgC;;;;EAKvD,cAAc;;;;EAKd,mBAAmB;;UAGJ;;;;;EAKf;;;;;;EAOA;;;;;EAMA;;;;;EAMA;;;;;EAMA;;;;EAKA;;;;EAKA,UAAU,WAAW;;;;;EAMrB,QAAQ;;;;;;;EAQR,2BAA2B,YACzB,KAAK;;;;;;;wBASO,6BACd,UAAS,yCACR;;;;qBAiQU,wBAAsB"}