Skip to content

feat(models): add Claude Fable 5.1 across Anthropic, Bedrock, Vertex AI, and Azure AI - #39148

Merged
mateo-berri merged 9 commits into
litellm_internal_stagingfrom
litellm_claude_fable_5_1
Sep 1, 2026
Merged

feat(models): add Claude Fable 5.1 across Anthropic, Bedrock, Vertex AI, and Azure AI#39148
mateo-berri merged 9 commits into
litellm_internal_stagingfrom
litellm_claude_fable_5_1

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

TLDR

Problem this solves:

  • claude-fable-5-1 is missing from the model registry
  • Requests with reasoning_effort fail with a 400
  • Forced tool_choice surfaces an opaque provider 400
  • Spend for the model logs as $0

How it solves it:

  • Adds the model on Anthropic, Bedrock, Vertex AI, Azure AI
  • Prices cache reads at $0.25/MTok, a quarter of Fable 5
  • Registers it for Bedrock converse and the setup wizard
  • Flags supports_forced_tool_use: false and gates forced tool_choice on it in the Anthropic and Bedrock converse transformations: clean 400, or downgrade to auto under drop_params

User Flow

Before: a developer pointing their app at Claude Fable 5.1 through the gateway cannot use the model's effort control, and every call they do get through is billed at zero

  1. They add a deployment with model: anthropic/claude-fable-5-1 and restart the proxy
  2. They send POST http://localhost:4000/v1/chat/completions with "reasoning_effort": "xhigh"
  3. They get back a 400 saying anthropic does not support parameters: ['reasoning_effort']
  4. They drop reasoning_effort and retry, get a 200, and see x-litellm-response-cost-original: 0.0
  5. They send the same POST with "tool_choice": "required" and get an opaque provider 400 reading tool_choice: type "tool" and "any" are not supported for this model
  6. http://localhost:4000/ui/?page=logs shows the request at $0 spend, so their budgets and rate limits never bite

After: the same requests go through with effort control, and spend is real

  1. They add the same deployment and restart the proxy
  2. They send the same POST with "reasoning_effort": "xhigh" and get a 200 with the assistant's reply
  3. The response carries x-litellm-response-cost: 0.00066 for 16 prompt and 10 completion tokens
  4. They send the same POST with "tool_choice": "required" and get a clear 400 telling them the model rejects forced tool use and how to work around it, or a 200 with tool_choice downgraded to auto when their deployment sets drop_params: true
  5. http://localhost:4000/ui/?page=logs shows those requests at non-zero spend, so key and team budgets apply

Relevant issues

Linear ticket

Pre-Submission checklist

  • I have added meaningful tests
  • The handful of test files covering my change pass locally, e.g. uv run pytest tests/test_litellm/<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
  • I have received a Greptile Confidence Score of at least 4/5 before requesting a maintainer review (Greptile reviews automatically once the PR is opened; only comment @greptileai to re-request a review after pushing changes)

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

Screenshots / Proof of Fix

Shared setup, same on both sides. Each side is its own worktree booted with two uvicorn workers, the multi-pod shape customers run, on its own port: base f2a4172 on 4773 and head a92ca6c on 4771. LITELLM_LOCAL_MODEL_COST_MAP=True so the registry under test is the checkout's, not the published map. Config:

model_list:
  - model_name: fable-5-1
    litellm_params:
      model: anthropic/claude-fable-5-1
      api_key: os.environ/ANTHROPIC_API_KEY
  - model_name: fable-5-1-drop
    litellm_params:
      model: anthropic/claude-fable-5-1
      api_key: os.environ/ANTHROPIC_API_KEY
      drop_params: true

general_settings:
  master_key: sk-1234
PYTHONPATH=<worktree> LITELLM_LOCAL_MODEL_COST_MAP=True \
  litellm --config /tmp/fable51_config.yaml --port <port> --num_workers 2

Real Anthropic calls on both sides, no mocks

Before (f2a4172, port 4773)

/v1/chat/completions with reasoning_effort xhigh

  1. Ran
curl -sS -i -X POST http://localhost:4773/v1/chat/completions \
  -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" \
  -d '{"model":"fable-5-1","reasoning_effort":"xhigh","max_tokens":2048,"messages":[{"role":"user","content":"say hi in 3 words"}]}'
  1. Got
HTTP/1.1 400 Bad Request
x-litellm-response-cost: 0
litellm.UnsupportedParamsError: anthropic does not support parameters: ['reasoning_effort'], for model=claude-fable-5-1

/v1/messages with thinking effort xhigh

  1. Ran
curl -sS -i -X POST http://localhost:4773/v1/messages \
  -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" \
  -d '{"model":"fable-5-1","max_tokens":64,"messages":[{"role":"user","content":"say hi in 3 words"}],"thinking":{"type":"enabled","effort":"xhigh"}}'
  1. Got
