opencode/packages/llm/test
Kit Langton 38398fd450 feat(llm): provider packages own model request construction
Provider packages in @opencode-ai/llm/providers/* now implement a uniform
ProviderPackage contract: model(modelID, settings) => Model. SessionRunnerModel
becomes provider-agnostic: it resolves a package specifier, folds catalog
settings, credentials, and transport overlays into one Settings object, and
delegates request construction to the package.

- llm: add ProviderPackage (Settings, Definition, define), flat model(id,
  config) constructors on the openai-responses, anthropic-messages, and
  openai-compatible-chat protocols, contract-shaped model exports on the
  openai, anthropic, and openai-compatible providers, and a new
  providers/openai/codex entry point that targets the ChatGPT codex backend
  and sets the chatgpt-account-id header from settings.accountID.
- schema: Provider.Native gains optional package.
- core: SessionRunnerModel loads packages through a static built-in map
  (dynamic import for foreign specifiers) and applies one settings fold;
  the ChatGPT conditional is deleted from the runner. The OpenAI plugin's
  catalog transform now assigns the codex package to eligible models when a
  ChatGPT connection is active, alongside the existing eligibility and cost
  rewrites.
- llm schema: hoist ToolResultValue union out of its Object.assign self
  reference; the previous shape only typechecked under lucky check ordering
  and broke under core's typecheck with the new import graph.

Closes #34765
2026-07-03 14:01:17 -04:00
..
fixtures feat(llm): add response reducer (#34417) 2026-06-29 16:26:33 +05:30
lib chore: generate 2026-06-04 03:03:39 +00:00
provider feat(llm): provider packages own model request construction 2026-07-03 14:01:17 -04:00
adapter.test.ts test(llm): verify generate reducer law (#34418) 2026-06-29 17:01:45 +05:30
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 fix(core): recover v2 context overflow (#31005) 2026-06-05 16:05:51 -04:00
exports.test.ts feat(llm): provider packages own model request construction 2026-07-03 14:01:17 -04:00
generate-object.test.ts Refactor LLM route-first provider API (#28523) 2026-05-20 20:15:52 -04:00
llm.test.ts feat(llm): add model defaults and compatibility data (#34436) 2026-06-29 19:10:00 +05:30
prepare.test.ts chore: generate 2026-06-29 15:50:24 +00:00
provider.types.ts Refactor LLM route-first provider API (#28523) 2026-05-20 20:15:52 -04:00
recorded-golden.ts feat(http-recorder): prepare public beta release (#31018) 2026-06-06 03:01:26 +00:00
recorded-runner.ts Add native LLM core foundation (#24712) 2026-05-08 16:56:20 -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): prepare public beta release (#31018) 2026-06-06 03:01:26 +00:00
recorded-utils.ts Add native LLM core foundation (#24712) 2026-05-08 16:56:20 -04:00
recorded-websocket.ts feat(http-recorder): prepare public beta release (#31018) 2026-06-06 03:01:26 +00:00
response.test.ts test(llm): lock event reducer laws (#34423) 2026-06-29 17:22:46 +05:30
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 feat(llm): add tool schema projections (#34454) 2026-06-29 21:45:42 +05:30
tool-stream.test.ts Emit LLM stream lifecycle events (#26971) 2026-05-11 21:31:48 -04:00
tool.types.ts chore: generate 2026-06-04 03:03:39 +00:00