Description
When using Gemini models through OpenRouter, prompt cache reads are low and inconsistent in longer sessions.
OpenCode already adds cache breakpoints for Claude models, but not for Gemini models routed through OpenRouter. OpenRouter supports explicit cache_control breakpoints for Gemini and recommends using a stable session_id for routing.
Could OpenCode enable the existing cache-control behavior for OpenRouter Gemini models and send the OpenCode session ID as session_id?
I tested this locally and it improved cache reuse, although partial reads are still expected because of Gemini's caching limitations.
Description
When using Gemini models through OpenRouter, prompt cache reads are low and inconsistent in longer sessions.
OpenCode already adds cache breakpoints for Claude models, but not for Gemini models routed through OpenRouter. OpenRouter supports explicit
cache_controlbreakpoints for Gemini and recommends using a stablesession_idfor routing.Could OpenCode enable the existing cache-control behavior for OpenRouter Gemini models and send the OpenCode session ID as
session_id?I tested this locally and it improved cache reuse, although partial reads are still expected because of Gemini's caching limitations.