prxy.monster API-key BYOK is live. Start free

ccr-retrieve

Category: context · Cloud + Local · Status: v1 — production

ccr-retrieve completes the Compress-Cache-Retrieve loop. When the model calls prxy_retrieve, this module fetches the original content from blob storage ({ccrPrefix}/{hash}.txt) and returns it as a tool_result.

What it does

Two fulfillment paths:

  1. pre() — Request includes assistant tool_use for prxy_retrieve without matching tool_result. Gateway injects results before the provider call.
  2. Auto-loop — Provider returns prxy_retrieve only (non-streaming). Gateway fulfills internally and calls the provider again (up to maxAutoLoops).
Model: prxy_retrieve({ hash: "abc…" })
Gateway: blob.get("ccr/abc….txt") → tool_result → model continues

Optional query parameter filters JSON arrays by substring.

When to use it

✅ Always pair with ccr-inject + structured-crusher (ccr: true) ✅ Agents that need reversible compression without client-side retrieve logic ✅ Non-streaming API calls (auto-loop)

❌ Without the CCR stack (no blobs to fetch)

Configuration

ccr-retrieve:
  toolName: prxy_retrieve
  ccrPrefix: ccr
  maxAutoLoops: 4
  fulfillPending: true
  autoLoop: true

Metrics emitted

Examples

Standard CCR pipeline:

- module: structured-crusher
  config: { ccr: true }
- ccr-inject
- ccr-retrieve

Disable auto-loop (client handles all tool round-trips):

ccr-retrieve:
  autoLoop: false

Auto-loop runs only on non-streaming requests. Streamed responses with prxy_retrieve require the client to send the assistant message back; ccr-retrieve fulfills in pre() on the follow-up request.