@ai-sdk/amazon-bedrock 5.0.0-beta.15 → 5.0.0-beta.17

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.mjs CHANGED
@@ -87,7 +87,17 @@ var amazonBedrockLanguageModelOptions = z.object({
87
87
  /**
88
88
  * Anthropic beta features to enable
89
89
  */
90
- anthropicBeta: z.array(z.string()).optional()
90
+ anthropicBeta: z.array(z.string()).optional(),
91
+ /**
92
+ * Service tier for the request.
93
+ * @see https://docs.aws.amazon.com/bedrock/latest/userguide/service-tiers-inference.html
94
+ *
95
+ * - 'reserved': Uses provisioned throughput capacity
96
+ * - 'priority': Prioritizes low-latency inference when capacity is available
97
+ * - 'default': Standard on-demand tier
98
+ * - 'flex': Lower-cost tier for flexible latency workloads
99
+ */
100
+ serviceTier: z.enum(["reserved", "priority", "default", "flex"]).optional()
91
101
  });
92
102
 
93
103
  // src/bedrock-error.ts
@@ -1007,6 +1017,7 @@ var BedrockChatLanguageModel = class {
1007
1017
  const {
1008
1018
  reasoningConfig: _,
1009
1019
  additionalModelRequestFields: __,
1020
+ serviceTier: ___,
1010
1021
  ...filteredBedrockOptions
1011
1022
  } = (providerOptions == null ? void 0 : providerOptions.bedrock) || {};
1012
1023
  const additionalModelResponseFieldPaths = isAnthropicModel ? ["/delta/stop_sequence"] : void 0;
@@ -1021,6 +1032,11 @@ var BedrockChatLanguageModel = class {
1021
1032
  ...Object.keys(inferenceConfig).length > 0 && {
1022
1033
  inferenceConfig
1023
1034
  },
1035
+ ...bedrockOptions.serviceTier != null && {
1036
+ serviceTier: {
1037
+ type: bedrockOptions.serviceTier
1038
+ }
1039
+ },
1024
1040
  ...filteredBedrockOptions,
1025
1041
  ...toolConfig.tools !== void 0 && toolConfig.tools.length > 0 ? { toolConfig } : {}
1026
1042
  },
@@ -2041,7 +2057,7 @@ import {
2041
2057
  import { AwsV4Signer } from "aws4fetch";
2042
2058
 
2043
2059
  // src/version.ts
2044
- var VERSION = true ? "5.0.0-beta.15" : "0.0.0-test";
2060
+ var VERSION = true ? "5.0.0-beta.17" : "0.0.0-test";
2045
2061
 
2046
2062
  // src/bedrock-sigv4-fetch.ts
2047
2063
  function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {