mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-05-08 10:45:52 +00:00
fix: adjust DeepSeek reasoning mode check condition
- Modified _drop_deepseek_incomplete_reasoning_history to properly handle reasoning mode detection - Fixes issue #3554
This commit is contained in:
parent
e16fa7c6b1
commit
8ca575bdeb
@ -457,11 +457,16 @@ class OpenAICompatProvider(LLMProvider):
|
|||||||
if (
|
if (
|
||||||
not self._spec
|
not self._spec
|
||||||
or self._spec.name != "deepseek"
|
or self._spec.name != "deepseek"
|
||||||
or not reasoning_effort
|
|
||||||
or reasoning_effort.lower() == "none"
|
|
||||||
):
|
):
|
||||||
return messages
|
return messages
|
||||||
|
|
||||||
|
# For DeepSeek models, always check for incomplete reasoning history
|
||||||
|
# when thinking mode might be active. reasoning_effort may not be set
|
||||||
|
# explicitly but the model could still be using thinking mode by default.
|
||||||
|
# Only skip this check when reasoning_effort is explicitly set to "none".
|
||||||
|
if reasoning_effort is not None and reasoning_effort.lower() == "none":
|
||||||
|
return messages
|
||||||
|
|
||||||
bad_idx = None
|
bad_idx = None
|
||||||
for idx, msg in enumerate(messages):
|
for idx, msg in enumerate(messages):
|
||||||
if (
|
if (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user