fix: restore dev retry logic and add class constants

- Restore simple dev retry flow (no AsyncRetrying wrapper)
- Add EMPTY_OUTPUT_RETRY_* class constants for test compatibility
This commit is contained in:
LIghtJUNction
2026-03-30 17:17:21 +08:00
parent 086dc00498
commit e8557909d6

View File

@@ -100,6 +100,10 @@ USER_INTERRUPTION_MESSAGE = (
class ToolLoopAgentRunner(BaseAgentRunner[TContext]):
EMPTY_OUTPUT_RETRY_ATTEMPTS = 3
EMPTY_OUTPUT_RETRY_WAIT_MIN_S = 1
EMPTY_OUTPUT_RETRY_WAIT_MAX_S = 4
def _get_persona_custom_error_message(self) -> str | None:
"""Read persona-level custom error message from event extras when available."""
event = getattr(self.run_context.context, "event", None)