From c1a2710a322592e6bdceb3c874050eeb09b4fbf8 Mon Sep 17 00:00:00 2001 From: briandevans <252620095+briandevans@users.noreply.github.com> Date: Tue, 28 Apr 2026 06:26:19 -0700 Subject: [PATCH] test(aux): cover effort: 0 fallback in Codex reasoning translation Copilot review on PR #17012 noted the docstring/comment lists `0` among the falsy effort values that fall back to `medium`, but the existing regression tests only cover `None` and `""`. Add the third case to lock in the full contract. Co-Authored-By: Claude Opus 4.7 (1M context) --- tests/agent/test_auxiliary_client.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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