@ai-sdk/amazon-bedrock 4.0.86 → 4.0.88

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
@@ -83,7 +83,17 @@ var amazonBedrockLanguageModelOptions = z.object({
83
83
  /**
84
84
  * Anthropic beta features to enable
85
85
  */
86
- anthropicBeta: z.array(z.string()).optional()
86
+ anthropicBeta: z.array(z.string()).optional(),
87
+ /**
88
+ * Service tier for the request.
89
+ * @see https://docs.aws.amazon.com/bedrock/latest/userguide/service-tiers-inference.html
90
+ *
91
+ * - 'reserved': Uses provisioned throughput capacity
92
+ * - 'priority': Prioritizes low-latency inference when capacity is available
93
+ * - 'default': Standard on-demand tier
94
+ * - 'flex': Lower-cost tier for flexible latency workloads
95
+ */
96
+ serviceTier: z.enum(["reserved", "priority", "default", "flex"]).optional()
87
97
  });
88
98
 
89
99
  // src/bedrock-error.ts
@@ -995,6 +1005,7 @@ var BedrockChatLanguageModel = class {
995
1005
  const {
996
1006
  reasoningConfig: _,
997
1007
  additionalModelRequestFields: __,
1008
+ serviceTier: ___,
998
1009
  ...filteredBedrockOptions
999
1010
  } = (providerOptions == null ? void 0 : providerOptions.bedrock) || {};
1000
1011
  const additionalModelResponseFieldPaths = isAnthropicModel ? ["/delta/stop_sequence"] : void 0;
@@ -1009,6 +1020,11 @@ var BedrockChatLanguageModel = class {
1009
1020
  ...Object.keys(inferenceConfig).length > 0 && {
1010
1021
  inferenceConfig
1011
1022
  },
1023
+ ...bedrockOptions.serviceTier != null && {
1024
+ serviceTier: {
1025
+ type: bedrockOptions.serviceTier
1026
+ }
1027
+ },
1012
1028
  ...filteredBedrockOptions,
1013
1029
  ...toolConfig.tools !== void 0 && toolConfig.tools.length > 0 ? { toolConfig } : {}
1014
1030
  },
@@ -1973,7 +1989,7 @@ import {
1973
1989
  import { AwsV4Signer } from "aws4fetch";
1974
1990
 
1975
1991
  // src/version.ts
1976
- var VERSION = true ? "4.0.86" : "0.0.0-test";
1992
+ var VERSION = true ? "4.0.88" : "0.0.0-test";
1977
1993
 
1978
1994
  // src/bedrock-sigv4-fetch.ts
1979
1995
  function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {