fix(cost-map): keep minimal withheld on Bedrock gpt-5.4 and gpt-5.5

LiteLLM sends the Bedrock Mantle GPT rows through Bedrock's Responses endpoint, which refuses minimal on gpt-5.4 and gpt-5.5 like every other Bedrock GPT row. The earlier commit measured the raw chat endpoint, which accepts it, and dropped the flag by mistake. The ladder test now matches what the proxy path returns
This commit is contained in:
mateo-berri 2026-09-11 13:46:20 -07:00
parent dbc57c13d4
commit 71f45683d7
3 changed files with 11 additions and 6 deletions

View file

@ -55824,6 +55824,7 @@
"text"
],
"supports_function_calling": true,
"supports_minimal_reasoning_effort": false,
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_response_schema": true,
@ -55861,6 +55862,7 @@
"text"
],
"supports_function_calling": true,
"supports_minimal_reasoning_effort": false,
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_response_schema": true,

View file

@ -55824,6 +55824,7 @@
"text"
],
"supports_function_calling": true,
"supports_minimal_reasoning_effort": false,
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_response_schema": true,
@ -55861,6 +55862,7 @@
"text"
],
"supports_function_calling": true,
"supports_minimal_reasoning_effort": false,
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_response_schema": true,

View file

@ -224,7 +224,7 @@ def test_chat_latest_declares_the_one_effort_openai_accepts(prices: dict):
BEDROCK_OPENAI_GPT_MARKERS: Final = ("openai.gpt-5.4", "openai.gpt-5.5", "openai.gpt-5.6", "openai.gpt-6-astra")
BEDROCK_PROVIDERS: Final = frozenset(("bedrock", "bedrock_converse", "bedrock_mantle"))
BEDROCK_ROW_PREFIXES: Final = ("bedrock_mantle/", "us.", "global.")
GPT_5_4_BEDROCK_LADDER: Final = ("none", "minimal", "low", "medium", "high", "xhigh")
GPT_5_4_BEDROCK_LADDER: Final = ("none", "low", "medium", "high", "xhigh")
GPT_5_6_BEDROCK_LADDER: Final = ("none", "low", "medium", "high", "xhigh", "max")
GPT_6_ASTRA_BEDROCK_LADDER: Final = ("low", "medium", "high", "xhigh", "max")
BEDROCK_OPENAI_GPT_LADDERS: Final = MappingProxyType(
@ -245,11 +245,12 @@ BEDROCK_OPENAI_GPT_LADDERS: Final = MappingProxyType(
("name", "ladder"), tuple(BEDROCK_OPENAI_GPT_LADDERS.items()), ids=tuple(BEDROCK_OPENAI_GPT_LADDERS)
)
def test_bedrock_openai_gpt_rows_advertise_the_ladder_bedrock_accepts(prices: dict, name: str, ladder: tuple[str, ...]):
"""Each ladder is the set of levels the Bedrock Mantle and Converse endpoints answered 200 to
for that row on 2026-09-11 (PR #40740), which differs from the direct OpenAI rows in three
places: Bedrock gpt-5.6 and gpt-6-astra take max, Bedrock gpt-5.4 and gpt-5.5 take minimal, and
gpt-6-astra refuses none. xhigh and max are opt-in for the resolver, so a row missing either
flag silently drops that level from every group it belongs to."""
"""Each ladder is the set of levels Bedrock answered 200 to for that row through the proxy on
2026-09-11 (PR #40740): the Mantle rows go out over its Responses endpoint and the Converse rows
over inference profiles. Bedrock differs from the direct OpenAI rows in two places, gpt-5.6 and
gpt-6-astra take max there, and gpt-6-astra refuses none; minimal is refused on every row.
xhigh and max are opt-in for the resolver, so a row missing either flag silently drops that
level from every group it belongs to."""
assert resolve_supported_reasoning_efforts(prices[name], deployment_is_mapped=True) == ladder