Problem
Pi sessions can be routed across multiple AI Gateway destinations when traffic splitting is configured. Prompt caches are destination-local, so a conversation needs session-affinity headers to avoid avoidable cache misses.
Cache-retention investigations also need reproducible, sanitized tooling. Current observations do not prove that GPT subagents have short retention: GPT-5.6 Sol rejects explicit in_memory, and observed expiry may be caused by UAG forwarding, backend eviction, or prefix matching.
Expected behavior
- Enable Pi's production-safe session-affinity compatibility behavior.
- Add opt-in diagnostic scripts that send stable prompt-cache prefixes and report cache usage without printing bearer tokens.
- Cover
24h, provider-default, and explicit in_memory request construction.
- Validate phase-separated saved state and fail cleanly on malformed state.
- Preserve the measured 45/50/60-minute evidence without claiming a backend retention guarantee.
- Do not force
PI_CACHE_RETENTION or install a child/subagent short-cache policy.
Problem
Pi sessions can be routed across multiple AI Gateway destinations when traffic splitting is configured. Prompt caches are destination-local, so a conversation needs session-affinity headers to avoid avoidable cache misses.
Cache-retention investigations also need reproducible, sanitized tooling. Current observations do not prove that GPT subagents have short retention: GPT-5.6 Sol rejects explicit
in_memory, and observed expiry may be caused by UAG forwarding, backend eviction, or prefix matching.Expected behavior
24h, provider-default, and explicitin_memoryrequest construction.PI_CACHE_RETENTIONor install a child/subagent short-cache policy.