Skip to content

feat(spawn): add --model flag for per-session model override#2117

Closed
exuan wants to merge 1 commit into
AgentWrapper:mainfrom
exuan:feat/spawn-model-flag
Closed

feat(spawn): add --model flag for per-session model override#2117
exuan wants to merge 1 commit into
AgentWrapper:mainfrom
exuan:feat/spawn-model-flag

Conversation

@exuan

@exuan exuan commented Jun 12, 2026

Copy link
Copy Markdown

What & why

ao spawn had no way to set the model for a single session — the model
was resolved only from project/role agentConfig.model, so every session
in a project shared one model. This adds a --model <name> flag to
ao spawn that overrides the model for that one spawn.

Resolution precedence: --model > role agentConfig.model > project
agentConfig.model. The agent plugins already forward the resolved
config.model to the underlying CLI as --model, so no plugin changes
are needed; this PR only wires the spawn flag through to
resolveAgentSelection.

Changes

  • --model <name> option on ao spawn
  • SessionSpawnConfig.model threaded to resolveAgentSelection({ spawnModelOverride })
  • spawnModelOverride takes precedence over role/project model in resolveAgentSelection

Backward compatibility

When --model is omitted, model resolution is unchanged.

How to test

ao spawn <issue> --agent claude-code --model claude-opus-4-7
ao spawn --help   # lists the new --model flag
  • pnpm build and pnpm typecheck pass for core and cli
  • ao spawn --help shows the --model flag

Issue

Addresses the per-session (ao spawn --model) part of #2116.

@harshitsinghbhandari

Copy link
Copy Markdown
Collaborator

Closing as part of a backlog sweep: Agent Orchestrator was rewritten from the ground up (Go backend + Electron/React frontend), and this PR's changes target files from the pre-rewrite TypeScript codebase that no longer exist in the current tree, so it cannot be rebased onto main. If the underlying change still makes sense for the current app, please open a fresh PR against the new codebase. Thanks for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants