mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-08 03:01:47 +00:00
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:
parent
9e893d16d1
commit
c1a2710a32
1 changed files with 12 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue