fix: don't append interim assistant message before retry to avoid prefill errors
This commit is contained in:
@@ -253,10 +253,6 @@ class AgentLoop:
|
|||||||
if not tools_used and not text_only_retried and final_content:
|
if not tools_used and not text_only_retried and final_content:
|
||||||
text_only_retried = True
|
text_only_retried = True
|
||||||
logger.debug("Interim text response (no tools used yet), retrying: {}", final_content[:80])
|
logger.debug("Interim text response (no tools used yet), retrying: {}", final_content[:80])
|
||||||
messages = self.context.add_assistant_message(
|
|
||||||
messages, response.content,
|
|
||||||
reasoning_content=response.reasoning_content,
|
|
||||||
)
|
|
||||||
final_content = None
|
final_content = None
|
||||||
continue
|
continue
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user