opencode/packages/llm/test
Aiden Cline bd51cdba12 refactor(llm): redesign error model as flat tagged union
- Replace LLMError { module, method, reason } wrapper with a flat tagged
  union: BadRequest, Authentication, PermissionDenied, NotFound, RateLimit,
  QuotaExceeded, ContentPolicy, ContextOverflow, ServerError, APIError,
  ConnectionError, TimeoutError, MalformedResponse, NoRoute.
- Delete the provider-error LLMEvent: streams carry output only and every
  failure exits through the typed error channel.
- Add one shared classifyApiFailure classifier used by the HTTP executor,
  protocol stream errors, and the AI SDK adapter so all routes classify
  identically (including OpenAI in-stream rate_limit_exceeded and
  internal_error codes).
- Enforce a terminal contract in LLMClient.stream for every route: EOF
  without finish and output after finish fail as MalformedResponse.
- Classify AI SDK failures properly in core/aisdk.ts instead of collapsing
  to UnknownProvider; preserve status, headers, body, and retry-after.
- Simplify the session runner: drop held-back overflow events, key overflow
  recovery off LLM.ContextOverflow, retry RateLimit | ServerError |
  ConnectionError | TimeoutError.
- Map new tags in toSessionError (provider.context-overflow,
  provider.timeout, provider.not-found).
2026-07-13 00:47:32 -05:00
..
fixtures chore: merge dev into v2 (#34788) 2026-07-01 17:12:00 -04:00
lib chore: generate 2026-06-04 03:03:39 +00:00
provider refactor(llm): redesign error model as flat tagged union 2026-07-13 00:47:32 -05:00
adapter.test.ts chore: merge dev into v2 (#34788) 2026-07-01 17:12:00 -04:00
auth-options.types.ts Refactor LLM route-first provider API (#28523) 2026-05-20 20:15:52 -04:00
auth.test.ts Refactor LLM route-first provider API (#28523) 2026-05-20 20:15:52 -04:00
cache-policy.test.ts Refactor LLM route-first provider API (#28523) 2026-05-20 20:15:52 -04:00
continuation-scenarios.ts fix(llm): split OpenAI reasoning summary blocks (#29000) 2026-05-23 20:06:45 -05:00
endpoint.test.ts Refactor LLM route-first provider API (#28523) 2026-05-20 20:15:52 -04:00
executor.test.ts refactor(llm): redesign error model as flat tagged union 2026-07-13 00:47:32 -05:00
exports.test.ts chore: merge dev into v2 (#35591) 2026-07-06 16:05:29 -05:00
generate-object.test.ts Refactor LLM route-first provider API (#28523) 2026-05-20 20:15:52 -04:00
llm.test.ts chore: merge dev into v2 (#34788) 2026-07-01 17:12:00 -04:00
prepare.test.ts refactor(llm): redesign error model as flat tagged union 2026-07-13 00:47:32 -05:00
provider-error.test.ts fix: preserve compaction files and classify Z.AI overflow (#35747) 2026-07-07 09:54:31 -05:00
provider-package.test.ts feat(llm): complete provider package entrypoints (#35907) 2026-07-08 18:41:46 +05:30
provider.types.ts Refactor LLM route-first provider API (#28523) 2026-05-20 20:15:52 -04:00
recorded-golden.ts feat(http-recorder): sync recorder v0.3 (#35619) 2026-07-08 11:41:59 -04:00
recorded-runner.ts feat(http-recorder): sync recorder v0.3 (#35619) 2026-07-08 11:41:59 -04:00
recorded-scenarios.ts refactor(core): simplify location filesystem (#31545) 2026-06-09 14:28:45 -04:00
recorded-test.ts feat(http-recorder): sync recorder v0.3 (#35619) 2026-07-08 11:41:59 -04:00
recorded-utils.ts Add native LLM core foundation (#24712) 2026-05-08 16:56:20 -04:00
response.test.ts chore: merge dev into v2 (#34788) 2026-07-01 17:12:00 -04:00
route.test.ts Refactor LLM route-first provider API (#28523) 2026-05-20 20:15:52 -04:00
schema.test.ts chore: generate 2026-06-05 03:28:04 +00:00
tool-runtime.test.ts fix(llm): omit stateless response item ids (#34027) 2026-06-26 10:14:43 -05:00
tool-schema-projection.test.ts chore: merge dev into v2 (#34788) 2026-07-01 17:12:00 -04:00
tool-stream.test.ts refactor(llm): redesign error model as flat tagged union 2026-07-13 00:47:32 -05:00
tool.types.ts chore: generate 2026-06-04 03:03:39 +00:00