Skip to content

fix(bedrock): drop toolSpec.strict for Claude Fable 5 - #48582

Open
TobiMayr wants to merge 2 commits into
BerriAI:mainfrom
TobiMayr:litellm_fable_strict_tools
Open

TobiMayr wants to merge 2 commits into
BerriAI:mainfrom
TobiMayr:litellm_fable_strict_tools

Conversation

@TobiMayr

@TobiMayr TobiMayr commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

TLDR

Problem this solves:

  • Tool calls to Claude Fable 5 on Bedrock fail validation
  • Fable 5.1 and Fable 5.2 hit the same rejection

How it solves it:

  • Those cost-map entries now say they reject toolSpec.strict
  • The field is omitted, same as Sonnet 5

User Flow

Before: a developer sending a strict tool call to Claude Fable 5 on Bedrock gets a validation error

  1. They send POST https://litellm-domain/v1/chat/completions for a Bedrock Claude Fable 5, Fable 5.1, or Fable 5.2 model, with a function tool that sets "strict": true
  2. Bedrock returns 400 because toolSpec.strict is not allowed
  3. The tool call never runs

After: the same request is accepted

  1. They send the same POST https://litellm-domain/v1/chat/completions for a Bedrock Claude Fable 5, Fable 5.1, or Fable 5.2 model, with a function tool that sets "strict": true
  2. Bedrock accepts the tool schema
  3. The tool call runs

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have added meaningful tests
  • The handful of test files covering my change pass locally, e.g. uv run pytest tests/unit/<your_test_file>.py -v. Leave the suites (make test-unit-*, make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more
  • My PR passes all required CI/CD checks (e.g., lint, schema.d.ts sync check, etc.)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • Every automated review on my PR's latest commit has finished, and I have addressed or replied to each of its findings before requesting a maintainer review

Type

Bug fix

Caveats (if any)

Low

Final Attestation

  • The tests check the right things, including the edge cases, and regressions in the respective real-world customer use-cases are not possible after this PR

Made with Cursor

@codecov

codecov Bot commented Oct 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@codspeed

codspeed Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 35 untouched benchmarks


Comparing TobiMayr:litellm_fable_strict_tools (f2c4ced) with main (cfe0100)

Open in CodSpeed

@CLAassistant

CLAassistant commented Nov 5, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@veria-ai

veria-ai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

PR overview

No security issues were found in this pull request.

Reviews

TobiMayr and others added 2 commits November 25, 2026 12:20
Bedrock Converse rejects that field, and the Fable 5 entries were still forwarding it.

Co-authored-by: Cursor <cursoragent@cursor.com>
Bedrock Converse rejects that field, and the 5.2 rows were added after the Fable 5 flag.

Co-authored-by: Cursor <cursoragent@cursor.com>
@TobiMayr
TobiMayr force-pushed the litellm_fable_strict_tools branch from 17cec0d to a064aca Compare November 25, 2026 12:45
@TobiMayr

Copy link
Copy Markdown
Contributor Author

Rebased onto current main, Fable 5.2 Converse rows included. @mateo-berri could you approve the Actions runs so CI can execute?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants