diff --git a/tests/agent/test_auxiliary_client.py b/tests/agent/test_auxiliary_client.py index a42b6fc877..cf75d0b1f8 100644 --- a/tests/agent/test_auxiliary_client.py +++ b/tests/agent/test_auxiliary_client.py @@ -1675,6 +1675,18 @@ class TestCodexAdapterReasoningTranslation: assert captured.get("reasoning") == {"effort": "medium", "summary": "auto"} assert captured.get("include") == ["reasoning.encrypted_content"] + def test_reasoning_effort_zero_falls_back_to_medium(self): + """Numeric ``0`` is also falsy — the docstring lists it explicitly, + so cover the contract. Codex would reject ``{"effort": 0}`` the + same way it rejects ``null``.""" + adapter, captured = self._build_adapter() + adapter.create( + messages=[{"role": "user", "content": "hi"}], + extra_body={"reasoning": {"effort": 0}}, + ) + assert captured.get("reasoning") == {"effort": "medium", "summary": "auto"} + assert captured.get("include") == ["reasoning.encrypted_content"] + class TestVisionAutoSkipsKimiCoding: """_resolve_auto vision branch skips providers that have no vision on