Skip to content

Per-role model config: separate model for orchestrator vs. worker sessions #2116

@amitgaur-zengineer

Description

@amitgaur-zengineer

Problem

Model is configured per-project via a single project.agentConfig.model, which the claude-code plugin applies to every session in the project (ao-plugin-agent-claude-code index.js, the --model branch). There's no way to use a different model for orchestrator vs. worker sessions, and ao spawn has no --model flag.

This blocks a common cost pattern: run the orchestrator on a top-tier model (it makes the judgment calls — review verdicts, merge/triage decisions) while running worker/implementation sessions on a cheaper model (bounded coding tasks). Today the only lever is project-wide, so lowering the worker cost also downgrades the orchestrator — the opposite of what you want.

Proposed

Allow a per-role model override that the resolver layers over project.agentConfig.model. Either/both:

  • Role-scoped config blocks:

    defaults:
      orchestrator:
        agentConfig:
          model: claude-opus-4-x
      worker:
        agentConfig:
          model: claude-sonnet-4-x

    (and the same under projects.<id>.orchestrator|worker.agentConfig)

  • A --model <name> flag on ao spawn for per-session override.

Resolution precedence: spawn --model > role agentConfig.model > project.agentConfig.model > agent default.

Why it matters

Cost. Worker sessions are the high-volume, repetitive side; the orchestrator is low-volume but judgment-heavy. Splitting the model by role is the natural cost/quality tradeoff and isn't currently expressible.

Environment

  • AO @aoagents/ao 0.9.5 (latest)
  • Agent: claude-code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions