Repository navigation
Description
Describe the feature or problem you'd like to solve
Allow sub-agents to use the model specified in their .agent.md frontmatter or task() call's model parameter, by adding an opt-out flag for the cost-multiplier guard that currently silently downgrades sub-agent models to the cheapest available model.
Proposed solution
Add a configuration flag (e.g., allowSubagentModelUpgrade: true in ~/.copilot/config.json or --allow-subagent-model-upgrade CLI flag) that lets users opt out of the cost-multiplier guard that silently downgrades sub-agent models.
Currently, when a session runs on a 0× model (e.g., GPT-4.1), every sub-agent model override — whether via model: frontmatter in .agent.md or the model parameter in task() calls — is silently downgraded to the session default. Process logs confirm:
Downgrading subagent model from "claude-sonnet-4.6" (1x) to session model "gpt-4.1" (0x).
This prevents a common and valuable pattern: tiered multi-agent orchestration — using a free model for routine tasks (reads, searches, navigation) while delegating complex work to premium models (Sonnet for code, Opus for architecture). Users who are aware of the cost implications and willing to spend their premium request budget should be able to opt in.
Example prompts or workflows
-
Tiered delegation (primary use case):
Session on GPT-4.1 (0×). User says "Review the architecture of this service." GPT-4.1 gathers context (free) then delegates to anadvisoragent withmodel: claude-opus-4.6(3×). Today: advisor runs on GPT-4.1. Expected: advisor runs on Opus. -
Custom agent model enforcement:
.agent.mdwithmodel: claude-sonnet-4.6in frontmatter. When invoked as a sub-agent from a free session, the frontmatter model should be honored. Today: silently downgraded. -
Cost-conscious exploration + quality implementation:
User navigates codebase with GPT-4.1 (free), then delegates "Write tests for this component" to a specialist agent withmodel: claude-sonnet-4.6. Today: tests written by GPT-4.1. Expected: tests written by Sonnet. -
Plugin agents with model requirements:
A plugin author distributes agents that require specific models for quality (e.g., a code reviewer that needs Opus). Today: the model requirement is ignored. Expected: honored when the user opts in. -
Budget-aware workflows:
Combined with/usage, users can monitor spend and make informed decisions about when to invoke premium sub-agents vs. stay on the free tier.
Additional context
Evidence
- Confirmed behavior via process logs:
Downgrading subagent model from "claude-sonnet-4.6" (1x) to session model "gpt-4.1" (0x)— tested on v1.0.28 - Workaround exists but loses features: Spawning separate
copilot --agent X --model Y -p "..."processes bypasses the guard (each is a top-level session), but loses session integration: shared context, multi-turn refinement, streaming,/tasks,/difftracking - Sonnet session workaround is partial: Setting session to Sonnet (1×) avoids the guard for ≤1× sub-agents, but costs 1× for every prompt including simple reads
Related issues
- Model routing, per-agent model selection, and global hooks support #1354 — Model routing, per-agent model selection, and global hooks support
- Question: Does model: in agent frontmatter and task() calls control model selection? #2564 — Does
model:in agent frontmatter andtask()calls control model selection? (closed, fix shipped in v1.0.22 but cost guard still applies) - Plugin agents ignore
model:frontmatter #2492 — Plugin agents ignoremodel:frontmatter (closed)
Suggested configuration shapes
// ~/.copilot/config.json
{ "allowSubagentModelUpgrade": true }# CLI flag
copilot --allow-subagent-model-upgrade# Per-agent frontmatter (most granular)
---
model: claude-opus-4.6
force-model: true
---
Activity
faulkdev commentedon Apr 29, 2026
As GitHub moves to token-based pricing, GitHub must add these features to keep users.
trueIoV commentedon May 4, 2026
Need this.
Rogalek commentedon May 19, 2026
Hey, any update on this? Running into the exact same problem with a real use case.
Adding a concrete real-world use case: multi-model skill pipelines.
I maintain a custom skill (
/orchestrate) that delegates different pipeline phases to specialized sub-agents — architect, reviewer, tester, developer — each with a model requirement inSKILL.md:orch-architectclaude-opus-4.7orch-reviewergpt-5.5orch-tester/orch-developergpt-5.3-codexWith session on
claude-sonnet-4.6, I tested all three approaches:model=parameter intask()→ ❌ silently ignored for premium models (opus, gpt-5.5), ✅ works for standard (gpt-5.3-codex)model:in.agent.mdfrontmatter → ❌ also ignored, agent runs on session modelThe result is that skill-defined model routing — a core feature for anyone building multi-agent workflows — simply doesn't work. This effectively makes skills single-model pipelines, which defeats the purpose of having agent specialization.
The
force-model: truefrontmatter suggestion from the original issue seems like the right solution: explicit opt-in per-agent, respects cost awareness, works without changing global config.lrogowski-evertz commentedon May 20, 2026
Need this! ASAP!
pawelw-evertz commentedon May 20, 2026
that's highly desired fix
devdnn commentedon May 26, 2026
Please implement this, I followed the same steps as https://youtu.be/rJSsbHwkYAY?si=4_f0UmT9AaTR5XP1 but the copilot-cli doesn't follow the subagent model specified in the frontmatter.
Even using the costliest model in the orchestrator its not working.