HTTP/1.1 400 Bad Request
x-litellm-response-cost: 0
litellm.BadRequestError: AnthropicException - thinking.enabled.budget_tokens: Field required

/v1/responses with reasoning effort xhigh

  1. Ran
curl -sS -i -X POST http://localhost:4773/v1/responses \
  -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" \
  -d '{"model":"fable-5-1","input":"say hi in 3 words","reasoning":{"effort":"xhigh"}}'
  1. Got
HTTP/1.1 400 Bad Request
x-litellm-response-cost: 0
litellm.UnsupportedParamsError: anthropic does not support parameters: ['reasoning_effort'], for model=claude-fable-5-1

cost tracking on a plain /v1/chat/completions call

  1. Ran
curl -sS -i -X POST http://localhost:4773/v1/chat/completions \
  -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" \
  -d '{"model":"fable-5-1","max_tokens":64,"messages":[{"role":"user","content":"say hi in 3 words"}]}'
  1. Got a 200 reading Hi there, friend! for 16 prompt and 10 completion tokens, billed at nothing
HTTP/1.1 200 OK
x-litellm-response-cost-original: 0.0

/v1/chat/completions with tool_choice required

  1. Ran
curl -sS -i -X POST http://localhost:4773/v1/chat/completions \
  -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" \
  -d '{"model":"fable-5-1","max_tokens":256,"tool_choice":"required","tools":[{"type":"function","function":{"name":"get_weather","parameters":{"type":"object","properties":{"city":{"type":"string"}},"required":["city"]}}}],"messages":[{"role":"user","content":"weather in SF?"}]}'
  1. Got the provider's opaque 400 after a paid round trip to Anthropic
HTTP/1.1 400 Bad Request
x-litellm-response-cost: 0
litellm.BadRequestError: AnthropicException - tool_choice: type "tool" and "any" are not supported for this model.

After (a92ca6c, port 4771)

/v1/chat/completions with reasoning_effort xhigh

  1. Ran the same curl as Before against 4771
  2. Got
HTTP/1.1 200 OK
x-litellm-response-cost: 0.00066
content: Hi there, friend! | tokens: 16 prompt, 10 completion

/v1/messages with thinking effort xhigh

  1. Ran the same curl as Before against 4771
  2. Got
HTTP/1.1 200 OK
x-litellm-response-cost: 0.00066
{"content":[{"type":"text","text":"Hello there, friend!"}],"stop_reason":"end_turn", ...}

/v1/responses with reasoning effort xhigh

  1. Ran the same curl as Before against 4771
  2. Got
