fix(deepseek): clamp 'minimal' reasoning effort to 'low' instead of dropping it - #65954
fix(deepseek): clamp 'minimal' reasoning effort to 'low' instead of dropping it#65954Drexuxux wants to merge 1 commit into
Conversation
…ropping it
The DeepSeek profile clamps stronger-than-supported levels down to the
ceiling (xhigh/max/ultra → max) and passes low/medium/high through, but
'minimal' matched neither arm and fell through with no reasoning_effort
emitted. An omitted effort makes DeepSeek apply its server default —
currently 'high', the STRONGEST tier — so a user who explicitly asked for
'minimal' reasoning got maximum reasoning instead: the opposite of their
request, at higher latency and token cost.
'minimal' is a valid Hermes effort level (hermes_constants.VALID_REASONING_EFFORTS),
distinct from a garbage value, so it should clamp to DeepSeek's nearest
supported level ('low', the floor) rather than being treated like unknown
input. This mirrors both this profile's own xhigh/max → max ceiling clamp
and the canonical minimal → low clamp already used across the codebase
(auxiliary/codex/xai transports).
Adds a regression test (test_minimal_clamps_to_low, case-insensitive)
asserting reasoning_effort='low'; the existing garbage/empty → omit tests
are unaffected since neither equals 'minimal'.
tonydwb
left a comment
There was a problem hiding this comment.
Looks good. No obvious issues found.
Reviewed by Hermes Agent
|
Thanks for the focused regression fix. The premise holds on current main: The proposed Automated hermes-sweeper review. |
SummaryFour PRs are associated with #30818. #30832 removes the default Related pull requests
Duplicates#30883 duplicates the reasoning-effort normalization in #28945; #54556 and #65954 do not duplicate #30832 because they change independent auxiliary-model and effort-mapping behavior. Suggested consolidationAuthor action: rebase #30832 onto main and split out, if necessary, the opt-in Cross-PR triage: Reviewed 4 pull requests and 1 issue in this complex. Each diff was read against this issue; Assessment working set: 29 kB of PR diffs, 14 kB of issue/PR text, 4 kB of discussion (8 comments), 2 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch. |
|
Your diagnosis was exactly right — dropping |
What
minimalreasoning effort was silently dropped by the DeepSeek profile (matched no arm →reasoning_effortomitted → DeepSeek fell back to itshighdefault). So asking for the least reasoning gave you the most. Added the missingminimal→lowclamp (the floor), matching the existingxhigh/max→maxceiling clamp.Fix
plugins/model-providers/deepseek/__init__.py— addminimal→lowarm.tests/plugins/model_providers/test_deepseek_profile.py— addtest_minimal_clamps_to_low.Tests
pytest tests/plugins/model_providers/test_deepseek_profile.py -q→ 32 passed. Revert the fix and the 3 newminimalcases fail (effort omitted → defaulthigh); with the fix they assertlow.