cloudaxe-opencode/packages/llm/test
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
..
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): replace LLMError reasons with flat tagged union 2026-07-13 12:21:21 -05:00
adapter.test.ts chore: merge dev into v2 (#34788) 2026-07-01 17:12:00 -04:00
auth-options.types.ts
auth.test.ts
cache-policy.test.ts
continuation-scenarios.ts fix(llm): split OpenAI reasoning summary blocks (#29000) 2026-05-23 20:06:45 -05:00
endpoint.test.ts
executor.test.ts refactor(llm): replace LLMError reasons with flat tagged union 2026-07-13 12:21:21 -05:00
exports.test.ts chore: merge dev into v2 (#35591) 2026-07-06 16:05:29 -05:00
generate-object.test.ts
llm.test.ts chore: merge dev into v2 (#34788) 2026-07-01 17:12:00 -04:00
prepare.test.ts refactor(llm): replace LLMError reasons with flat tagged union 2026-07-13 12:21:21 -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
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
response.test.ts chore: merge dev into v2 (#34788) 2026-07-01 17:12:00 -04:00
route.test.ts
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): replace LLMError reasons with flat tagged union 2026-07-13 12:21:21 -05:00
tool.types.ts chore: generate 2026-06-04 03:03:39 +00:00