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:
Teknium
2026-03-17 04:13:41 -07:00
committed by GitHub

View File

@@ -6169,6 +6169,8 @@ class AIAgent:
if truncated_response_prefix:
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)
final_response = self._strip_think_blocks(final_response).strip()