Change: This is S-4 of the agent prompt-caching build (Epic-2050,
RFD docs/notes/rfd-agent-caching-strategy.md §9 / D-8; sibling of
pramaan-functions rfd-context-engine.md §14.3 S-1). The send-twice probe
harness shipped earlier (Spike-2055, PR #191) but ran with no key —
the matrix was PENDING LIVE RUN. This story is the live run itself:
execute the harness against OpenRouter with a real ZDR-pinned dev key, turn every
_pending_ row into observed wire behavior, and feed the verdict into
paid_write_providers. No code change — a measurement story: the
harness is unchanged, only the committed matrix and two config annotations move.
| File | Role |
|---|---|
docs/notes/zdr-caching-probe-matrix.md | The PENDING tables replaced with the live 2026-07-07 matrix: per-model verdict, c1/c2 cached tokens, hit rate, provider stickiness, plus the three §9 assertions resolved and the hypothesis-vs-reality read. |
agents/framer/llm.yaml, agents/mira/llm.yaml | paid_write_providers annotated with the live provenance — anthropic empirically confirmed paid-write, alibaba retained defensively. Value unchanged ([anthropic, alibaba]); the probe validated the existing list. |
docs/notes/zdr_probe.py | Unchanged — the Spike-2055 harness ran verbatim. Listed only to name what was executed. |
export OPENROUTER_API_KEY=<dev key> python docs/notes/zdr_probe.py # ZDR-eligibility ping python docs/notes/zdr_probe.py --cache # send-twice caching matrix (nonce=60477-1783412227)
Every call carried the hard pin {"zdr": true, "data_collection": "deny"} and a
per-model session_id. The nonce is baked fresh into the ≥4,096-tok synthetic
prefix, so call 1 is a cold write (c1_cache≈0) and
call 2 the read (c2_cache>0 on a HIT) — cold-write-then-read
within one run, no reliance on a prior warm cache. Synthetic fixtures only (RFD §9 cl.5).
| Model | Expected | Verdict | c2 cache tok | hit | provider (1→2) | sticky |
|---|---|---|---|---|---|---|
openai/gpt-5.4 | auto | CACHE_HIT | 3840 | 0.927 | Azure | ✓ |
anthropic/claude-sonnet-5 | explicit | CACHE_HIT | 7046 | 0.997 | Amazon Bedrock | ✓ |
google/gemini-3.1-flash-lite | implicit | MISS | 0 | 0.0 | ✓ | |
deepseek/deepseek-v4-pro | unknown | MISS | 0 | 0.0 | SiliconFlow | ✓ |
minimax/minimax-m3 | unknown | CACHE_HIT | 4224 | 0.999 | DeepInfra | ✓ |
qwen/qwen3.6-35b-a3b | unknown | MISS | 0 | 0.0 | AtlasCloud | ✓ |
bytedance-seed/seed-2.0-lite | unknown | MISS | 0 | 0.0 | Seed | ✓ |
z-ai/glm-5.2 | unknown | MISS | 0 | 0.0 | DeepInfra | ✓ |
xiaomi/mimo-v2.5 | unknown | CACHE_HIT | 4224 | 0.994 | DigitalOcean | ✓ |
arcee-ai/trinity-mini | unknown | MISS | 0 | 0.0 | Clarifai | ✓ |
gpt-5.4
is servable + auto-caching live, so it stays the converse-primary candidate.z-ai/glm-5.2 also on DeepInfra MISSed. The lesson: verify each route,
don't assume. Exactly why this is a probe, not a spec table.zdr flag rides every request). RFD §9 assumption 3
confirmed; no ZDR escape via a sticky fallback.cache_discount is absent from the wire — OpenRouter returned no
such field on any route even with usage:{include:true}. Recorded as absent
(the assertion is "recorded", not "non-null"); S-10 must derive realized-$ from
provider_details["cost"] deltas, per RFD §10.paid_write_providersRule (RFD §6.1): paid-write iff the provider serves an explicit-breakpoint cache.
Only anthropic (sonnet-5/Bedrock) qualified live → CONFIRMED.
alibaba/qwen served no cache on its AtlasCloud route so no write was billed, but
Qwen's upstream cache is documented explicit, so it is kept defensively — cheap
to keep, unsafe to drop. The auto-cache HITs (openai/minimax/xiaomi) are free-write and
correctly excluded. The live run validates the existing
[anthropic, alibaba] in both llm.yamls; no value change, only annotated
provenance. S-9's ambient guard test enforces that ambient seats never emit markers on this set.
| AC | Proof |
|---|---|
| matrix committed | docs/notes/zdr-caching-probe-matrix.md — every _pending_ row replaced with the live 2026-07-07 send-twice result. |
cache_read_tokens > 0 harness-logged | 4 rows with raw call-2 cached_tokens: gpt-5.4 (3840), sonnet-5 (7046), minimax-m3 (4224), mimo-v2.5 (4224). The other 6 honestly read 0. |
| provider ∈ ZDR set harness-logged | All 10 served providers returned under the zdr pin; companion ping shows the filter fails closed on non-ZDR ids. |
cache_discount recorded | Recorded as absent across all rows — the wire returned no discount field; realized-$ deferred to S-10 via billed cost. |
Measurement story, no runtime surface: the harness is unchanged, no agent code
moved, no CodeZip rebuild or AgentCore redeploy. The one design consumer
(paid_write_providers) was validated, not changed. Both RFDs' wiring
(OpenRouterModelSettings + CachePoint()) is unaffected — the probe
informs which seats profit, never whether the strategy is built (issue AC-3).