Model Router Recommend

Get model recommendations tailored to specific tasks for optimal AI performance.

Get a model recommendation for a specific task type.

Trigger

User runs /model-router:recommend [task_type] or asks "what model should I use for X?"

Arguments

  • task_type (optional): One of critical_code, code_review, reasoning, math_logic, simple_edits, bulk_operations, writing, analysis

If not provided, ask the user what they're trying to do.

Instructions

1. Load Configuration

Read ~/.model-router/config.yaml and ~/.model-router/models.yaml

If config doesn't exist:

No configuration found. Run /model-router:setup first.

2. Determine Task Type

If task_type argument provided, use it.

If not, ask:

What kind of task are you working on?

○ Code review / refactoring
○ Critical production code
○ Reasoning / math / logic
○ Simple edits / formatting
○ Bulk operations / batch processing
○ Writing / documentation
○ Analysis / summarization
○ Something else (describe it)

Map their response to a task_type.

3. Get Recommendations

From models.yaml, get the recommendations for this task type:

  • best: Highest quality option
  • runner_up: Good alternative
  • budget: Cheapest option

4. Filter by Availability

Check which models the user actually has access to:

  • Claude models → Always available (they're using Claude Code)
  • GPT models → Requires chatgpt_plus: true AND codex CLI installed
  • Gemini models → Requires google_ai_pro: true AND gemini CLI installed
  • Ollama models → Requires ollama.enabled: true AND model in ollama.models list

5. Apply Routing Preference

Based on preferences.routing:

preserve_claude: Order by non-Claude first

1. Ollama models (free)
2. ChatGPT models (via Codex)
3. Gemini models (via Gemini CLI)
4. Claude models (last resort)

quality_first: Order by quality tier

1. best model for task
2. runner_up
3. budget option

budget_first: Order by cost

1. Free (Ollama)
2. Cheap (Gemini Flash, Haiku)
3. Moderate (Sonnet, GPT-5.2)
4. Expensive (Opus)

6. Present Recommendation

Task: [task_type_description]

Recommended models (based on your setup):

1. [model_name] [RECOMMENDED]
   Provider: [provider]
   Why: [reason based on task + user preference]
   How: [CLI command or "Use Claude directly"]

2. [model_name]
   Provider: [provider]
   Why: [alternative reason]
   How: [CLI command]

3. [model_name]
   Provider: [provider]
   Why: [budget/fallback reason]
   How: [CLI command]

---
To use: Tell me "use [model_name]" or run the CLI command directly.

Example Output

Task: Code Review

Recommended models (based on your setup):

1. GPT-5.2 via Codex [RECOMMENDED]
   Provider: OpenAI (ChatGPT Plus)
   Why: Preserves Claude usage, HumanEval 91%, included in your subscription
   How: codex exec -m gpt-5.2 "Review this code: [paste code]"

2. Gemini 3 Pro
   Provider: Google (AI Pro)
   Why: Strong coding benchmark (76% SWE-bench), good alternative
   How: gemini -y -m gemini-3-pro-preview "[prompt]"

3. Claude Sonnet 4.5
   Provider: Anthropic (Claude Pro)
   Why: Best quality (92% HumanEval), uses Claude subscription
   How: I'll handle this directly

---
To use: Tell me "use GPT-5.2" or run the codex command.

If No Models Available

No models available for [task_type].

You may need to:
- Set up CLI tools: /model-router:configure
- Add subscriptions: /model-router:setup
- Install Ollama for free local models