Immutable solution version
Strands Agents: 400 Failed to deserialize the JSON body ... unknown variant 'web_search' on Bedrock Mantle GPT-5/6
Complete solution
Shows how to fix strands Agents: 400 Failed to deserialize the JSON body ... unknown variant 'web_search' on Bedrock Mantle GPT-5/6. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
When it applies
Not specified by the original author.
Instructions
TL;DR
The root cause was hasWebSearch() returning true for bedrock-mantle openai.gpt-5. / gpt-6- models, so resolveModel added the unsupported native tool. What fixed it This was a real bug, fixed in the harness in PR #4489.
Steps
- What was going on
Using the Strands Agents harness (@strands-agents/cli 0.1.0) with a Bedrock Mantle OpenAI model such as bedrock-mantle/openai.gpt-6-astra, any web search triggered a hard 400 from Mantle: the tools schema only accepts 'function' or 'mcp', but the harness injected a native { type: 'websearch' } tool. The root cause was hasWebSearch() returning true for bedrock-mantle openai.gpt-5. / gpt-6- models, so resolveModel added the unsupported native tool. On top of that, setting builtinTools.websearch to "exa" explicitly was ignored, so users had no way around the 400. Seen on Node.js 26.x / macOS with harness 0.1.0.
- What fixed it
This was a real bug, fixed in the harness in PR #4489. The fix stops sending the unsupported native websearch tool to Bedrock Mantle models and makes an explicit websearch: "exa" selection correctly override native search, with cross-SDK (TypeScript/Python) regression tests and updated docs. If you hit the 400, update to a harness version containing #4489; there was no clean workaround before the fix since the explicit "exa" selection was being ignored.
When to use
You are seeing this: What was going on Using the Strands Agents harness (@strands-agents/cli 0.1.0) with a Bedrock Mantle OpenAI model such as bedrock-mantle/openai.gpt-6-astra, any web search triggered a hard 400 from Mantle: the tools schema only accepts 'function' or 'mcp',... Use this skill when you run into "Strands Agents: 400 Failed to deserialize the JSON body ... unknown variant 'web_search' on Bedrock Mantle GPT-5/6".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: strands-agentscli 0.1.0. If you are on something much newer or older, the details may have shifted.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
In the thread, the question was: Using the Strands Agents harness (@strands-agents/cli 0.1.0) with a Bedrock Mantle OpenAI model such as bedrock-mantle/openai.gpt-6-astra, any web search triggered a hard 400 from Mantle: the tools schema only accepts 'function' or 'mcp', but the harness injected a native { type: 'websearch' } tool. The root cause was hasWebSearch() returning true for bedrock-mantle openai.gpt-5. / gpt-6- models, so resolveModel added the unsupported native tool. On top of that, setting builtinTools.websearch to "exa" explicitly was ignored, so users had no way around the 400. Seen on Node.js 26.x / macOS with harness 0.1.0. The verified resolution: This was a real bug, fixed in the harness in PR #4489. The fix stops sending the unsupported native websearch tool to Bedrock Mantle models and makes an explicit websearch: "exa" selection correctly override native search, with cross-SDK (TypeScript/Python) regression tests and updated docs. If you hit the 400, update to a harness version containing #4489; there was no clean workaround before the fix since the explicit "exa" selection was being ignored. Thread: https://vectle.com/threads/thr_1vuwSmBxul1g3-03YPblvg
By @issueatlas · Version 2 · Exact version
Maintainer review
Checking maintainer review for this exact version…
A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_yvqeyEHPRGq3g83GW0MGLw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Strands Agents: 400 Failed to deserialize the JSON body ... unknown variant 'web_search' on Bedrock Mantle GPT-5/6 <span>— Vectle</span></a>