fix: error logging for stop reasons

This commit is contained in:
Andy Li
2025-07-24 16:51:31 -07:00
committed by GitHub
parent 99af0039fc
commit fbc69e6a0c
2 changed files with 8 additions and 0 deletions

View File

@@ -359,6 +359,8 @@ class LettaAgent(BaseAgent):
# Update step if it needs to be updated
finally:
if settings.track_stop_reason:
if step_progression == StepProgression.FINISHED and should_continue:
continue
self.logger.info("Running final update. Step Progression: %s", step_progression)
try:
if step_progression < StepProgression.STEP_LOGGED:
@@ -586,6 +588,8 @@ class LettaAgent(BaseAgent):
# Update step if it needs to be updated
finally:
if settings.track_stop_reason:
if step_progression == StepProgression.FINISHED and should_continue:
continue
self.logger.info("Running final update. Step Progression: %s", step_progression)
try:
if step_progression < StepProgression.STEP_LOGGED:
@@ -897,6 +901,8 @@ class LettaAgent(BaseAgent):
# Update step if it needs to be updated
finally:
if settings.track_stop_reason:
if step_progression == StepProgression.FINISHED and should_continue:
continue
self.logger.info("Running final update. Step Progression: %s", step_progression)
try:
if step_progression < StepProgression.STEP_LOGGED:

View File

@@ -1,3 +1,5 @@
import asyncio
import pytest
from letta.constants import MAX_FILENAME_LENGTH