Skip to content

Commit 51dff1f

Browse files
fix(reasoning_effort_grid_v4): grant sonnet-4-6 entries the max-effort cap
The runtime _validate_effort_for_model allows effort='max' for any Claude 4.6 model (opus or sonnet), and model_prices_and_context_window sets supports_max_reasoning_effort: true for claude-sonnet-4-6. The grid spec previously gave sonnet-4-6 entries _CAPS_NONE, so expected() returned status=400 for effort='max', which mismatched the runtime's status=200 and caused 6 cells (one per route) to fail. Rename _CAPS_OPUS_4_6 to _CAPS_4_6 (since the cap set is shared by opus and sonnet 4.6) and assign it to all sonnet-4-6 entries. Co-authored-by: Yassin Kortam <yassin@berri.ai>
1 parent 4327427 commit 51dff1f

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

tests/test_litellm/reasoning_effort_grid_v4/grid_spec.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def expected(model: ModelEntry, effort: str) -> CellExpectation:
114114
_CAPS_OPUS_4_7: FrozenSet[str] = frozenset(
115115
{"supports_xhigh_reasoning_effort", "supports_max_reasoning_effort"}
116116
)
117-
_CAPS_OPUS_4_6: FrozenSet[str] = frozenset({"supports_max_reasoning_effort"})
117+
_CAPS_4_6: FrozenSet[str] = frozenset({"supports_max_reasoning_effort"})
118118
_CAPS_NONE: FrozenSet[str] = frozenset()
119119

120120

@@ -131,7 +131,7 @@ def expected(model: ModelEntry, effort: str) -> CellExpectation:
131131
model="anthropic/claude-sonnet-4-6",
132132
mode="adaptive",
133133
required_env=_ANTHROPIC_REQ,
134-
caps=_CAPS_NONE,
134+
caps=_CAPS_4_6,
135135
),
136136
ModelEntry(
137137
alias="claude-haiku-4-5",
@@ -156,14 +156,14 @@ def expected(model: ModelEntry, effort: str) -> CellExpectation:
156156
model="azure_ai/claude-opus-4-6",
157157
mode="adaptive",
158158
required_env=_AZURE_FOUNDRY_REQ,
159-
caps=_CAPS_OPUS_4_6,
159+
caps=_CAPS_4_6,
160160
),
161161
ModelEntry(
162162
alias="azure-claude-sonnet-4-6",
163163
model="azure_ai/claude-sonnet-4-6",
164164
mode="adaptive",
165165
required_env=_AZURE_FOUNDRY_REQ,
166-
caps=_CAPS_NONE,
166+
caps=_CAPS_4_6,
167167
),
168168
ModelEntry(
169169
alias="azure-claude-haiku-4-5",
@@ -190,15 +190,15 @@ def expected(model: ModelEntry, effort: str) -> CellExpectation:
190190
mode="adaptive",
191191
extra_params=(("vertex_location", "us-east5"),),
192192
required_env=_VERTEX_REQ,
193-
caps=_CAPS_OPUS_4_6,
193+
caps=_CAPS_4_6,
194194
),
195195
ModelEntry(
196196
alias="vertex-claude-sonnet-4-6",
197197
model="vertex_ai/claude-sonnet-4-6",
198198
mode="adaptive",
199199
extra_params=(("vertex_location", "us-east5"),),
200200
required_env=_VERTEX_REQ,
201-
caps=_CAPS_NONE,
201+
caps=_CAPS_4_6,
202202
),
203203
ModelEntry(
204204
alias="vertex-claude-haiku-4-5",
@@ -226,15 +226,15 @@ def expected(model: ModelEntry, effort: str) -> CellExpectation:
226226
mode="adaptive",
227227
extra_params=(("aws_region_name", "us-east-1"),),
228228
required_env=_BEDROCK_REQ,
229-
caps=_CAPS_OPUS_4_6,
229+
caps=_CAPS_4_6,
230230
),
231231
ModelEntry(
232232
alias="bedrock-claude-sonnet-4-6",
233233
model="bedrock/converse/us.anthropic.claude-sonnet-4-6",
234234
mode="adaptive",
235235
extra_params=(("aws_region_name", "us-east-1"),),
236236
required_env=_BEDROCK_REQ,
237-
caps=_CAPS_NONE,
237+
caps=_CAPS_4_6,
238238
),
239239
ModelEntry(
240240
alias="bedrock-claude-sonnet-4-5",
@@ -254,15 +254,15 @@ def expected(model: ModelEntry, effort: str) -> CellExpectation:
254254
mode="adaptive",
255255
extra_params=(("aws_region_name", "us-east-1"),),
256256
required_env=_BEDROCK_REQ,
257-
caps=_CAPS_OPUS_4_6,
257+
caps=_CAPS_4_6,
258258
),
259259
ModelEntry(
260260
alias="bedrock-invoke-claude-sonnet-4-6",
261261
model="bedrock/invoke/us.anthropic.claude-sonnet-4-6",
262262
mode="adaptive",
263263
extra_params=(("aws_region_name", "us-east-1"),),
264264
required_env=_BEDROCK_REQ,
265-
caps=_CAPS_NONE,
265+
caps=_CAPS_4_6,
266266
),
267267
ModelEntry(
268268
alias="bedrock-invoke-claude-opus-4-5",

0 commit comments

Comments
 (0)