HTTP/1.1 200 OK
x-litellm-response-cost: 0.00066
{"id": "resp_MWJvwxITMyLHlB55KFSdFDgS91r ...

cost tracking on a plain /v1/chat/completions call

  1. Ran the same curl as Before against 4771
  2. Got
HTTP/1.1 200 OK
x-litellm-response-cost: 0.00066
content: Hello there, friend! | tokens: 16 prompt, 10 completion
  1. 0.00066 is what the new pricing says it should be: 16 * $10/MTok plus 10 * $50/MTok

/v1/chat/completions with tool_choice required

  1. Ran the same curl as Before against 4771, without drop_params
  2. Got a clean client-side 400 that never leaves the gateway and explains the fix
HTTP/1.1 400 Bad Request
litellm.UnsupportedParamsError: claude-fable-5-1 does not support forced tool use (tool_choice='required' or a named tool). Use tool_choice='auto' and tell the model in the prompt when to call the tool, or set `litellm.drop_params = True` to downgrade to 'auto' automatically.
  1. Ran the same curl against the fable-5-1-drop alias, whose deployment sets drop_params: true
  2. Got a 200 with tool_choice downgraded to auto; the model still chose to call the tool
HTTP/1.1 200 OK
x-litellm-response-cost: 0.00617
"finish_reason":"tool_calls", "function":{"arguments":"{\"city\": \"San Francisco\"}","name":"get_weather"}

Live proof ran at a92ca6c. The two commits after it extend the same gate to Bedrock converse and add the new flag to the schema allowlist in tests/test_litellm/test_utils.py; the Bedrock leg is covered by unit tests only since there is no AWS account access here

Observations from the run:

  • Base rejects effort on all three endpoints
  • Bedrock, Vertex, Foundry routes untested, no account access
  • Anthropic reports no thinking tokens at xhigh here

Type

🆕 New Feature

Caveats (if any)

Low

  • The forced-tool-use gate covers the direct Anthropic route and Bedrock converse

    • Vertex and Azure requests use their own transformations and still surface the provider's own 400 for forced tool_choice
    • The Bedrock converse gate is proven by unit tests, not a live call, since there is no AWS account access here
  • osv-scan fails on a vulnerability this PR does not touch

    • browserslist 4.28.2 in ui/litellm-dashboard/package-lock.json, wanting 4.28.7. That lockfile is byte-identical on litellm_internal_staging (git show origin/litellm_internal_staging:ui/litellm-dashboard/package-lock.json has the same 4.28.2 line) and this PR touches no ui/ file, so the finding predates it and belongs in a lockfile bump PR
  • Only Anthropic, Bedrock, Vertex AI, and Azure AI entries here

    • Anthropic lists no other platform for this model, so no Databricks or DeepInfra rows unlike Fable 5
  • Partner entries carry no deprecation_date

    • Anthropic publishes retirement no sooner than 2027-09-01 for the first-party model only
  • Bedrock, Vertex, and Foundry grid cells stay xfail

    • CI account access for those three is unconfirmed, so their cells stay loud until someone verifies

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

Note

Medium Risk
Changes request shaping for tool_choice on models flagged supports_forced_tool_use: false; mis-flagged models could silently downgrade forced tools to auto, though behavior is gated on explicit cost-map entries.

Overview
Adds Claude Fable 5.1 to the model registry (Anthropic, Bedrock regional variants, Vertex AI, Azure AI), Bedrock converse allowlist, setup wizard, and pricing—including cache-read at 0.025× input (not Fable 5’s 0.1×).

New cost-map flag supports_forced_tool_use: false on Fable 5.1 drives shared handling in Anthropic and Bedrock converse transforms: forced tool_choice (required / named tool → any/tool) raises a clear UnsupportedParamsError without drop_params, or downgrades to auto (keeping disable_parallel_tool_use when set) with a warning when dropping is enabled—because always-on thinking rejects forced tool calls.

Anthropic chat mapping now runs mapped tool_choice through _apply_forced_tool_choice; schema and tests cover the new capability and Fable 5.1 behavior.

Reviewed by Cursor Bugbot for commit d6005a1. Bugbot is set up for automated code reviews on this repo. Configure here.

Link to Devin session: https://app.devin.ai/sessions/91161c53a340462b8b5ca0d9ad54359b
Open in Devin Desktop: https://app.devin.ai/desktop/session/91161c53a340462b8b5ca0d9ad54359b?variant=devin
Requested by: @mateo-berri

mateo-berri and others added 2 commits September 1, 2026 18:07
…AI, and Azure AI

Adds claude-fable-5-1 cost map entries on the Anthropic API, Bedrock converse
(base, global, and us/eu geo inference profiles at the 10% regional premium),
Vertex AI, and Azure AI. Specs match Fable 5 (1M context, 128K output, $10/$50
per MTok, adaptive thinking always on, xhigh and max effort), except cache reads
land at $0.25 per MTok, a quarter of Fable 5's price and 0.025x base input
instead of the usual 0.1x.

Registers anthropic.claude-fable-5-1 in BEDROCK_CONVERSE_MODELS, lists the model
in the setup wizard, and extends the reasoning effort e2e grid. The partner cells
carry fail_reason markers until access on the CI accounts is confirmed.

Partner entries deliberately carry no deprecation_date: Anthropic publishes
retirement no sooner than 2027-09-01 for the first-party model, and the Foundry
and Vertex dates are not published yet.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Access is confirmed on the Anthropic account, and all 11 cells pass live, so the
xfail marker would only hide real regressions.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

PR #39148 (BerriAI/litellm, author devin-ai-integration[bot]) has no enterprise label (labels: none), so it is out of scope. No risk label applied, no Linear changes made.

@codspeed-hq

codspeed-hq Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing litellm_claude_fable_5_1 (d6005a1) with litellm_internal_staging (0cf236b)

Open in CodSpeed

@greptile-apps

greptile-apps Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds Claude Fable 5.1 metadata, pricing, reasoning support, and forced-tool-choice handling across Anthropic, Bedrock, Vertex AI, and Azure AI

  • Registers first-party and partner model identifiers with capability and pricing metadata
  • Downgrades unsupported forced tool choices to automatic selection when parameter dropping is enabled
  • Adds transformation, configuration, pricing, and reasoning-grid coverage

Confidence Score: 5/5

The PR appears safe to merge

No blocking failure remains

Important Files Changed

Filename Overview
litellm/llms/anthropic/common_utils.py Adds metadata-driven forced-tool-use detection and automatic downgrade behavior
litellm/llms/anthropic/chat/transformation.py Applies the forced-tool-choice policy while mapping Anthropic chat parameters
litellm/llms/bedrock/chat/converse_transformation.py Applies the same model capability policy to Bedrock Converse tool-choice mapping
model_prices_and_context_window.json Registers Claude Fable 5.1 variants with pricing, limits, and capability metadata
tests/llm_translation/reasoning_effort_grid/grid_spec.py Adds partner reasoning-effort grid entries using the established unavailable-provider xfail convention
tests/test_litellm/llms/anthropic/chat/test_anthropic_chat_transformation.py Covers Anthropic forced-tool-choice rejection and downgrade behavior
tests/test_litellm/llms/bedrock/chat/test_converse_transformation.py Covers equivalent forced-tool-choice handling for Bedrock Converse

Reviews (5): Last reviewed commit: "merge: resolve conflict with litellm_int..." | Re-trigger Greptile

Comment thread tests/llm_translation/reasoning_effort_grid/grid_spec.py
… map

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

…le 5.1 cells

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

Live end-user QA on this branch: xhigh works and spend is priced off the new entry, logs page shows real cost

Logs detail with cost breakdown

Playground call and model info

Playground
Model info

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

…s_forced_tool_use

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@mateo-berri mateo-berri left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

…l_use

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

Comment thread litellm/llms/anthropic/common_utils.py
misbahsy added a commit to misbahsy/litellm-docs that referenced this pull request Sep 1, 2026
Covers what changes for a gateway rather than restating Anthropic's
benchmarks: cache reads at $0.25/MTok (0.025x base input, where every
other Claude model sits at 0.1x), forced tool use now returning a 400,
and thinking blocks being bound to the model that produced them, which
decides how fallback chains should be ordered.

Anthropic is live now; the Bedrock, Vertex AI, and Azure AI configs
land later today. Model support is added in BerriAI/litellm#39148.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
mateo-berri and others added 2 commits September 1, 2026 19:05
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
… converse

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

misbahsy added a commit to misbahsy/litellm-docs that referenced this pull request Sep 1, 2026
Covers what changes for a gateway rather than restating Anthropic's
benchmarks: cache reads at $0.25/MTok (0.025x base input, where every
other Claude model sits at 0.1x), forced tool use now returning a 400,
and thinking blocks being bound to the model that produced them, which
decides how fallback chains should be ordered.

Anthropic is live now; the Bedrock, Vertex AI, and Azure AI configs
land later today. Model support is added in BerriAI/litellm#39148.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

misbahsy added a commit to misbahsy/litellm-docs that referenced this pull request Sep 1, 2026
Covers what changes for a gateway rather than restating Anthropic's
benchmarks: cache reads at $0.25/MTok (0.025x base input, where every
other Claude model sits at 0.1x), forced tool use now returning a 400,
and thinking blocks being bound to the model that produced them, which
decides how fallback chains should be ordered.

Anthropic is live now; the Bedrock, Vertex AI, and Azure AI configs
land later today. Model support is added in BerriAI/litellm#39148.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit d816b75. Configure here.

misbahsy added a commit to misbahsy/litellm-docs that referenced this pull request Sep 1, 2026
Covers what changes for a gateway rather than restating Anthropic's
benchmarks: cache reads at $0.25/MTok (0.025x base input, where every
other Claude model sits at 0.1x), forced tool use now returning a 400,
and thinking blocks being bound to the model that produced them, which
decides how fallback chains should be ordered.

Anthropic is live now; the Bedrock, Vertex AI, and Azure AI configs
land later today. Model support is added in BerriAI/litellm#39148.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ansformation tests

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@mateo-berri
mateo-berri merged commit 4517e5e into litellm_internal_staging Sep 1, 2026
78 checks passed
@mateo-berri
mateo-berri deleted the litellm_claude_fable_5_1 branch September 1, 2026 19:30
mateo-berri pushed a commit to BerriAI/litellm-docs that referenced this pull request Sep 1, 2026
Covers what changes for a gateway rather than restating Anthropic's
benchmarks: cache reads at $0.25/MTok (0.025x base input, where every
other Claude model sits at 0.1x), forced tool use now returning a 400,
and thinking blocks being bound to the model that produced them, which
decides how fallback chains should be ordered.

Anthropic is live now; the Bedrock, Vertex AI, and Azure AI configs
land later today. Model support is added in BerriAI/litellm#39148.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d6005a1. Configure here.

optional_params["tool_choice"] = _tool_choice
optional_params["tool_choice"] = AnthropicConfig._apply_forced_tool_choice(
model=model, tool_choice=_tool_choice, drop_params=drop_params
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Structured output still forces tool use

Medium Severity

The new forced-tool gate only wraps caller tool_choice. Tool-based response_format still writes {type: "tool"} without that check. Azure and Vertex claude-fable-5-1 entries also omit supports_native_structured_output (present on the Anthropic and Bedrock rows), and Vertex/Invoke stub the model name for response_format, so structured-output calls on those routes still take the forced-tool path and 400.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit d6005a1. Configure here.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant