Commit Graph

60 Commits

Author SHA1 Message Date
Dax Raad 5572602ec4 fix 2026-02-11 23:35:35 -05:00
Dax Raad a584c0fb9f Merge branch 'dev' into K-Mistele/dev 2026-02-11 23:30:11 -05:00
Aiden Cline 0fd6f365be fix(core): ensure compaction is more reliable, add reserve token buffer to ensure that input window has enough room to compact (#12924)
Co-authored-by: James Lal <james@littlebearlabs.io>
2026-02-10 19:55:22 -06:00
Aiden Cline f74c0339cc test: fix failing prompt test (#12847) 2026-02-09 11:25:22 -06:00
Aiden Cline 99ea1351ce tweak: add new ContextOverflowError type (#12777) 2026-02-08 23:54:01 -06:00
Aiden Cline 62f38087b8 fix: parse mid stream openai responses style errors to prevent infinite retries for errors that should STOP execution (#12768) 2026-02-08 20:55:41 -06:00
Khang Ha (Kelvin) fde0b39b7c fix: properly encode file URLs with special characters (#12424) 2026-02-06 16:16:56 -06:00
Adam 1721c6efdf fix(core): session errors when attachment file not found 2026-02-04 10:21:03 -06:00
Łukasz Gładysz 6daa962aaa fix: prioritize OPENCODE_CONFIG_DIR for AGENTS.md (#11536) 2026-02-04 01:35:22 +00:00
Aiden Cline aa6b552c39 Revert pr that was mistakenly merged (#11844) 2026-02-02 15:28:02 -06:00
Aiden Cline 5db089070a test: add unit test 2026-02-01 19:26:23 -05:00
neavo f15755684f fix(opencode): scope agent variant to model (#11410) 2026-02-01 14:12:30 -06:00
YeonGyu-Kim 16145af480 fix: prevent duplicate AGENTS.md injection when reading instruction files (#11581)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2026-02-01 13:46:08 -06:00
Aiden Cline da7c874808 tweak: show actual retry error message instead of generic error msg (#11520) 2026-01-31 13:15:42 -06:00
Aiden Cline f834915d3f test: fix flaky test (#11427) 2026-01-31 01:07:22 -06:00
Aiden Cline 9d3f32065b test: add llm.test.ts (#11375) 2026-01-30 17:04:32 -06:00
Aiden Cline 558590712d fix: ensure parallel tool calls dont double load AGENTS.md 2026-01-28 01:38:10 -05:00
Aiden Cline f12f7e7718 tweak: adjust retry check to be more defensive 2026-01-27 11:31:02 -05:00
Aiden Cline 8b5dde5536 tweak: retry logic to catch certain provider problems 2026-01-26 16:12:41 -05:00
GitHub Action 18bfc740c8 chore: generate 2026-01-26 18:50:58 +00:00
Tim 837037cd04 fix: ensure openai 404 errors are retried (#10590) 2026-01-26 13:50:04 -05:00
Aiden Cline 39a73d4894 feat: dynamically resolve AGENTS.md files from subdirectories as agent explores them (#10678) 2026-01-26 10:49:41 -05:00
Aiden Cline c2844697f3 fix: ensure images are properly returned as tool results 2026-01-21 23:54:44 -06:00
Aiden Cline 021e42c0bb core: fix issue when switching models (mainly between providers) where past reasoning/metadata would be sent to server and cause 400 errors since they came from another account/provider 2026-01-20 16:39:00 -06:00
Aiden Cline 0c4ffec857 chore: rename toModelMessage -> toModelMessages 2026-01-20 16:16:23 -06:00
Kyle Mistele e5a14e6110 Merge branch 'dev' into dev 2026-01-19 15:06:07 -08:00
Kyle Mistele b1da5714d7 test: add retry behavior tests for structured output
Add 5 new unit tests that verify the retry mechanism for structured
output validation:
- Multiple validation failures trigger multiple onError calls
- Success after failures correctly calls onSuccess
- Error messages guide model to fix issues and retry
- Simulates retry state tracking matching prompt.ts logic
- Simulates successful retry after initial failures

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 11:28:29 -08:00
Aiden Cline 8c24879246 test: fix 2026-01-16 15:52:51 -06:00
Aiden Cline f5a6a4af7f Revert "fix: ensure that tool attachments arent sent as user messages (#8944)"
This reverts commit 8fd1b92e6e.
2026-01-16 15:50:24 -06:00
Aiden Cline 8fd1b92e6e fix: ensure that tool attachments arent sent as user messages (#8944) 2026-01-16 12:47:43 -06:00
Aiden Cline d510bd52a4 Revert "test: fix test now that image fix went in"
This reverts commit fffa718f5e.
2026-01-16 09:34:00 -06:00
Aiden Cline fffa718f5e test: fix test now that image fix went in 2026-01-16 00:11:30 -06:00
seilk 9b57db30d1 feat: add litellmProxy provider option for explicit LiteLLM compatibility (#8658)
Co-authored-by: Mark Henderson <Mark.Henderson99@hotmail.com>
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
2026-01-15 22:01:15 +00:00
Brandon Smith 8d720f9463 fix(opencode): add input limit for compaction (#8465) 2026-01-15 01:35:16 -06:00
Kyle Mistele 4c7c65a054 merge: resolve conflicts from upstream dev
Merge upstream changes while preserving structured output feature:
- Keep tools deprecation notice from upstream
- Keep bypassAgentCheck parameter from upstream
- Keep variant field on user messages from upstream
- Preserve outputFormat and StructuredOutput tool injection

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 00:01:34 -08:00
Kyle Mistele d2beb78457 feat: structured output 2026-01-12 23:54:53 -08:00
Kyle Mistele 4cb9f8ab34 fix: structured output loop exit and add system prompt
- Fix loop exit condition to check processor.message.finish instead of
  result === "stop" (processor.process() returns "continue" on normal exit)
- Add system prompt instruction when json_schema mode is enabled to ensure
  model calls the StructuredOutput tool
- Add integration tests for structured output functionality
- Fix test Session.messages call to use object parameter format
2026-01-12 20:51:17 -08:00
Kyle Mistele 32ef11da1f feat: add structured output (JSON schema) support
Add outputFormat option to session.prompt() for requesting structured JSON
output. When type is 'json_schema', injects a StructuredOutput tool that
validates model output against the provided schema.

- Add OutputFormat schema types (text, json_schema) to message-v2.ts
- Add structured_output field to AssistantMessage
- Add StructuredOutputError for validation failures
- Implement createStructuredOutputTool helper in prompt.ts
- Integrate structured output into agent loop with retry support
- Regenerate OpenAPI spec with new types
- Add unit tests for schema validation
2026-01-12 20:09:51 -08:00
Aiden Cline d527ceeb2b test: fix 2026-01-12 12:33:39 -06:00
Aiden Cline 1b82511fbd feat: write truncated tool outputs to files (#7239) 2026-01-07 17:25:00 -06:00
GitHub Action c961072d20 chore: generate 2026-01-07 07:43:43 +00:00
Aiden Cline 429240f439 ignore: add truncation funcs (#7178) 2026-01-07 01:43:06 -06:00
Aiden Cline 47ebb2973f test: add message-v2 test 2026-01-02 12:28:40 -06:00
Saatvik Arya 7a3ff5b98f fix(session): check for context overflow mid-turn in finish-step (#6480) 2026-01-01 12:03:18 -06:00
Aiden Cline 9a1dc1ffe4 core: prevent TimeoutOverflowWarning by capping setTimeout delay to max 32-bit signed integer 2025-12-31 16:15:49 -06:00
Christopher Ochsenreither bfb9787361 fix: compact command after revert now properly cleans up revert state (#6235) 2025-12-26 22:57:59 -06:00
Aiden Cline 8b40e38cd7 test: add test for retry 2025-12-23 19:34:40 -06:00
Dax Raad 9eabbe2e76 retry anthropic overloaded errors 2025-11-25 15:47:34 -05:00
Dax Raad 0a2d7af179 core: honor retry-after values exceeding 10 minutes instead of discarding them 2025-11-17 11:33:28 -05:00
Dax Raad 8b19c6c7e4 better retry display 2025-11-17 11:31:10 -05:00