9router/open-sse/translator
Simon Shi 8ad95542da fix(kiro): handle 400 on tool-bearing history without client tools
Kiro requires a non-empty currentMessage tools array whenever history
references any tool use, else returns "Improperly formed request" (400).
Clients trip this by omitting tools on follow-ups after client-side
compaction.

- flattenToolInteractions(): no client tools -> collapse tool_use/result
  to text so the "tools required" rule never fires
- reconcileOrphanedToolResults(): client tools -> salvage orphaned
  results as text, keep matched ones, guard co-located tools array
- safeJSONParse(): guard tool-call argument parsing against bad JSON
- merge consecutive user userInputMessageContext; null-guard
  currentMessage for assistant-only input

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-06 12:23:47 +07:00
..
helpers fix: normalize developer role to system for OpenAI-format providers (#1011) 2026-05-11 15:57:28 +07:00
request fix(kiro): handle 400 on tool-bearing history without client tools 2026-06-06 12:23:47 +07:00
response Fix codex 2026-05-26 11:35:39 +07:00
formats.js feat: add CommandCode provider support 2026-05-07 23:01:33 +07:00
index.js feat: add CommandCode provider support 2026-05-07 23:01:33 +07:00