litellm - 💡(How to fix) Fix Llama 4 Maverick/Scout on Bedrock: tool calling fails with "provider rejected the request schema or tool payload"

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

LiteLLM returns HTTP 500 with: litellm.APIConnectionError: BedrockException - {"Message":"..."}

The calling application (OpenClaw) reports: FailoverError: LLM request failed: provider rejected the request schema or tool payload.

Root Cause

Root cause hypothesis

Bedrock enforces strict JSON Schema draft 2020-12 validation on tool definitions for Llama 4 cross-region inference profiles. The tool schema format LiteLLM sends for openai-completions-compatible tool calls may not pass Bedrock's validation.

Fix Action

Workaround

Currently using OpenRouter as fallback for tool-enabled agent runs. Would prefer to use Bedrock Llama 4 to avoid rate limiting.

RAW_BUFFERClick to expand / collapse

Environment

  • LiteLLM version: 1.85.0
  • Model: us.meta.llama4-maverick-17b-instruct-v1:0 (cross-region inference profile)
  • Provider: AWS Bedrock Converse API
  • LiteLLM config: bedrock/converse/us.meta.llama4-maverick-17b-instruct-v1:0

Steps to reproduce

  1. Configure LiteLLM proxy with llama4-maverick via bedrock/converse/us.meta.*
  2. Send a request that includes any tool/function definition
  3. Request fails immediately before the model generates any output

Error

LiteLLM returns HTTP 500 with: litellm.APIConnectionError: BedrockException - {"Message":"..."}

The calling application (OpenClaw) reports: FailoverError: LLM request failed: provider rejected the request schema or tool payload.

Root cause hypothesis

Bedrock enforces strict JSON Schema draft 2020-12 validation on tool definitions for Llama 4 cross-region inference profiles. The tool schema format LiteLLM sends for openai-completions-compatible tool calls may not pass Bedrock's validation.

Interestingly, Nova models (amazon.nova-micro-v1:0) accept the same tool definitions without issue — this appears specific to Llama 4 cross-region inference profiles.

Expected behavior

Tool calls should work with Llama 4 Maverick/Scout the same as with Nova models.

Workaround

Currently using OpenRouter as fallback for tool-enabled agent runs. Would prefer to use Bedrock Llama 4 to avoid rate limiting.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Tool calls should work with Llama 4 Maverick/Scout the same as with Nova models.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

litellm - 💡(How to fix) Fix Llama 4 Maverick/Scout on Bedrock: tool calling fails with "provider rejected the request schema or tool payload"