@ai-sdk/amazon-bedrock 4.0.137 → 4.0.138

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
@@ -18,6 +18,7 @@ import {
18
18
  postJsonToApi,
19
19
  resolve
20
20
  } from "@ai-sdk/provider-utils";
21
+ import { sanitizeJsonSchema } from "@ai-sdk/anthropic/internal";
21
22
  import { z as z4 } from "zod/v4";
22
23
 
23
24
  // src/bedrock-api-types.ts
@@ -980,7 +981,7 @@ var BedrockChatLanguageModel = class {
980
981
  ...(_k = bedrockOptions.additionalModelRequestFields) == null ? void 0 : _k.output_config,
981
982
  format: {
982
983
  type: "json_schema",
983
- schema: responseFormat.schema
984
+ schema: sanitizeJsonSchema(responseFormat.schema)
984
985
  }
985
986
  }
986
987
  };
@@ -1532,8 +1533,7 @@ var BedrockChatLanguageModel = class {
1532
1533
  };
1533
1534
  }
1534
1535
  getUrl(modelId) {
1535
- const encodedModelId = modelId.startsWith("arn:") ? encodeURIComponent(modelId).replace(/%3A/g, ":").replace(/%2F/g, "/") : encodeURIComponent(modelId);
1536
- return `${this.config.baseUrl()}/model/${encodedModelId}`;
1536
+ return `${this.config.baseUrl()}/model/${encodeURIComponent(modelId)}`;
1537
1537
  }
1538
1538
  };
1539
1539
  function bedrockChatModelSupportsStructuredOutput(modelId) {
@@ -2123,7 +2123,7 @@ import {
2123
2123
  import { AwsV4Signer } from "aws4fetch";
2124
2124
 
2125
2125
  // src/version.ts
2126
- var VERSION = true ? "4.0.137" : "0.0.0-test";
2126
+ var VERSION = true ? "4.0.138" : "0.0.0-test";
2127
2127
 
2128
2128
  // src/bedrock-sigv4-fetch.ts
2129
2129
  function createSigV4FetchFunction(getCredentials, fetch, service = "bedrock") {