Highlights
- Introduces
opencode-context-cache as an OpenCode plugin for stable context cache identity across providers.
- Uses deterministic cache key precedence with SHA256 hashing before sending keys upstream.
- Applies the same hashed key to
promptCacheKey and session headers for sticky routing consistency.
- Renames plugin artifact to
plugins/opencode-context-cache.mjs and unifies debug namespace to OPENCODE_CONTEXT_CACHE_DEBUG.
Practical Result
- In a real usage sample, input cache hit improved from near zero baseline to 97.99% (
164736 / 168112).
Quick Start
mkdir -p .opencode/plugins
cp plugins/opencode-context-cache.mjs .opencode/plugins/opencode-context-cache.mjs
export OPENCODE_CONTEXT_CACHE_DEBUG=1
Documentation
- Setup and usage:
README.md
- License:
LICENSE (MIT)