Skip to content

fix(core): name each provider request failure - #348

Open
jyecusch wants to merge 2 commits into
domain-errorfrom
provider-request-errors
Open

jyecusch wants to merge 2 commits into
domain-errorfrom
provider-request-errors

Conversation

@jyecusch

@jyecusch jyecusch commented Oct 8, 2026

Copy link
Copy Markdown
Member

Part of SUGA-1977.

Models.RequestFailed and its reason string become one DomainError per failure, in providers/models/request-failures.ts. Each names the provider and model as the Models settings show them, and says what the reader can do. Failures are classified where the SDK is called: by HTTP status and the provider's error body, by socket error code (a connection never made vs. one that dropped), and by the network policy's refusal.

A turn now runs again only for a failure marked isRetryable, and waits at least as long as a rate-limited provider asks. UnusableAnswer and AnswerTimedOut are DomainErrors too, and providers/models joins the DomainError lint allowlists.

ModelNotOffered still covers every reason a model can't be resolved; telling those apart needs the explicit provider binding that comes next.

@jyecusch
jyecusch added this pull request to stack #343 October 8, 2026 23:43
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
sugabots-website 2cb1cc4 Oct 09 2026, 12:07 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants