mirror of
https://github.com/mudler/LocalAI.git
synced 2026-10-28 17:18:49 -04:00
test: cover config-level disable for xhigh/max and the effort-only load warning
- ApplyReasoningEffort keeps an operator's reasoning.disable for high, xhigh and max - sglang: _configured_budget() feeds the strict-thinking warning; tested with effort_budgets alone Signed-off-by: pos-ei-don <1822533+pos-ei-don@users.noreply.github.com>
This commit is contained in:
1 parent
0bd723a652
commit
45a960ca1f
3 files changed
+22
-8
No files matched your search
@@ -402,6 +402,16 @@ class TestSglangHelpers(unittest.TestCase):
|
||||
self.assertIsNone(servicer._strict_thinking_warning(512, {"enable_strict_thinking": True}))
|
||||
self.assertIsNone(servicer._strict_thinking_warning(None, {}))
|
||||
|
||||
def test_warns_when_only_effort_budgets_are_set(self):
|
||||
"""A model with effort_budgets but no thinking_budget still needs strict thinking."""
|
||||
servicer = self._servicer()
|
||||
servicer.thinking_budget = None
|
||||
servicer.effort_budgets = {"low": 256, "max": 16384}
|
||||
self.assertEqual(servicer._configured_budget(), 16384)
|
||||
self.assertIn("enable_strict_thinking", servicer._strict_thinking_warning(servicer._configured_budget(), {}))
|
||||
servicer.effort_budgets = {}
|
||||
self.assertIsNone(servicer._configured_budget())
|
||||
|
||||
def test_explicit_zero_temperature_and_seed_are_preserved(self):
|
||||
"""Temperature=0 is greedy decoding and 0 is a valid seed — neither is
|
||||
an unset value. A dropped seed turns a reproducible request random."""
|
||||
|
||||
Reference in new issue
Block a user