fix(core): retry on failed as well as timeout; only auth stops the run (#104)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -671,15 +671,23 @@ When done, open index.html in a browser and self-test once.`,
|
||||
modelAuthDeadRetry: "Retry",
|
||||
modelAuthDeadCta: "New Session",
|
||||
modelAuthDeadPlaceholder: "Model authentication failed — update the API key first",
|
||||
/** Reconnect hint line; `secondsLeft` (waiting state only) switches to the live-countdown wording. */
|
||||
/**
|
||||
* Reconnect hint line; `secondsLeft` (waiting state only) switches to the live-countdown
|
||||
* wording. `failed` is in the union because the engine retries it like the other two —
|
||||
* its cause names the provider rather than the transport, since that is where it came from.
|
||||
*/
|
||||
reconnect: (
|
||||
status: "timeout" | "malformed",
|
||||
status: "failed" | "timeout" | "malformed",
|
||||
state: "waiting" | "retried" | "gaveUp",
|
||||
attempt: number,
|
||||
secondsLeft?: number,
|
||||
) => {
|
||||
const cause =
|
||||
status === "timeout" ? "Connection timed out" : "Response incomplete or unparseable";
|
||||
status === "timeout"
|
||||
? "Connection timed out"
|
||||
: status === "malformed"
|
||||
? "Response incomplete or unparseable"
|
||||
: "The model provider returned an error";
|
||||
const action =
|
||||
state === "gaveUp"
|
||||
? "no further retries"
|
||||
|
||||
Reference in New Issue
Block a user