opencode/packages/core
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
..
script fix(core): format generated migrations 2026-06-22 08:23:25 -04:00
src refactor(llm): replace LLMError reasons with flat tagged union 2026-07-13 12:21:21 -05:00
test refactor(llm): replace LLMError reasons with flat tagged union 2026-07-13 12:21:21 -05:00
bunfig.toml refactor(core): simplify integration test fixtures (#33292) 2026-06-22 04:15:34 +00:00
drizzle.config.ts refactor(core): move database schema ownership (#29068) 2026-05-30 21:08:38 -04:00
package.json chore: merge dev into v2 (#36144) 2026-07-09 16:32:44 -05:00
schema.json feat(core): replace instruction checkpoints with value-delta sync (#36254) 2026-07-10 13:26:25 -04:00
sst-env.d.ts refactor: rename shared package to core (#24309) 2026-04-25 10:59:17 -04:00
tsconfig.json core: remove @effect/language-service plugin and optimize hot path type performance 2026-04-30 23:21:05 -04:00