#19228·mastra

Parsing error while using models through Bedrock Mantle endpoint

Author: daneatmastraCreated Jul 10, 2026Updated Sep 30, 2026
Labelsstatus: needs reproductionAgentsAI SDKtrio-wpdiscordimpact:mediumeffort:medium@mastra/core

This issue was created from Discord post 1525072873796931595:

Open in Discord

We'd like to use OpenAI models openai.gpt-oss-20b or openai.gpt-oss-safeguard-20b through AWS Bedrock, those models are only offered via Bedrock Mantle. When we try it, using AI SDK Bedrock Provider, we get error:

"statusCode": 400, "responseHeaders": { "access-control-allow-origin": "*", "access-control-expose-headers": "x-amzn-requestid,x-request-id,date,x-amzn-usage-reservation-quota,x-amzn-usage-reservation-remaining-quota,x-amzn-usage-reservation-spillover", "connection": "keep-alive", "content-length": "259", "content-type": "application/json", "date": "Fri, 10 Jul 2026 09:24:21 GMT", "vary": "origin, access-control-request-method, access-control-request-headers", "x-amzn-requestid": "req_gay2bo....", "x-request-id": "req_gay2boh...." }, "responseBody": "{\"error\":{\"code\":\"validation_error\",\"message\":\"Failed to deserialize the JSON body into the target type: ?[4]: Invalid 'messages': Invalid 'content': value did not match any expected variant at line 1 column 9934\",\"param\":null,\"type\":\"invalid_request_error\"}}", "isRetryable": false, "data": { "error": { "message": "Failed to deserialize the JSON body into the target type: ?[4]: Invalid 'messages': Invalid 'content': value did not match any expected variant at line 1 column 9934", "type": "invalid_request_error", "param": null, "code": "validation_error" } }

We have no issues using bedrock with Anthropic model via bedrock runtime endpoints. Any idea what's wrong?