Tries executors in order until one succeeds.
A streaming attempt that has already emitted a chunk is never abandoned.
Executors or model ids to try, best first.
Fallback predicates and hooks.
An executor that fails over.
Error when executors is empty.
executors
const upstream = fallback([ retry("default/glm-5.2", { attempts: 3 }), "fast/gemma-4-31b",]); Copy
const upstream = fallback([ retry("default/glm-5.2", { attempts: 3 }), "fast/gemma-4-31b",]);
Tries executors in order until one succeeds.
A streaming attempt that has already emitted a chunk is never abandoned.