@ai-sdk/amazon-bedrock 4.0.39 → 4.0.41

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
@@ -1499,7 +1499,7 @@ var bedrockEmbeddingProviderOptions = z4.object({
1499
1499
  */
1500
1500
  dimensions: z4.union([z4.literal(1024), z4.literal(512), z4.literal(256)]).optional(),
1501
1501
  /**
1502
- * Flag indicating whether or not to normalize the output embeddings. Defaults to true
1502
+ * Flag indicating whether or not to normalize the output embeddings. Defaults to true.
1503
1503
  * Only supported in amazon.titan-embed-text-v2:0.
1504
1504
  */
1505
1505
  normalize: z4.boolean().optional(),
@@ -1534,7 +1534,12 @@ var bedrockEmbeddingProviderOptions = z4.object({
1534
1534
  * Truncation behavior when input exceeds the model's context length.
1535
1535
  * Supported in Cohere and Nova embedding models. Defaults to 'END' for Nova models.
1536
1536
  */
1537
- truncate: z4.enum(["NONE", "START", "END"]).optional()
1537
+ truncate: z4.enum(["NONE", "START", "END"]).optional(),
1538
+ /**
1539
+ * The number of dimensions the resulting output embeddings should have (defaults to 1536).
1540
+ * Only supported in cohere.embed-v4:0 and newer Cohere embedding models.
1541
+ */
1542
+ outputDimension: z4.union([z4.literal(256), z4.literal(512), z4.literal(1024), z4.literal(1536)]).optional()
1538
1543
  });
1539
1544
 
1540
1545
  // src/bedrock-embedding-model.ts
@@ -1589,7 +1594,8 @@ var BedrockEmbeddingModel = class {
1589
1594
  // Without it, the service attempts other schema branches and rejects the request.
1590
1595
  input_type: (_e = bedrockOptions.inputType) != null ? _e : "search_query",
1591
1596
  texts: [values[0]],
1592
- truncate: bedrockOptions.truncate
1597
+ truncate: bedrockOptions.truncate,
1598
+ output_dimension: bedrockOptions.outputDimension
1593
1599
  } : {
1594
1600
  inputText: values[0],
1595
1601
  dimensions: bedrockOptions.dimensions,
@@ -1885,7 +1891,7 @@ import {
1885
1891
  import { AwsV4Signer } from "aws4fetch";
1886
1892
 
1887
1893
  // src/version.ts
1888
- var VERSION = true ? "4.0.39" : "0.0.0-test";
1894
+ var VERSION = true ? "4.0.41" : "0.0.0-test";
1889
1895
 
1890
1896
  // src/bedrock-sigv4-fetch.ts
1891
1897
  function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {