fix(config): allow model_overrides.<agent-id> in config-set (#3227) (#3253)

* test: reproduce config-set rejecting model_overrides.<agent-id> (#3227)

* fix(config): allow model_overrides.<agent-id> in config-set (#3227)

* changeset: pr=3253 for #3227
This commit is contained in:
Tom Boucher
2026-05-08 08:40:53 -04:00
committed by GitHub
parent 6299b9181f
commit f5fe5bc063
4 changed files with 134 additions and 0 deletions

View File

@@ -107,6 +107,10 @@ const DYNAMIC_KEY_PATTERNS = [
{ topLevel: 'dynamic_routing',
test: (k) => /^dynamic_routing\.(enabled|escalate_on_failure|max_escalations|tier_models\.(light|standard|heavy))$/.test(k),
description: 'dynamic_routing.<enabled|escalate_on_failure|max_escalations|tier_models.<light|standard|heavy>>' },
// #3227 — per-agent model overrides: model_overrides.<agent-id>
// Full model IDs (e.g. "openai/o3") and tier aliases (opus/sonnet/haiku/inherit)
// are both accepted. Value validation is handled by the resolver at read time.
{ topLevel: 'model_overrides', test: (k) => /^model_overrides\.[a-zA-Z0-9_-]+$/.test(k), description: 'model_overrides.<agent-id>' },
];
/**