anomalyco / anomalyco/opencode
Gemini and Vertex prompt cache drops out due to 4m warming interval and missing cachedContent
Open
@kitlangton is already working on this.
Since Aug 20, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
Gemini and Google Cloud Vertex AI prompt caches experience 100% cache misses during multi-turn sessions when paused for ~3.5 minutes due to the provider's ephemeral in-memory cache TTL and lack of explicit cachedContent lowering in the Gemini protocol.
The default session warming interval was set to 4 minutes, which fires after Google's ~3 to 5 minute ephemeral cache window has already evicted the prefix.
Plugins
None
OpenCode version
v2 (0.0.0-dev)
Steps to reproduce
- Run a multi-turn session with
google-vertex/gemini-3.7-flashorgoogle/gemini-2.5-flashwhere context exceeds 32k tokens. - Pause for ~3.5 minutes between turns.
- Observe that the subsequent turn suffers a 100% prompt cache miss because the default 4-minute warming timer had not yet fired.
Screenshot and/or share link
No response
Operating System
Linux / macOS
Terminal
Alacritty / Ghostty
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.