Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix(evals): encode Bedrock inference profile ARN routes (#15619)

Hassieb Pakzad3b49c6af2786
diff --git a/packages/shared/package.json b/packages/shared/package.json
index ff170f3ce6..20791079f3 100644
--- a/packages/shared/package.json
+++ b/packages/shared/package.json
@@ -113,7 +113,7 @@
"@ag-ui/client": "^0.0.52",
"@ag-ui/core": "^0.0.52",
"@ag-ui/mastra": "1.1.1",
- "@ai-sdk/amazon-bedrock": "^5.0.24",
+ "@ai-sdk/amazon-bedrock": "^5.0.25",
"@ai-sdk/anthropic": "^4.0.5",
"@ai-sdk/azure": "^4.0.5",
"@ai-sdk/google": "^4.0.6",
diff --git a/packages/shared/src/server/llm/ai-sdk/requestShape.test.ts b/packages/shared/src/server/llm/ai-sdk/requestShape.test.ts
index 9663529072..94def06971 100644
--- a/packages/shared/src/server/llm/ai-sdk/requestShape.test.ts
+++ b/packages/shared/src/server/llm/ai-sdk/requestShape.test.ts
@@ -596,6 +596,16 @@ describe("AI SDK request shapes", () => {
expect(request.body.inferenceConfig).toMatchObject({ maxTokens: 64 });
});
+ it("Bedrock: application inference profile ARN stays in one URL segment", async () => {
+ const model =
+ "arn:aws:bedrock:us-east-1:123456789012:application-inference-profile/profile-id";
+ const { request } = await runBedrockCompletion({ model });
+
+ expect(request.url).toBe(
+ `https://bedrock-runtime.us-east-1.amazonaws.com/model/${encodeURIComponent(model)}/converse`,
+ );
+ });
+
it("Bedrock: Sonnet 5 structured output falls back to the JSON tool", async () => {
const schema = {
type: "object",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 70b5b72e5f..6c6160b748 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -239,8 +239,8 @@ importers:
specifier: 1.1.1
'@ai-sdk/amazon-bedrock':
- specifier: ^5.0.24
- version: 5.0.24([email protected])
+ specifier: ^5.0.25
+ version: 5.0.25([email protected])
'@ai-sdk/anthropic':
specifier: ^4.0.5
version: 4.0.16([email protected])
@@ -1281,8 +1281,8 @@ packages:
peerDependencies:
zod: 4.3.6
- '@ai-sdk/[email protected]':
- resolution: {integrity: sha512-DqepS/e0mZfpfFjbCKIG7LzsvrQYeKJT0aoQDC6WyXvR81Vi1VIJVk6IL2q6dq2zwuBNnXIQkUPFF0NTXRXGRQ==}
+ '@ai-sdk/[email protected]':
+ resolution: {integrity: sha512-cWDjIbD6CoFicwGjgwsU6sWMS9gpBBIQlMDgV5YfnPpmQVsQ3G+wBEwRyxCNxFVtxKxkMz8Bt6Uo6oTbfDCCNQ==}
engines: {node: '>=22'}
peerDependencies:
zod: 4.3.6
@@ -5060,6 +5060,10 @@ packages:
resolution: {integrity: sha512-i0dk2t5B+CwV/dcJdUHILYkOQF5lof8f44dFCfDWToGCxjT9YQ+CgHqTAvJxzc3+zqQwm2QtVoJ5IqiNar/CnQ==}
engines: {node: '>=18.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-dl2yRglDxfzH9uJ4fSo4zTaAHa0zH7+V7BZMRWy8hEYIKT1BiqMUK/CN6T3ADQ3kbA5N1tmUulroJ2UtONS7Kw==}
+ engines: {node: '>=18.0.0'}
+
'@smithy/[email protected]':
resolution: {integrity: sha512-q9J7JTiXrAhB8sDp4px97uEPT7CwKH61Co78grdNQvU8QZAdiuaSRhP0tUVf2ogy36RZTrlMU1rBmDEH+cnkiA==}
engines: {node: '>=18.0.0'}
@@ -5068,6 +5072,10 @@ packages:
resolution: {integrity: sha512-yG1n59zLQMa979xvXlTQ9+FpNmm4RRPR+2rYZo57wk28E27zmKZN4ST9wc2pKkyspLpDal2/84ST72KLJhbP1w==}
engines: {node: '>=18.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-dk/8H8vjgsghRKq0Euout/Q5iQMGVw8pUVSs2gY7DFjZtg1+RB12Q/TNh4Uph6E9D46mKr161WobWFyAQWJdjQ==}
+ engines: {node: '>=18.0.0'}
+
'@smithy/[email protected]':
resolution: {integrity: sha512-XUSuMxlTxV5pp4VpqZf6Sa3vT/Q75FVkLSpSSE3KkWBvAQWeuWt1msTv8fJfgA4/jcJhrbrbMzN1AC/hvPmm5A==}
engines: {node: '>=18.0.0'}
@@ -5232,6 +5240,10 @@ packages:
resolution: {integrity: sha512-4pWFv2sxrykZqaTixXhkgAsG6+k/VxgAiyZ6M0iLEmsOqcJaR0eidlTCmuKKtMJMIEw8lYwDTvEyR4NyC+V0cw==}
engines: {node: '>=18.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-zpHIvgr2NWASkgWgv1O0zPPX7VFdkHKa9NxxjGseGvSY2DRZgRsnoXuEcjETwPeqP92blsINwfbIJz0F0/0Skg==}
+ engines: {node: '>=18.0.0'}
+
'@standard-community/[email protected]':
resolution: {integrity: sha512-4+ZPorwDRt47i+O7RjyuaxHRK/37QY/LmgxlGrRrSTLYoFatEOzvqIc85GTlM18SFZ5E91C+v0o/M37wZPpUHA==}
peerDependencies:
@@ -11997,14 +12009,14 @@ snapshots:
aws4fetch: 1.0.20
zod: 4.3.6
dependencies:
'@ai-sdk/anthropic': 4.0.16([email protected])
'@ai-sdk/openai': 4.0.16([email protected])
'@ai-sdk/provider': 4.0.3
'@ai-sdk/provider-utils': 5.0.11([email protected])
- '@smithy/eventstream-codec': 4.4.10
- '@smithy/util-utf8': 4.4.10
+ '@smithy/eventstream-codec': 4.4.14
+ '@smithy/util-utf8': 4.4.14
aws4fetch: 1.0.20
zod: 4.3.6
@@ -16463,6 +16475,11 @@ snapshots:
'@smithy/types': 4.16.1
tslib: 2.8.1
+ '@smithy/[email protected]':
+ dependencies:
+ '@smithy/types': 4.16.1
+ tslib: 2.8.1
+
'@smithy/[email protected]':
dependencies:
'@smithy/core': 3.29.5
@@ -16474,6 +16491,11 @@ snapshots:
'@smithy/core': 3.29.5
tslib: 2.8.1
+ '@smithy/[email protected]':
+ dependencies:
+ '@smithy/core': 3.30.0
+ tslib: 2.8.1
+
'@smithy/[email protected]':
dependencies:
'@smithy/eventstream-serde-universal': 4.2.12
@@ -16713,6 +16735,11 @@ snapshots:
'@smithy/core': 3.29.5
tslib: 2.8.1
+ '@smithy/[email protected]':
+ dependencies:
+ '@smithy/core': 3.30.0
+ tslib: 2.8.1
+
dependencies:
'@standard-schema/spec': 1.1.0