Retries an executor until it succeeds or runs out of attempts.
A streaming attempt that has already emitted a chunk is never retried, so a client never sees the same text twice.
Executor or model id to run.
Attempt count and retry predicates.
An executor that retries on failure.
const upstream = retry("default/glm-5.2", { attempts: 3 }); Copy
const upstream = retry("default/glm-5.2", { attempts: 3 });
Retries an executor until it succeeds or runs out of attempts.
A streaming attempt that has already emitted a chunk is never retried, so a client never sees the same text twice.