fix(ui): surface model retry status (NAN-34) (#5504)

This commit is contained in:
chengyongru authored and GitHub committed 2026-09-07 15:12:39 +08:00
1 parent 0b1fa0c3e4
commit b581a496a6
52 files changed
+1697 -55

No files matched your search

+4
View File
@@ -130,6 +130,7 @@ class AgentRunResult:
round_usages: list[LLMUsage] = field(default_factory=list)
stop_reason: str = "completed"
error: str | None = None
failure_error_kind: str | None = None
tool_events: list[dict[str, str]] = field(default_factory=list)
had_injections: bool = False
# Terminal tail to emit when the preceding final-content prefix was already streamed.
@@ -396,6 +397,7 @@ class AgentRunner:
usage: LLMUsage | None = None
round_usages: list[LLMUsage] = []
error: str | None = None
failure_error_kind: str | None = None
stop_reason = "completed"
tool_events: list[dict[str, str]] = []
external_lookup_counts: dict[str, int] = {}
@@ -730,6 +732,7 @@ class AgentRunner:
had_injections = True
length_recovery_parts.clear()
continue
failure_error_kind = LLMProvider.public_error_kind(response)
break
if is_blank_text(clean):
final_content = EMPTY_FINAL_RESPONSE_MESSAGE
@@ -827,6 +830,7 @@ class AgentRunner:
round_usages=round_usages,
stop_reason=stop_reason,
error=error,
failure_error_kind=failure_error_kind,
tool_events=tool_events,
had_injections=had_injections,
pending_stream_content=pending_stream_content,