Model Selection

Resolve LLM models per agent spawn via layered first-match-wins hierarchy.

209|27|Updated Mar 10, 2026
One-click install
npx skills add https://github.com/dotnet/maui-labs --skill model-selection-dotnet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Model Selection
Source: https://github.com/dotnet/maui-labs/tree/main/src/Comet/.copilot/skills/model-selection
Command: npx skills add https://github.com/dotnet/maui-labs --skill model-selection-dotnet

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It ensures each spawned agent uses the most appropriate LLM model, balancing quality, cost, and task fit without requiring you to manually specify models every time.

Core Features & Use Cases

  • Layered model resolution: chooses the resolved model via a first-match-wins hierarchy across persistent config, session directives, charters, task-aware automation, and a hardcoded fallback.
  • Persistent preferences: supports both global (defaultModel) and per-agent (agentModelOverrides) saved in .squad/config.json so choices survive across sessions.
  • Spawn-ready acknowledgments: returns an acknowledgment that includes the resolved model alongside the spawned task for traceability.
  • Task-aware auto-selection: maps common task types (e.g., code vs docs vs visual) to specific model defaults when no higher-priority layer is set.

Quick Start

Tell your coordinator to use a specific model for all future work and have it persist by saving the preference to .squad/config.json, for example: "always use claude-opus-4.6".

Frequently Asked Questions about Model Selection

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically route LLM models for different agent tasks?

Automatic LLM model routing assigns models to spawned agents using a first-match-wins hierarchy. It resolves preferences from persistent config, session directives, agent charters, task-aware defaults, and a fallback to balance quality and cost.

How do I persist my preferred LLM model across multiple agent sessions?

You persist preferred LLM models by saving global defaults and per-agent overrides in the .squad/config.json file. This configuration file ensures your specific model selections survive and apply automatically across all future agent sessions.

What is the best way to override an LLM model for a specific agent?

The best way to override an LLM model is setting per-agent preferences in .squad/config.json. This takes priority in the resolution hierarchy over task-aware auto-selection and hardcoded fallbacks to ensure the correct model spawns.

Can I use task-aware model selection without manually configuring every agent?

Yes, task-aware model selection maps common task types like code or documentation to specific model defaults automatically. This mechanism activates when no higher-priority layer like a session directive or charter specifies a preferred model.

Why does my spawned agent use a fallback model instead of my configured LLM?

A spawned agent uses the fallback LLM when no higher-priority preference matches in the first-match-wins hierarchy. If your configured model ID is invalid or absent from the catalog, the resolution falls back to a hardcoded default.

Does agent orchestration validate model IDs before spawning a task?

Yes, agent orchestration validates requested model IDs against a catalog before spawning. This ensures the resolved model exists, returning a spawn acknowledgment that includes the validated model for every task tool call traceability.