Merge pull request #1717 from NousResearch/fix/length-continue-retries-reset
fix(core): length_continue_retries never resets — later truncations get fewer retries
This commit is contained in:
commit
16f38abd25
1 changed files with 2 additions and 0 deletions
|
|
@ -6169,6 +6169,8 @@ class AIAgent:
|
||||||
|
|
||||||
if truncated_response_prefix:
|
if truncated_response_prefix:
|
||||||
final_response = truncated_response_prefix + final_response
|
final_response = truncated_response_prefix + final_response
|
||||||
|
truncated_response_prefix = ""
|
||||||
|
length_continue_retries = 0
|
||||||
|
|
||||||
# Strip <think> blocks from user-facing response (keep raw in messages for trajectory)
|
# Strip <think> blocks from user-facing response (keep raw in messages for trajectory)
|
||||||
final_response = self._strip_think_blocks(final_response).strip()
|
final_response = self._strip_think_blocks(final_response).strip()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue