diff --git a/studio/backend/tests/test_openai_tool_passthrough.py b/studio/backend/tests/test_openai_tool_passthrough.py index 84f3e41998..331605b998 100644 --- a/studio/backend/tests/test_openai_tool_passthrough.py +++ b/studio/backend/tests/test_openai_tool_passthrough.py @@ -275,18 +275,19 @@ class TestChatCompletionRequestToolFields: assert req.stop is None def test_extra_fields_accepted(self): - # `frequency_penalty`, `seed`, `response_format` are not yet - # explicitly declared but must survive Pydantic parsing now that - # extra="allow" is set. + # ``response_format`` is still an undeclared OpenAI-side field; + # it must survive Pydantic parsing because extra="allow" is set. + # ``frequency_penalty`` and ``seed`` were promoted to explicit + # ChatCompletionRequest fields in the sampling-params PR, so + # they now ride the attribute path, not model_extra. req = self._make( frequency_penalty = 0.5, seed = 42, response_format = {"type": "json_object"}, ) - # Extras land in model_extra + assert req.frequency_penalty == 0.5 + assert req.seed == 42 assert req.model_extra is not None - assert req.model_extra.get("frequency_penalty") == 0.5 - assert req.model_extra.get("seed") == 42 assert req.model_extra.get("response_format") == {"type": "json_object"} def test_unsloth_extensions_still_work(self):