#Issue: cacheRetention in 2026.2.17

1 messages · Page 1 of 1 (latest)

tulip ferry
#

Issue: cacheRetention config validation fails with "invalid config" error.

What I tried:

  1. agents.defaults.models['anthropic/claude-sonnet-4-20250514'].cacheRetention = 'auto'
  2. models.providers.anthropic.cacheRetention = 'auto'
  3. models.defaults.cacheRetention = 'auto'

The code in anthropic.js clearly supports it (resolveCacheRetention function), but config validation rejects all syntax attempts.

Questions:

  1. What's the correct config path for cacheRetention on Anthropic models?
  2. Is this feature available in 2026.2.17 or newer version only?
  3. Any working config examples?

Environment workaround with PI_CACHE_RETENTION=long also attempted.

Thanks! 🦞

still trailBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

severe laurelBOT
#

cacheRetention has to live under the model entry’s params object (the model entry itself is strict and only allows alias, params, streaming — so ...models[...].cacheRetention = ... will fail validation).

Correct config path (Anthropic)

{
agents: {
defaults: {
models: {
"anthropic/claude-sonnet-4-20250514": {
params: {
cacheRetention: "long", // "none" | "short" | "long"
},
},
},
},
},