Files
OmniRoute/tests/unit
oyi77 44d9abac96 fix: add tool_use/tool_result adjacency guard for Claude API
Claude requires tool_result in the IMMEDIATELY next message after tool_use.
Existing fixToolPairs() checks global ID presence but not adjacency —
keeping tool_use blocks whose tool_result exists later in the array but
not in the next message, causing 400 errors.

Add fixToolAdjacency() that runs after fixToolPairs() to remove tool_use
blocks where the next message has no matching tool_result.

Pipeline: fixToolPairs → fixToolAdjacency → stripTrailingAssistantOrphanToolUse

Closes #2382

Co-Authored-By: OpenClaude (mimo-v2.5-pro) <openclaude@gitlawb.com>
2026-05-18 19:18:49 -03:00
..
2026-04-19 19:50:30 -03:00
2026-05-10 00:55:06 -03:00
2026-05-10 00:55:06 -03:00
2026-04-30 01:27:03 -03:00
2026-05-10 00:55:06 -03:00
2026-05-10 00:55:06 -03:00
2026-05-10 00:55:06 -03:00
2026-05-10 00:55:06 -03:00
2026-05-10 00:55:06 -03:00
2026-05-10 00:55:06 -03:00
2026-04-30 01:27:03 -03:00
2026-04-30 01:27:03 -03:00
2026-05-10 00:55:06 -03:00
2026-04-30 14:08:50 -03:00
2026-05-10 00:55:06 -03:00
2026-04-30 01:27:03 -03:00
2026-04-30 01:27:03 -03:00
2026-04-30 01:27:03 -03:00
2026-04-28 10:03:39 -03:00
2026-04-28 20:46:25 -03:00
2026-05-10 00:55:06 -03:00
2026-04-28 20:46:25 -03:00
2026-04-30 14:08:50 -03:00
2026-05-10 00:55:06 -03:00
2026-04-30 01:27:03 -03:00