UNPKG

@ai2070/l0

Version:

L0: The Missing Reliability Substrate for AI

43 lines 1.12 kB
export const RETRY_DEFAULTS = { attempts: 3, maxRetries: 6, baseDelay: 1000, maxDelay: 10000, networkMaxDelay: 30000, backoff: "fixed-jitter", retryOn: [ "zero_output", "guardrail_violation", "drift", "incomplete", "network_error", "timeout", "rate_limit", "server_error", ], }; export const ERROR_TYPE_DELAY_DEFAULTS = { connectionDropped: 1000, fetchError: 500, econnreset: 1000, econnrefused: 2000, sseAborted: 500, noBytes: 500, partialChunks: 500, runtimeKilled: 2000, backgroundThrottle: 5000, dnsError: 3000, timeout: 1000, unknown: 1000, }; export var ErrorCategory; (function (ErrorCategory) { ErrorCategory["NETWORK"] = "network"; ErrorCategory["TRANSIENT"] = "transient"; ErrorCategory["MODEL"] = "model"; ErrorCategory["CONTENT"] = "content"; ErrorCategory["PROVIDER"] = "provider"; ErrorCategory["FATAL"] = "fatal"; ErrorCategory["INTERNAL"] = "internal"; })(ErrorCategory || (ErrorCategory = {})); //# sourceMappingURL=retry.js.map