Commit graph

60 commits

Author SHA1 Message Date
Kit Langton
5e5294c036 refactor(llm): collapse model construction to provider packages and routes
Provider packages are now the only module-level model constructors; the
protocol-level model wrappers added earlier on this branch had one call
site each and duplicated the Settings vocabulary, so packages call
route.with(...).model({id}) directly. Deletes provider facades with no
importers outside llm tests; configure stays for V1 native-request.
2026-07-03 14:25:29 -04:00
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
Aiden Cline
373cd08b98
fix(copilot): honor advertised model endpoints (#34958) 2026-07-02 10:23:57 -05:00
James Long
6636683323
refactor: remove remaining default layer aliases (#34660) 2026-06-30 13:17:34 -04:00
opencode-agent[bot]
b10d617c80 chore: generate 2026-06-29 16:17:54 +00:00
Shoubhit Dash
18466b8020
feat(llm): add tool schema projections (#34454) 2026-06-29 21:45:42 +05:30
Shoubhit Dash
f7eeb08942
fix(llm): narrow raw overlays (#34448) 2026-06-29 21:18:06 +05:30
opencode-agent[bot]
c0e43c0c65 chore: generate 2026-06-29 13:57:06 +00:00
Shoubhit Dash
08c5a2a5e8
feat(llm): enforce request precedence (#34440) 2026-06-29 19:24:37 +05:30
opencode-agent[bot]
7077c70d60 chore: generate 2026-06-29 13:41:59 +00:00
Shoubhit Dash
1fd8bf526d
feat(llm): add model defaults and compatibility data (#34436) 2026-06-29 19:10:00 +05:30
opencode-agent[bot]
c3637753bc chore: generate 2026-06-29 10:58:22 +00:00
Shoubhit Dash
48fc9e3cc3
feat(llm): add response reducer (#34417) 2026-06-29 16:26:33 +05:30
Dax Raad
11d2f3e5f8 fix(llm): end reasoning before responses 2026-06-26 13:55:04 -04:00
Aiden Cline
f254476043
fix(llm): omit stateless response item ids (#34027) 2026-06-26 10:14:43 -05:00
Aiden Cline
5f61d21487
feat(llm): pass strict through tool definitions for Codex parity (#33392) 2026-06-25 16:28:39 -05:00
Kit Langton
516cfe4e09
refactor(schema): extract shared public schemas (#33571) 2026-06-23 22:31:06 -04:00
Kit Langton
130957288e
fix(llm): preserve structured tool errors (#33405) 2026-06-22 13:43:07 -04:00
Tommy D. Rossi
d5980b47e9
feat(llm): add video and audio media support to Gemini protocol (#31889)
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
2026-06-22 10:03:19 -05:00
Kit Langton
4f1ae1604e
chore: upgrade Effect to beta 83 (#32340) 2026-06-20 19:57:29 -04:00
Lucas Kim
2d993cd0d5
fix(experimental llm pkg): forward topK to Converse via additionalModelRequestFields (#33030) 2026-06-20 14:35:05 -05:00
opencode-agent[bot]
cc52dc396c chore: generate 2026-06-09 18:30:51 +00:00
Dax
132ef57272
refactor(core): simplify location filesystem (#31545) 2026-06-09 14:28:45 -04:00
Kit Langton
83dca45dd5
fix(core): make V2 reads media-aware and binary-safe (#31038) 2026-06-05 19:48:34 -04:00
Kit Langton
820c984d47
fix(core): recover v2 context overflow (#31005) 2026-06-05 16:05:51 -04:00
Kit Langton
0bdd9aa494
fix(core): preserve model request semantics (#30990) 2026-06-05 14:23:31 -04:00
Kit Langton
1af8dafd3e
feat(core): persist v2 session context epochs (#30789) 2026-06-04 23:26:43 -04:00
opencode-agent[bot]
134f4136da chore: generate 2026-06-04 23:58:11 +00:00
Kit Langton
f011d77128 fix(llm): normalize OpenAI function tool schemas 2026-06-04 19:56:31 -04:00
opencode-agent[bot]
b0a929440b chore: generate 2026-06-04 03:03:39 +00:00
Kit Langton
76ee87ead8
feat(core): add embedded v2 session runtime and tool foundation (#30632) 2026-06-03 23:02:17 -04:00
Dax
7f571d36ea
refactor(core): move database schema ownership (#29068)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-05-30 21:08:38 -04:00
opencode-agent[bot]
728eae9c25 chore: generate 2026-05-24 01:08:00 +00:00
Aiden Cline
eb84f461b8
fix(llm): split OpenAI reasoning summary blocks (#29000) 2026-05-23 20:06:45 -05:00
Aiden Cline
14c511e380
fix(llm): stabilize anthropic tool result typecheck (#28909) 2026-05-22 17:14:40 -05:00
Kit Langton
d0cb58782f
fix(llm): surface code, type, and nested fields on provider stream errors (#28757) 2026-05-22 12:37:55 -04:00
opencode-agent[bot]
8a55920531 chore: generate 2026-05-22 16:25:15 +00:00
Kit Langton
9db90a0b76
fix(llm): emit structured image blocks for tool-result media in Anthropic Messages (#28755) 2026-05-22 12:23:41 -04:00
Kit Langton
700d012025
fix(llm): emit structured input_image content for tool-result media in OpenAI Responses (#28754) 2026-05-22 12:23:23 -04:00
Kit Langton
e92c4fb460
chore: drop dead imports across opencode/core/llm (#28720) 2026-05-21 17:03:12 -04:00
Kit Langton
61390dbb49
fix(llm): preserve native continuation metadata (#28678) 2026-05-21 11:57:45 -04:00
Kit Langton
facd207396
fix(opencode): support native OpenAI OAuth fetch (#28571) 2026-05-20 23:29:25 -04:00
Kit Langton
16fb6dac8d
fix(llm): restore OpenAI reasoning streams (#28552) 2026-05-20 21:02:59 -04:00
Kit Langton
41f6daf96a
Refactor LLM route-first provider API (#28523) 2026-05-20 20:15:52 -04:00
Kit Langton
dbe36851bc
Preview native LLM runtime stack (#27114) 2026-05-18 14:41:36 -04:00
Kit Langton
ba5c8d3822
fix(llm): preserve tool error defects (#27403) 2026-05-13 20:43:32 -04:00
Kit Langton
dd14413a64
Preserve native LLM tool context (#27116) 2026-05-12 16:16:58 -04:00
Kit Langton
8030a6c187
Emit LLM stream lifecycle events (#26971) 2026-05-11 21:31:48 -04:00
Kit Langton
023e1c711e
refactor(llm): colocate per-type factories on their namespaces (#26799) 2026-05-11 13:05:41 -04:00
Kit Langton
9b369ee815
chore(llm): make cache: 'auto' the default (#26798) 2026-05-10 22:46:01 -04:00