Repository navigation
test(cost-map): pin bedrock claude native structured output flag invariants - #48641
mateo-berri wants to merge 4 commits into
Conversation
…riants Every Bedrock Claude family agrees on supports_native_structured_output across its inference-profile rows, GovCloud rows never lead their commercial base, the main and backup catalogs match, and every claude-fable-5 row keeps the flag off because Bedrock rejects outputConfig for it (#46870) Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
[Low impact] The PR appears safe to merge, with both previous findings addressed SummaryAdds tests that keep Bedrock Claude native-output flags consistent across commercial profiles, stop GovCloud rows from advertising unsupported flags, and compare the two catalogs The latest changes remove a repeated docstring and improve the GovCloud failure message. No new actionable issues were found
Reviews (6) · Last reviewed commit: "test(cost-map): move the GovCloud lag ru..." · Reviewed by Greptile |
…rock native output flags on fable 5 Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
bugbot run |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Click-through before/after walkthrough of this PR at its tip (catalog rows, Bedrock request shapes, the 2026-10-27 live answers, the new drift guard): https://htmlpreview.github.io/?https://gist.githubusercontent.com/agent-shin/ba7dd171f35619e9288cc37d1a79037d/raw/fable5-bedrock-native-output-walkthrough.html |
| """Bedrock Converse and Invoke reject outputConfig for claude-fable-5 with | ||
| `output_config.format: Extra inputs are not permitted` (AWS Bedrock, verified live 2026-10-17 in #46870), | ||
| so every claude-fable-5 row routes json_schema through the json tool call instead, with or without thinking""" |
There was a problem hiding this comment.
Live e2e not proven at this tip. The PR claims “After: the same request returns 200 with JSON matching the schema”, but all six live requests return 403 because AWS rejects the credentials. The successful results come from earlier PRs
The repository requires live evidence at this tip before merging. Show a running tip proxy accepting POST /v1/chat/completions and returning schema-matching JSON through the affected Bedrock profiles
Rule Used: Apply this rule to every PR, including PRs that change only tests, docs, or catalog data. It does not require new live tests for test-only PRs; it only checks that each runtime claim the PR makes is backed by evidence at this PR's tip A runtime clai... (source)
There was a problem hiding this comment.
Conceded: the 200 at this tip is unproven, every stored AWS key returns 403. Rerun lands here once a fresh credential exists; PR stays unmerged until then.
There was a problem hiding this comment.
Update. The OIDC AWS profile got 200 on us. and global. Fable 5, so f79ad75 drops the fable 5 flag-off test
There was a problem hiding this comment.
That makes sense: Bedrock’s successful native outputConfig response means the Fable 5 flag-off assertion was pinning a stale vendor limitation, and f79ad7568d appropriately removes it while keeping the profile-consistency and catalog-parity guards.
Live e2e not proven at this tip: The PR still claims, “After: the same request returns 200 with JSON matching the schema,” and says the request uses the JSON-tool path. Your update confirms 200s on us. and global., but doesn’t include the command/output or establish that those requests went through a proxy built from f79ad7568d; the current proof section’s explicit live output is for the rc1 proxy and its native-output path. Please add the live request and response output from a proxy built at this tip for the us. and global. profiles, showing the path this PR describes.
…e outputConfig for it again Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
bugbot run |
…e assert message Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
bugbot run |
There was a problem hiding this comment.
✅ 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 1857964. Configure here.
|
Closing per YAGNI, Bedrock now accepts native outputConfig for claude-fable-5, so the original 400 no longer needs a guard |
Locks in the Bedrock Claude native structured output flags so one inference profile row cannot drift away from its siblings. Every Bedrock Claude row of one model now has to agree on both native output flags across the anthropic., global., us., eu., apac., au. and jp. profiles, GovCloud rows may lag their commercial base but never lead it, and the two catalog copies have to match. An earlier version also pinned every claude-fable-5 row to flag off because Bedrock rejected outputConfig for it when #46870 landed. Bedrock accepts it again as of 2026-10-27, so that vendor fact is no longer pinned here. A customer running a patched 1.105.0rc1 asked us to upstream a guard like this
Details
TLDR
Problem this solves:
supports_native_structured_output: trueoutput_config.format: Extra inputs are not permittedfor that model when fix(bedrock): use native structured output on Haiku 5.5 and Sonnet 5.5, and fix Fable 5 and Sonnet 4.6 schema 400s #46870 landed, and accepts it again as of 2026-10-27How it solves it:
User Flow
Before: a developer on v1.105.0-rc.1 sends a json_schema request to Fable 5 on Bedrock and gets a 400 from AWS
"model": "bedrock/us.anthropic.claude-fable-5"andresponse_format: {"type": "json_schema", ...}outputConfig, since the bundled catalog flags the model as supporting itoutput_config.format: Extra inputs are not permittedwhen fix(bedrock): use native structured output on Haiku 5.5 and Sonnet 5.5, and fix Fable 5 and Sonnet 4.6 schema 400s #46870 landed. As of 2026-10-27 the same request returns 200 on us. and global., see the live proxy rowsAfter: the same request returns 200 with JSON matching the schema, and the catalog can no longer regress
"model": "bedrock/us.anthropic.claude-fable-5"and the sameresponse_formatsupports_native_structured_output: false{"city": "...", "country": "..."}matching the schema on us. and global.tests/unit/test_model_prices_and_context_window.pybefore it shipsPre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
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 moreDelays 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: a proxy on each side with the two claude-fable-5 profiles our AWS account serves on demand,
bedrock/us.anthropic.claude-fable-5andbedrock/global.anthropic.claude-fable-5in us-east-1 asfable5-usandfable5-global, Bedrock reached through the box's OIDC AWS profile (aws_profile_name: litellm-dev),drop_params: true, and this request body{"model": "MODEL", "messages": [{"role": "user", "content": "Give me a city and its country."}], "response_format": {"type": "json_schema", "json_schema": {"name": "city", "strict": true, "schema": {"type": "object", "properties": {"city": {"type": "string"}, "country": {"type": "string"}}, "required": ["city", "country"], "additionalProperties": false}}}}Before (2026bd8, v1.105.0-rc.1, the version the customer runs)
catalog rows
python3 -c 'import json; d=json.load(open("model_prices_and_context_window.json")); print({k: d[k]["supports_native_structured_output"] for k in d if k.endswith("anthropic.claude-fable-5")})'{'anthropic.claude-fable-5': True, 'global.anthropic.claude-fable-5': True, 'us.anthropic.claude-fable-5': True, 'eu.anthropic.claude-fable-5': True, 'apac.anthropic.claude-fable-5': True, 'au.anthropic.claude-fable-5': True}new test against this catalog
LITELLM_LOCAL_MODEL_COST_MAP=True uv run pytest tests/unit/test_model_prices_and_context_window.py -k bedrock_claude -q3 passed, 79 deselected, since all six rc1 rows agree with each other. The guard is against a row drifting from its siblings, which rc1 does not showlive proxy, PORT=4330
fable5-us 200andfable5-global 200, both{"city":"Paris","country":"France"}, so Bedrock now accepts the nativeoutputConfigrc1 sends and the 400 from fix(bedrock): shape Claude structured-output schemas on Converse and Invoke like the Anthropic path #46376 and fix(bedrock): use native structured output on Haiku 5.5 and Sonnet 5.5, and fix Fable 5 and Sonnet 4.6 schema 400s #46870 no longer reproducesAfter (tip)
catalog rows
{'anthropic.claude-fable-5': False, 'global.anthropic.claude-fable-5': False, 'us.anthropic.claude-fable-5': False, 'eu.anthropic.claude-fable-5': False, 'apac.anthropic.claude-fable-5': False, 'au.anthropic.claude-fable-5': False}new test against this catalog
LITELLM_LOCAL_MODEL_COST_MAP=True uv run pytest tests/unit/test_model_prices_and_context_window.py -k bedrock_claude -q3 passed, 79 deselectedus.anthropic.claude-fable-5to"supports_native_structured_output": truein the main catalog only, rerun2 failed, 1 passed(..._agree_on_native_structured_output_flags[main],..._backup_rows_match_the_main_catalog), and restoring the row gives3 passed"supports_bedrock_native_structured_output": trueto the same row instead, rerun2 failed, 1 passed"supports_bedrock_native_structured_output": truetobedrock/us-gov-west-1/claude-sonnet-4-5-20250929-v1:0, whose commercial base lacks it, rerun2 failed, 1 passed(..._agree_on_native_structured_output_flags[main],..._backup_rows_match_the_main_catalog)live proxy, PORT=4331
fable5-us 200andfable5-global 200, both{"city": "Paris", "country": "France"}through the json tool callType
✅ Test
Caveats (if any)
Medium
outputConfigonus.andglobal.claude-fable-5 on the converse route on 2026-10-27, so the claude-fable-5 rows could go back to flag on. That is a separate catalog change and needs its own live proof with thinking on and on the invoke route, so this PR leaves the rows offLow
global.from eu-west-1, ap-northeast-1 and ap-southeast-2 returns 400data retention mode 'default' is not available for this modelon both sides, an account setting rather than a litellm pathbedrock/claude_platform/claude-fable-5rows (Claude Platform on AWS, the Anthropic Messages API shape) keep the flag on and are outside the Converse and Invoke invariantclaude-sonnet-4-5-20250929-v1:0row carries no native output flag while its prefixed siblings do; it is the GovCloud id, so the test lets it lag rather than flipping it hereFinal Attestation