Commit graph

5 commits

Author SHA1 Message Date
Aiden Cline
fce506b3f9 refactor(llm): replace LLMError reasons with flat tagged union
Replace the LLMError { module, method, reason } wrapper with a flat
tagged union (LLM.BadRequest, LLM.Authentication, LLM.PermissionDenied,
LLM.NotFound, LLM.RateLimit, LLM.QuotaExceeded, LLM.ContentPolicy,
LLM.ContextOverflow, LLM.ServerError, LLM.APIError, LLM.ConnectionError,
LLM.TimeoutError, LLM.MalformedResponse, LLM.NoRoute) plus an isLLMError
guard. Add one shared classifyApiFailure classifier used by the HTTP
executor and the AI SDK adapter so both surfaces classify identically,
preserving status, headers, body, and retry-after.

Core policy moves onto tags: retry RateLimit | ServerError |
ConnectionError | TimeoutError; toSessionError adds
provider.context-overflow, provider.timeout, and provider.not-found.

The provider-error stream event and the runner's held-back overflow
handling are unchanged here; isContextOverflowFailure now bridges old
events and new tags until the event is removed.
2026-07-13 12:21:21 -05:00
Aiden Cline
460cdc5aec
fix(llm): remove package retry policy (#35003) 2026-07-02 15:51:12 -05:00
Kit Langton
820c984d47
fix(core): recover v2 context overflow (#31005) 2026-06-05 16:05:51 -04:00
Kit Langton
41f6daf96a
Refactor LLM route-first provider API (#28523) 2026-05-20 20:15:52 -04:00
Kit Langton
5bb7b23440
Add native LLM core foundation (#24712) 2026-05-08 16:56:20 -04:00