feat: add agents.defaults.params for global default provider params (#58548)

Allow setting provider params (e.g. cacheRetention) once at the
agents.defaults level instead of repeating them per-model. The merge
order is now: defaults.params -> defaults.models[key].params ->
list[agentId].params.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Lee Pender
2026-03-31 21:09:07 -04:00
committed by GitHub
parent b8fea43bf2
commit 8b6b4b18a8
4 changed files with 22 additions and 7 deletions

View File

@@ -20,9 +20,18 @@ For Anthropic pricing details, see:
## Primary knobs
### `cacheRetention` (model and per-agent)
### `cacheRetention` (global default, model, and per-agent)
Set cache retention on model params:
Set cache retention as a global default for all models:
```yaml
agents:
defaults:
params:
cacheRetention: "long" # none | short | long
```
Override per-model:
```yaml
agents:
@@ -45,8 +54,9 @@ agents:
Config merge order:
1. `agents.defaults.models["provider/model"].params`
2. `agents.list[].params` (matching agent id; overrides by key)
1. `agents.defaults.params` (global default — applies to all models)
2. `agents.defaults.models["provider/model"].params` (per-model override)
3. `agents.list[].params` (matching agent id; overrides by key)
### Legacy `cacheControlTtl`