OpenCode Go: session routing bug across backends repeatedly kills prompt cache
zaoldyeck · ghdev · 2026-11-24
- Bug: In a single conversation with a stable x-opencode-session header (same API key, same model, monotonic prefix growth), requests to deepseek-v4.1-flash are routed across at least three upstream backends, each with its own prompt cache, re-billing the full prefix at full input price on every switch.
- Evidence: Response id prefixes cluster into three backend families (bare hex, chatcmpl-, gw-). Cache hits persist within a family across gateway nodes but are lost when crossing families — e.g. at 10:16:20 the whole 29k prefix was re-billed just 47s after a cache hit.
- Impact: Significantly higher inference cost and unpredictable cache-hit behavior.
More from coding & agent
- PowerShell Creator's 'Cut the Rope' Talk: Build Bigger with AI Agents — dfinke · 2026-11-24
- Roma (YC F26) is a shared task list for managing teams of AI agents — Scobleizer · 2026-11-24
- 22-year-old dev lists gitreverse, a prompt reverse-engineering tool, for $70K — filiksyos · 2026-11-24
- Prompt rules aren't guardrails: enforce tool-calling limits in code, not the system prompt — Weird_Impression_264 · 2026-11-24
- Elon Musk amplifies Claire Vo's list of favorite models and agents — elonmusk · 2026-11-24
- Why is every tech exec building the exact same 'AI brain' product? — teodorio · 2026-11-24