Commit graph

15 commits

Author SHA1 Message Date
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
Dax Raad
93159bccbf feat(core): port v2 runtime fixes onto dev
Cherry-picks the packages/core changes from the v2 branch onto dev:
- combined ordered stdout/stderr in AppProcess + bash structured output
- edit/apply-patch return FileDiff info with status and line stats
- ignore no-op model switches; record reasoning timestamps
- return unexpected local tool defects to the model and continue
- keep OAuth account metadata out of request bodies
- nest OpenAI reasoning effort/summary options
- load OpenCode provider config asynchronously; batch plugin boot
- export latest public event manifest

Includes the supporting schema reasoning time field and regenerated
client/SDK types.
2026-06-27 00:07:25 -04:00
Kit Langton
65210f2d97
feat(api): add finite durable session history pages (#34097) 2026-06-26 14:49:47 -04:00
Dax Raad
850a0dfe7c fix(core): resolve prompt attachment mime types 2026-06-26 13:51:00 -04:00
Kit Langton
f44423609b
feat(sdk): restore session runtime operations (#33777) 2026-06-25 14:23:01 -04:00
Kit Langton
a267222080
refactor(schema): isolate v1 contracts (#33769) 2026-06-25 17:26:47 +00:00
Kit Langton
9e9d405d7e
refactor(schema): tighten public contracts (#33771) 2026-06-25 17:10:23 +00:00
Kit Langton
7854f5b9f7
refactor(schema): normalize module patterns (#33770) 2026-06-25 15:42:22 +00:00
Kit Langton
9ad7067971
docs(schema): document package conventions (#33768) 2026-06-25 11:12:09 -04:00
Kit Langton
56a37c3640
refactor(protocol): extract server contracts (#33708) 2026-06-24 22:15:31 -04:00
Dax
9bb5370205
feat(core): add session snapshot and revert system (#33226) 2026-06-24 23:41:16 +00:00
Kit Langton
24b0132bc5
refactor(schema): extract public event definitions (#33579) 2026-06-24 16:43:17 -04:00
Dax Raad
17f312d537 refactor(core): simplify model requests 2026-06-24 13:17:14 -04:00
Frank
db7c28b3ee zen: migrate to new inference 2026-06-24 11:15:42 -04:00
Kit Langton
516cfe4e09
refactor(schema): extract shared public schemas (#33571) 2026-06-23 22:31:06 -04:00