mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-15 14:22:43 +00:00
test: fold deepseek-v4 cases into canonical reasoning-floor test, drop duplicate file
The salvaged PR added a standalone test_reasoning_timeouts.py that duplicated the structure of the existing parametrized test_reasoning_stale_timeout_floor.py. Fold the v4-flash/v4-pro/-free positive cases and deepseek-chat negative cases into the canonical parametrized tables and remove the redundant file.
This commit is contained in:
parent
1e16120603
commit
411d599764
2 changed files with 10 additions and 47 deletions
|
|
@ -46,10 +46,15 @@ import pytest
|
|||
("nvidia/nemotron-3-ultra-550b-a55b", 600.0),
|
||||
("nvidia/nemotron-3-super-120b-a12b", 600.0),
|
||||
("nvidia/nemotron-3-nano-30b-a3b", 300.0),
|
||||
# DeepSeek R1 + DeepSeek reasoner.
|
||||
# DeepSeek R1 + DeepSeek reasoner + V4 reasoning series.
|
||||
# V4 emits reasoning_content in a separate delta before final
|
||||
# content (same shape as R1), so it needs the same 600s floor.
|
||||
("deepseek/deepseek-r1", 600.0),
|
||||
("deepseek/deepseek-r1-distill-llama-70b", 600.0),
|
||||
("deepseek/deepseek-reasoner", 600.0),
|
||||
("deepseek/deepseek-v4-flash", 600.0),
|
||||
("deepseek/deepseek-v4-pro", 600.0),
|
||||
("deepseek-v4-flash-free", 600.0), # catalog -free variant inherits via separator anchor
|
||||
# Qwen QwQ + Qwen3 thinking variants (qwen3 family entry matches all).
|
||||
("qwen/qwq-32b-preview", 300.0),
|
||||
("qwen/qwen3-235b-a22b-thinking", 180.0),
|
||||
|
|
@ -104,6 +109,10 @@ def test_reasoning_stale_timeout_floor_positive_cases(model, expected):
|
|||
"x-ai/grok-code-fast-1",
|
||||
# Qwen2 must not match Qwen3 (different family).
|
||||
"qwen2-72b-instruct",
|
||||
# Non-reasoning DeepSeek chat must not match the v4 reasoning entries.
|
||||
"deepseek-chat",
|
||||
"deepseek/deepseek-chat",
|
||||
"some-deepseek-v4-flash", # embedded v4 slug, NOT start of slug
|
||||
# Empty / None / non-string inputs — must return None, not raise.
|
||||
"",
|
||||
None,
|
||||
|
|
|
|||
|
|
@ -1,46 +0,0 @@
|
|||
"""Test get_reasoning_stale_timeout_floor for DeepSeek V4 reasoning models."""
|
||||
|
||||
from agent.reasoning_timeouts import get_reasoning_stale_timeout_floor
|
||||
|
||||
|
||||
def test_deepseek_v4_reasoning_models_have_timeout_floor():
|
||||
"""DeepSeek V4 reasoning models should have 600s timeout floor.
|
||||
|
||||
DeepSeek V4 models (deepseek-v4-flash, deepseek-v4-pro) emit
|
||||
reasoning_content in a separate delta field before final content,
|
||||
requiring the same extended stale timeout floor as R1.
|
||||
See #60338.
|
||||
"""
|
||||
# Direct model names (no aggregator prefix)
|
||||
assert get_reasoning_stale_timeout_floor("deepseek-v4-flash") == 600.0
|
||||
assert get_reasoning_stale_timeout_floor("deepseek-v4-pro") == 600.0
|
||||
|
||||
# With aggregator prefixes (common usage)
|
||||
assert get_reasoning_stale_timeout_floor("deepseek/deepseek-v4-flash") == 600.0
|
||||
assert get_reasoning_stale_timeout_floor("deepseek/deepseek-v4-pro") == 600.0
|
||||
|
||||
# With custom provider prefixes
|
||||
assert get_reasoning_stale_timeout_floor("opencode/deepseek-v4-flash") == 600.0
|
||||
assert get_reasoning_stale_timeout_floor("custom/deepseek-v4-pro") == 600.0
|
||||
|
||||
|
||||
def test_deepseek_v4_timeout_floor_matches_r1():
|
||||
"""V4 models should have the same floor as R1 (600s)."""
|
||||
v4_flash_floor = get_reasoning_stale_timeout_floor("deepseek-v4-flash")
|
||||
v4_pro_floor = get_reasoning_stale_timeout_floor("deepseek-v4-pro")
|
||||
r1_floor = get_reasoning_stale_timeout_floor("deepseek-r1")
|
||||
reasoner_floor = get_reasoning_stale_timeout_floor("deepseek-reasoner")
|
||||
|
||||
assert v4_flash_floor == v4_pro_floor == r1_floor == reasoner_floor == 600.0
|
||||
|
||||
|
||||
def test_deepseek_v4_does_not_match_non_reasoning_deepseek():
|
||||
"""Non-reasoning deepseek variants should not match V4 patterns."""
|
||||
# deepseek-chat is not a reasoning model and should not match
|
||||
# the deepseek-v4 patterns (requires start-of-slug anchor).
|
||||
assert get_reasoning_stale_timeout_floor("deepseek-chat") is None
|
||||
assert get_reasoning_stale_timeout_floor("deepseek/deepseek-chat") is None
|
||||
|
||||
# But V4 patterns should still match V4 models even with non-V4 prefixes
|
||||
assert get_reasoning_stale_timeout_floor("some-deepseek-v4-flash") is None # wrong prefix
|
||||
assert get_reasoning_stale_timeout_floor("deepseek-v4-flash-model") == 600.0 # suffix OK
|
||||
Loading…
Add table
Add a link
Reference in a new issue