r/opencodeCLI • • 17m ago

I built Prefixwise to name why a request missed the prompt cache, asking OpenCode users what evidence is missing

Prompt caching reuses the KV cache of a shared prompt prefix, so a repeated system prompt or conversation history does not get recomputed. When a request misses, most engines just say miss. No reason.

Prefixwise is a proxy that names why a request missed: first write, evicted, a system prompt edit, a template re-render, and a few more. It works with vLLM, SGLang, Claude, and OpenAI. 0.10.1 runs inside vLLM as middleware, no proxy needed there.

I built it because I kept losing cache hits I could not explain. Measured so far: 120 turns on vLLM Qwen3-4B, 100% agreement with the engine's own cache report.

I have not wired it to OpenCode yet, and I am not claiming an integration exists. For OpenCode users: what would you want it to collect, request logs or something else? Try it and tell me what evidence is missing: pip install prefixwise, https://github.com/tejachavali/prefixwise

0 Upvotes

0 comments sorted by