Configure Model Scope as a guardrail
masterModel Scope is an opt-in feature (enabled via /agents → Settings → Scope models) that validates subagent models against the enabledModels list configured in pi settings.
Scope Behavior by Source
| Model source | Out-of-scope behavior |
|---|---|
Caller-supplied via Agent({ model: "..." }) | Hard error returned to the orchestrator, listing allowed models |
| Pinned in agent frontmatter | Warning toast + the pinned model runs (frontmatter is authoritative) |
| Parent-inherited (neither set) | Warning toast + parent's model runs |
Implementation Details
- Format: Only exact
provider/modelIdentries are honored (e.g.,anthropic/claude-haiku-4-5-20251001). Glob patterns, bare IDs, or:thinkingsuffixes are silently dropped. - Settings: It respects both global
~/.pi/agent/settings.jsonand project-local<cwd>/.pi/settings.json(project overrides global).