Skip to content

✨ [Feature Request] Add configuration interface to set sub-agent model in parallel execution scenarios #1768

@bevis-wong

Description

@bevis-wong

Overview

When using multiple sub-agents for parallel task execution (e.g., task_create / subagent-driven-development),
there is currently no way to specify which model each sub-agent should use. The main agent can freely choose
its model, but sub-agents default to using the same model as the main agent, with no independent control.

Use Cases

  • Main agent uses a high-precision model (e.g., V4) for planning, decision-making, and code review
  • Sub-agents use a lighter model (e.g., V4-flash) to execute independent implementation tasks in parallel
    (coding, testing, documentation generation, etc.)
  • Cost optimization: low-risk subtasks should use a more cost-effective model
  • Throughput optimization: lighter models respond faster, reducing overall completion time

Suggested API Design

    # Option A: Specify model per task
    task_create(
        prompt="Implement driver/adc module...",
        model="V4-flash",       # ← new optional parameter
        mode="agent"
    )
    
    # Option B: Global default model for all sub-agents
    config = {
        "sub_agent_default_model": "V4-flash",
        "sub_agent_fallback_model": "V4"   # fallback when specified model is unavailable
    }
    
    # Option C: Route by task type
    task_config = {
        "task_type": {
            "implementation": {"model": "V4-flash"},
            "code_review":    {"model": "V4"},
            "test_generation": {"model": "V4-flash"}
        }
    }

Requirements

  1. Add a model parameter to task_create (or equivalent API) — allow each sub-agent to be assigned an
    independent model
  2. Support global default configuration — set the default model for all sub-agents in the config file
  3. Model availability detection — provide a clear error message or automatic fallback when the specified model
    is unavailable
  4. Backward compatibility — omit model and behavior remains unchanged (inherits the main agent's model)

Priority

P2 — Enhancement. Does not affect existing functionality, but provides significant benefits for large-scale
parallel workflows.

Additional Notes

  • This feature is especially valuable for large-scale refactoring, multi-module parallel development, and batch
    test fixing scenarios in DeepSeek-TUI
  • Reference implementation: Claude Code's task_create tool already supports a model parameter, which can serve
    as a design reference

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentationenhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions