mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-02 05:12:11 +03:00
The CCR (Content-Compression-Retrieve) engine treated an entire message's content as one candidate block with no sub-scanning, so a large first-turn prompt above minChars (default 600) could be replaced ENTIRELY by a bare [CCR retrieve hash=... chars=N] marker. The omniroute_ccr_retrieve MCP tool that could resolve that marker is only ever exposed by OmniRoute's own MCP server -- never injected into a plain /v1/chat/completions tools array -- so for any non-MCP client (OpenCode, Claude Code in OpenAI-compatible mode, generic proxy clients) the original prompt became permanently unreachable once compressed. maybeCcrReplace now always keeps a short leading preamble of the original text alongside the marker, so a caller that cannot resolve the marker still sees the start of the user's intent instead of losing the prompt entirely. The full text remains stored and verbatim-retrievable by hash for MCP- capable callers, unchanged.