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) <noreply@anthropic.com>
This commit is contained in:
briandevans 2026-04-28 06:26:19 -07:00 committed by Teknium
parent 9e893d16d1
commit c1a2710a32

View file

@ -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