9router/open-sse/translator/request
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
..
antigravity-to-openai.js fix: strip enumDescriptions from tool schema in antigravity-to-openai (closes #566) 2026-04-17 12:15:10 +07:00
claude-to-openai.js fix: detect Claude format for /v1/messages + sanitize tool descriptions (#397) 2026-03-27 10:38:37 +07:00
gemini-to-openai.js Fix cloud 2026-01-29 18:07:28 +07:00
openai-responses.js # v0.4.52 (2026-05-17) 2026-05-17 16:37:26 +07:00
openai-to-claude.js fix: granular reasoning_effort handling for Claude models (#791) 2026-04-28 09:49:27 +07:00
openai-to-commandcode.js feat: enhance CommandCode integration with improved message handling 2026-05-07 23:02:07 +07:00
openai-to-cursor.js fix: force Agent mode in Cursor protobuf when User-Agent contains Claude Code (closes #643) (#692) 2026-04-22 10:24:58 +07:00
openai-to-gemini.js fix: Antigravity INVALID_ARGUMENT errors and Copilot agent mode parity 2026-04-26 19:53:08 +08:00
openai-to-kiro.js fix(kiro): handle 400 on tool-bearing history without client tools 2026-06-06 12:23:47 +07:00
openai-to-kiro.old.js ok 2026-01-27 10:49:16 +07:00
openai-to-ollama.js fix: map OpenAI image_url data URLs to Ollama images[] (closes #427) (#432) 2026-03-27 10:48:18 +07:00
openai-to-vertex.js fix(translator): correct thought signatures for AG, Gemini CLI, Vertex; fix missing Vertex response translator 2026-04-05 00:38:36 +07:00