Prerequisites
Bug Description
Bug Description
The WebSearch tool fails with a 400 error when routed through LiteLLM to AWS Bedrock.
Error
API Error: 400
litellm.BadRequestError: BedrockException -
{"message":"The json schema definition at toolConfig.tools.0.toolSpec.inputSchema
is invalid. Fix the following errors and try again:
$.type: does not have a value in the enumeration [array, boolean, integer, null, number, object, string];
$.type: string found, array expected"}
Root Cause
AWS Bedrock's tool schema validation requires type to be an array (e.g., ["string"]),
but the schema being sent uses a plain string (e.g., "string").
This is a JSON Schema draft version incompatibility.
Steps to Reproduce
Steps to Reproduce
- Run codemie-claude
- Ask Claude Code to perform a web search (e.g., "search weather in NY")
- The
WebSearch tool call fails with the above error
Expected Behavior
Expected Behavior
WebSearch should return results successfully.
Actual Behavior
Web Search("weather in New York NY today April 2026")
⎿ Did 0 searches in 1s
CodeMie CLI Version
0.0.53
Which agent are you using?
Claude Code (codemie-claude)
Which provider are you using?
AI/Run SSO
Model
claude-sonnet-4-6
Node.js Version
v25.1.0
Operating System
Windows (native)
Configuration (Redacted)
{
"version": 2,
"activeProfile": "codemie-sso",
"profiles": {
"default": {
"provider": "ai-run-sso",
"codeMieUrl": "https://codemie.lab.epam.com",
"codeMieProject": "user@epam.com",
"apiKey": "sso-provided",
"baseUrl": "https://codemie.lab.epam.com/code-assistant-api",
"model": "gemini-3.1-pro",
"haikuModel": "claude-haiku-4-5",
"sonnetModel": "claude-sonnet-4-5",
"opusModel": "claude-opus-4-1",
"name": "default"
},
"codemie-sso": {
"provider": "ai-run-sso",
"codeMieUrl": "https://codemie.lab.epam.com",
"codeMieProject": "user@epam.com",
"apiKey": "sso-provided",
"baseUrl": "https://codemie.lab.epam.com/code-assistant-api",
"model": "claude-sonnet-4-6",
"haikuModel": "claude-haiku-4-5-20251001",
"sonnetModel": "claude-sonnet-4-6",
"opusModel": "claude-opus-4-6-20260205",
"name": "codemie-sso"
}
}
}
Error Logs
Additional Context
Workaround
Using WebFetch with a known URL works fine as a fallback.
Environment
- Platform: Windows 11
- Model: claude-sonnet-4-6
- Backend: LiteLLM → AWS Bedrock (claude-haiku-4-5-20251001)
The LLM is able to reach resources on Internet via a direct URL, like https://github.com
Prerequisites
Bug Description
Bug Description
The
WebSearchtool fails with a 400 error when routed through LiteLLM to AWS Bedrock.Error
API Error: 400
litellm.BadRequestError: BedrockException -
{"message":"The json schema definition at toolConfig.tools.0.toolSpec.inputSchema
is invalid. Fix the following errors and try again:
$.type: does not have a value in the enumeration [array, boolean, integer, null, number, object, string];
$.type: string found, array expected"}
Root Cause
AWS Bedrock's tool schema validation requires
typeto be an array (e.g.,["string"]),but the schema being sent uses a plain string (e.g.,
"string").This is a JSON Schema draft version incompatibility.
Steps to Reproduce
Steps to Reproduce
WebSearchtool call fails with the above errorExpected Behavior
Expected Behavior
WebSearch should return results successfully.
Actual Behavior
Web Search("weather in New York NY today April 2026")
⎿ Did 0 searches in 1s
CodeMie CLI Version
0.0.53
Which agent are you using?
Claude Code (codemie-claude)
Which provider are you using?
AI/Run SSO
Model
claude-sonnet-4-6
Node.js Version
v25.1.0
Operating System
Windows (native)
Configuration (Redacted)
{ "version": 2, "activeProfile": "codemie-sso", "profiles": { "default": { "provider": "ai-run-sso", "codeMieUrl": "https://codemie.lab.epam.com", "codeMieProject": "user@epam.com", "apiKey": "sso-provided", "baseUrl": "https://codemie.lab.epam.com/code-assistant-api", "model": "gemini-3.1-pro", "haikuModel": "claude-haiku-4-5", "sonnetModel": "claude-sonnet-4-5", "opusModel": "claude-opus-4-1", "name": "default" }, "codemie-sso": { "provider": "ai-run-sso", "codeMieUrl": "https://codemie.lab.epam.com", "codeMieProject": "user@epam.com", "apiKey": "sso-provided", "baseUrl": "https://codemie.lab.epam.com/code-assistant-api", "model": "claude-sonnet-4-6", "haikuModel": "claude-haiku-4-5-20251001", "sonnetModel": "claude-sonnet-4-6", "opusModel": "claude-opus-4-6-20260205", "name": "codemie-sso" } } }Error Logs
Additional Context
Workaround
Using
WebFetchwith a known URL works fine as a fallback.Environment
The LLM is able to reach resources on Internet via a direct URL, like https://github.com