Repository navigation
v1.2.0
OpenCode Cache Engine v1.2.0
Phase 3 begins — offline volatility-capture groundwork (P3-T1). This is a tooling/documentation release: no runtime request behavior changes — no provider-policy change, no prompt mutation, and stabilizeDate remains experimental and default off.
Changes
- Capture-harness knobs (offline test infrastructure only):
OC_CAPTURE_TURNS=<n>(equivalent turns, ≥ 2) andOC_CAPTURE_CONTINUE=1(one session-continue turn → a subsequent request), with fail-closed validation and hermetic coverage. - test/fixtures/volatility-shapes.mjs — observed request shapes (request kinds, tool order, pair semantics) for P3-T2…P3-T5.
- docs/phase3-p3t1-capture-groundwork.md — procedure, findings (Q1–Q6), and go/no-go.
Documentation
- RF-OC-040 — request/pair shape: an aux (no-tools) request then a main (12-tool) request per run; the system prompt rides inside messages[0]; equivalent turns byte-identical, session-continue differs only in messages.
- RF-OC-041 — tool order: 11 ASCII-sorted core tools with execute appended after the sort (stable across runs).
Compatibility
- Exports/runtime unchanged: ./server (V1), ./v2 (V2 preview), ./tui.
- Install-by-name verified paths unchanged from 1.1.x (OpenCode 1.18.35 V1 / 2.0.26 V2).
Notes
- No provider/network behavior change; no paid calls.
stabilizeDatestays experimental / default off (P2-T5).
Full Changelog: v1.1.2...v1.2.0
Thank you to everyone for using the plugin and helping make this project successful!
Provider-aware prompt-cache optimization and observability for OpenCode.
opencode-cache-engine is an OpenCode npm plugin that exposes three targets required by OpenCode's installed plugin model:
./server— the V1 CacheEngine runtime, hooks, provider policies, and telemetry (verified on OpenCode 1.x)../tui— plugin-manager registration and enable/disable integration; it
has no CacheEngine-specific UI../v2— the OpenCode V2 adapter (preview): implemented and offline-tested; isolated shim-based loading,setup, and hook registration/dispatch are verified in an isolated OpenCode 2.0.26 runtime, but managed-config discovery/registration remain unverified.
CacheEngine is an OpenCode plugin designed for long-running agent sessions where prompt-cache efficiency affects both latency and cost. It keeps the harness conservative for providers whose cache behavior is already automatic, while applying provider-specific optimizations where the provider exposes useful cache controls or where prompt structure can be safely improved.
The plugin currently has eleven cache-policy families: DeepSeek, GPT-5.6+, GLM-5.3+, MiMo V2.6+, Kimi, Claude, Gemini, Qwen, Grok, Muse, MiniMax
Initial models were personally chosen for their performance in max programming task completed per dollar. More models can be added based on newer releases or updates.
Future releases will be based on newer versions of models from the above providers, as well as any model that performs optimally over the Pareto distribution on OpenRouter as well as on personal discretion. Since cache stability policy doesn't change much for the providers, there's no need for a code rebase.
Installation
V1 (stable):
opencode plugin opencode-cache-engine # TUI/CLI installer
or set config:
"plugin": ["opencode-cache-engine"]
V2 (preview):
opencode plugin add opencode-cache-engine # TUI/CLI installer
or set config:
"plugins": ["opencode-cache-engine"]
Both install the package by name, and each runtime selects the interface it supports from the package's ./server export (V1 → server, V2 → setup). Do not pass opencode-cache-engine/v2 as the package specifier; use the bare name.
Best complemented with agents for the particular models configured at AlexJoaquimPereira/opencode-agent-config