@ai-sdk/amazon-bedrock 5.0.111 → 5.0.113

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,29 @@
1
1
  # @ai-sdk/amazon-bedrock
2
2
 
3
+ ## 5.0.113
4
+
5
+ ### Patch Changes
6
+
7
+ - 5cf13d2: feat: map the top level embedding dimensions to provider settings
8
+ - Updated dependencies [5cf13d2]
9
+ - Updated dependencies [72e9d38]
10
+ - Updated dependencies [fb933f9]
11
+ - Updated dependencies [4dbc902]
12
+ - @ai-sdk/openai@4.0.91
13
+ - @ai-sdk/provider@4.0.26
14
+ - @ai-sdk/anthropic@4.0.78
15
+ - @ai-sdk/provider-utils@5.0.58
16
+
17
+ ## 5.0.112
18
+
19
+ ### Patch Changes
20
+
21
+ - c01cbb8: fix(anthropic): avoid unsupported strict mode warnings when tools set `strict: false`
22
+ - Updated dependencies [6c59fb1]
23
+ - Updated dependencies [c01cbb8]
24
+ - @ai-sdk/openai@4.0.90
25
+ - @ai-sdk/anthropic@4.0.77
26
+
3
27
  ## 5.0.111
4
28
 
5
29
  ### Patch Changes
@@ -6,7 +6,7 @@ import { z } from "zod/v4";
6
6
  import { EventStreamCodec } from "@smithy/eventstream-codec";
7
7
  import { fromUtf8, toUtf8 } from "@smithy/util-utf8";
8
8
  //#region src/version.ts
9
- const VERSION = "5.0.111";
9
+ const VERSION = "5.0.113";
10
10
  //#endregion
11
11
  //#region src/amazon-bedrock-sigv4-fetch.ts
12
12
  /**
package/dist/index.js CHANGED
@@ -375,7 +375,7 @@ async function prepareTools$1({ tools, toolChoice, modelId, modelFamily, reasoni
375
375
  const supportsStrictOnTools = supportsStrictTools(modelId);
376
376
  for (const tool of filteredFunctionTools) {
377
377
  const supportsStrictForTool = supportsStrictOnTools && (tool.strict !== true || isStrictToolSchemaCompatible(tool.inputSchema));
378
- if (!supportsStrictOnTools && tool.strict != null) toolWarnings.push({
378
+ if (!supportsStrictOnTools && tool.strict === true) toolWarnings.push({
379
379
  type: "unsupported",
380
380
  feature: "strict",
381
381
  details: `Tool '${tool.name}' has strict: ${tool.strict}, but strict mode is not supported by this model on Amazon Bedrock. The strict property will be ignored.`
@@ -2060,7 +2060,7 @@ var AmazonBedrockEmbeddingModel = class AmazonBedrockEmbeddingModel {
2060
2060
  const encodedModelId = encodeURIComponent(modelId);
2061
2061
  return `${this.config.baseUrl()}/model/${encodedModelId}/invoke`;
2062
2062
  }
2063
- async doEmbed({ values, headers, abortSignal, providerOptions }) {
2063
+ async doEmbed({ values, dimensions, headers, abortSignal, providerOptions }) {
2064
2064
  if (values.length > this.maxEmbeddingsPerCall) throw new TooManyEmbeddingValuesForCallError({
2065
2065
  provider: this.provider,
2066
2066
  modelId: this.modelId,
@@ -2081,7 +2081,7 @@ var AmazonBedrockEmbeddingModel = class AmazonBedrockEmbeddingModel {
2081
2081
  taskType: "SINGLE_EMBEDDING",
2082
2082
  singleEmbeddingParams: {
2083
2083
  embeddingPurpose: amazonBedrockOptions.embeddingPurpose ?? "GENERIC_INDEX",
2084
- embeddingDimension: amazonBedrockOptions.embeddingDimension ?? 1024,
2084
+ embeddingDimension: amazonBedrockOptions.embeddingDimension ?? dimensions ?? 1024,
2085
2085
  text: {
2086
2086
  truncationMode: amazonBedrockOptions.truncate ?? "END",
2087
2087
  value: values[0]
@@ -2091,10 +2091,10 @@ var AmazonBedrockEmbeddingModel = class AmazonBedrockEmbeddingModel {
2091
2091
  input_type: amazonBedrockOptions.inputType ?? "search_query",
2092
2092
  texts: values,
2093
2093
  truncate: amazonBedrockOptions.truncate,
2094
- output_dimension: amazonBedrockOptions.outputDimension
2094
+ output_dimension: amazonBedrockOptions.outputDimension ?? dimensions
2095
2095
  } : {
2096
2096
  inputText: values[0],
2097
- dimensions: amazonBedrockOptions.dimensions,
2097
+ dimensions: amazonBedrockOptions.dimensions ?? dimensions,
2098
2098
  normalize: amazonBedrockOptions.normalize
2099
2099
  };
2100
2100
  const url = this.getUrl(this.modelId);
@@ -2343,7 +2343,7 @@ const amazonBedrockImageResponseSchema = z.object({
2343
2343
  });
2344
2344
  //#endregion
2345
2345
  //#region src/version.ts
2346
- const VERSION = "5.0.111";
2346
+ const VERSION = "5.0.113";
2347
2347
  //#endregion
2348
2348
  //#region src/amazon-bedrock-sigv4-fetch.ts
2349
2349
  /**