Commit graph

57 commits

Author SHA1 Message Date
Aiden Cline
5d87c7ad1f refactor(llm): remove the provider-error stream event
Delete the provider-error LLMEvent so streams carry output only and
every provider-reported failure exits through the typed error channel.
Anthropic SSE error events, OpenAI Responses response.failed/error
events, and Bedrock exception frames now fail the stream with an
LLMError from the shared classifier (carrying the provider code, e.g.
rate_limit_exceeded -> LLM.RateLimit).

Core follows: the publisher drops its provider-error case, the runner
drops held-back overflow events (overflow recovery keys off a thrown
LLM.ContextOverflow), compaction and title stop scanning events for
failures, and isContextOverflowFailure is deleted with its last
consumer. V1 packages/opencode gets minimal compile fixes only (dead
switch case, one test stream).
2026-07-13 12:22:30 -05:00
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
Harsh Mathur
bd0dffd781
fix(llm): preserve nested OpenAI stream errors (#36130)
Co-authored-by: Harsh Mathur <jeevesforharsh@gmail.com>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2026-07-09 14:40:28 -05:00
Kit Langton
3dd29094f4
feat(http-recorder): sync recorder v0.3 (#35619) 2026-07-08 11:41:59 -04:00
Shoubhit Dash
3cbcd8d727
feat(llm): complete provider package entrypoints (#35907) 2026-07-08 18:41:46 +05:30
Aiden Cline
f488089179
fix: preserve compaction files and classify Z.AI overflow (#35747)
Co-authored-by: opencode-agent[bot] <219766164+opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: 冯基魁 <56265583+fengjikui@users.noreply.github.com>
2026-07-07 09:54:31 -05:00
Kit Langton
bf01264661
feat(core): finalize session event lifecycle (#35272) 2026-07-06 18:14:06 -04:00
Aiden Cline
9e0d3976e1
chore: merge dev into v2 (#35591)
Co-authored-by: Frank <frank@anoma.ly>
Co-authored-by: Aarav Sareen <96787824+arvsrn@users.noreply.github.com>
Co-authored-by: Brendan Allan <git@brendonovich.dev>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: Jack <jack@anoma.ly>
Co-authored-by: Brendan Allan <14191578+Brendonovich@users.noreply.github.com>
Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>
Co-authored-by: opencode-agent[bot] <219766164+opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: James Long <longster@gmail.com>
Co-authored-by: Dustin Deus <deusdustin@gmail.com>
Co-authored-by: starptech <starptech@starptechs-MBP.fritz.box>
Co-authored-by: Luke Parker <10430890+Hona@users.noreply.github.com>
Co-authored-by: 𝓛𝓲𝓽𝓽𝓵𝓮 𝓕𝓻𝓪𝓷𝓴 <little-frank@opencord.local>
Co-authored-by: Dax <mail@thdxr.com>
Co-authored-by: usrnk1 <7547651+usrnk1@users.noreply.github.com>
Co-authored-by: Jay <53023+jayair@users.noreply.github.com>
Co-authored-by: runvip <164729189+runvip@users.noreply.github.com>
Co-authored-by: opencode <opencode@sst.dev>
Co-authored-by: Julian Coy <julian@ex-machina.co>
Co-authored-by: Vladimir Glafirov <vglafirov@gitlab.com>
Co-authored-by: Adam <2363879+adamdotdevin@users.noreply.github.com>
Co-authored-by: Kit Langton <kit.langton@gmail.com>
Co-authored-by: Simon Klee <hello@simonklee.dk>
Co-authored-by: Jay <air@live.ca>
Co-authored-by: David Hill <1879069+iamdavidhill@users.noreply.github.com>
2026-07-06 16:05:29 -05:00
Shoubhit Dash
e57d9ca390
feat(core): flatten provider config and load native packages (#35563)
Co-authored-by: Dax Raad <d@ironbay.co>
2026-07-06 16:18:56 -04:00
Aiden Cline
460cdc5aec
fix(llm): remove package retry policy (#35003) 2026-07-02 15:51:12 -05:00
Aiden Cline
140224b0fc
fix(core): derive models.dev reasoning variants (#34726) 2026-07-02 00:23:46 -05:00
James Long
8c94e9005f
chore: merge dev into v2 (#34788)
Co-authored-by: Brendan Allan <14191578+Brendonovich@users.noreply.github.com>
Co-authored-by: Kit Langton <kit.langton@gmail.com>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: Affan Ali <93028901+affanali2k3@users.noreply.github.com>
Co-authored-by: affanali2k3 <affanalikhanxx@gmail.com>
Co-authored-by: Frank <frank@anoma.ly>
Co-authored-by: opencode-agent[bot] <219766164+opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: 𝓛𝓲𝓽𝓽𝓵𝓮 𝓕𝓻𝓪𝓷𝓴 <little-frank@opencord.local>
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
Co-authored-by: Jay V <air@live.ca>
Co-authored-by: Dax Raad <d@ironbay.co>
Co-authored-by: Aarav Sareen <96787824+arvsrn@users.noreply.github.com>
Co-authored-by: OpeOginni <107570612+OpeOginni@users.noreply.github.com>
Co-authored-by: Luke Parker <10430890+Hona@users.noreply.github.com>
Co-authored-by: Ben Guthrie <benjee.012@gmail.com>
Co-authored-by: Dax <mail@thdxr.com>
Co-authored-by: Filip <34747899+neriousy@users.noreply.github.com>
Co-authored-by: Max Anderson <max.a.anderson95@gmail.com>
Co-authored-by: Brendan Allan <git@brendonovich.dev>
Co-authored-by: Jack <jack@anoma.ly>
Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>
Co-authored-by: Dustin Deus <deusdustin@gmail.com>
Co-authored-by: starptech <starptech@starptechs-MBP.fritz.box>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
Co-authored-by: usrnk1 <7547651+usrnk1@users.noreply.github.com>
Co-authored-by: Jay <53023+jayair@users.noreply.github.com>
Co-authored-by: runvip <164729189+runvip@users.noreply.github.com>
Co-authored-by: opencode <opencode@sst.dev>
Co-authored-by: Julian Coy <julian@ex-machina.co>
Co-authored-by: Vladimir Glafirov <vglafirov@gitlab.com>
2026-07-01 17:12:00 -04:00
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
130957288e
fix(llm): preserve structured tool errors (#33405) 2026-06-22 13:43:07 -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
54f4974546
feat(http-recorder): prepare public beta release (#31018) 2026-06-06 03:01:26 +00: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
opencode-agent[bot]
8c0edca175 chore: generate 2026-06-05 03:28:04 +00:00
Kit Langton
1af8dafd3e
feat(core): persist v2 session context epochs (#30789) 2026-06-04 23:26:43 -04: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
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
opencode-agent[bot]
4f6eaf859b chore: generate 2026-05-22 16:39:58 +00: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
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
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
opencode-agent[bot]
25b12ed754 chore: generate 2026-05-11 17:06:57 +00:00
Kit Langton
023e1c711e
refactor(llm): colocate per-type factories on their namespaces (#26799) 2026-05-11 13:05:41 -04:00
Kit Langton
52f7ba7d4d
fix(llm): drop removed dispatch option from recorded cache tests (#26900) 2026-05-11 11:48:30 -04:00
Kit Langton
9b369ee815
chore(llm): make cache: 'auto' the default (#26798) 2026-05-10 22:46:01 -04:00
opencode-agent[bot]
02cb7e7b71 chore: generate 2026-05-11 02:11:07 +00:00
Kit Langton
942630eb4a
feat(llm): cache-policy auto-placement (#26786) 2026-05-10 22:09:55 -04:00
Kit Langton
2703eff2e2
refactor(llm): normalize Usage as inclusive total + non-overlapping breakdown (#26735) 2026-05-10 21:52:50 -04:00
opencode-agent[bot]
5801cce1b5 chore: generate 2026-05-11 01:18:39 +00:00