mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-24 16:12:23 +03:00
Claude Opus 5 rejects the #3890 cache-safe mid-array system splice with HTTP 400 when the assistant turn immediately before the splice point is plain text rather than a server-side tool result. Adding claude/anthropic outright to systemMessageMustBeFirst() would revert the #3890 cache-hit optimization for every Claude request, so instead injectMemory() now only falls back to leading-system-message placement for the specific Claude- family requests where that condition holds, preserving the mid-array splice everywhere it remains safe (non-Claude providers unconditionally, and Claude providers whose preceding turn does end in a server tool result).