You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
createAI: binding errors flagged retryable: true are not retried #2628
When env.AI.run throws an error that the runtime marks retryable: true (e.g. Network connection lost.), createAI wraps it as non-retryable, so the AI SDK's maxRetries never kicks in and fallback legs treat it as terminal.
constai=createAI({binding: env.AI});awaitgenerateText({model: ai("@cf/meta/llama-3.3-70b-instruct-fp8-fast"), prompt,maxRetries: 2});// binding throws Object.assign(new Error("Network connection lost."), { retryable: true })// -> one call, no retry
normalizeThrownError in packages/agents/src/models/core/errors.ts only looks for a known Workers AI code in the message; with no code it sets isRetryable: false and ignores the error's own retryable flag. It should honour retryable: true (and false) when present, before falling back to the code table.
Activity