Skip to content

Conversation

@dataforxyz
Copy link
Contributor

@dataforxyz dataforxyz commented Jan 7, 2026

Summary

This PR adds comprehensive model and agent selection capabilities to Rover:

Features

  • Model selection via -a flag: Specify agent and model using agent:model syntax

    rover task -a claude:opus "implement feature X"
    rover task -a codex:gpt-5.1-codex-max "fix bug Y"
  • Per-step agent/model overrides via -o flag: Override the tool and model for specific workflow steps

    rover task -a claude:sonnet -o plan:claude:opus -o implement:claude:haiku "task"
  • Enhanced rover init: Interactive model selection with current model lists for each agent

  • Automatic agent installation: When using per-step overrides with different agents, all required agents are automatically installed in the container

Updated Model Lists

Agent Available Models
Claude sonnet (default), opus, haiku
Gemini flash (default), pro, flash-lite
Qwen coder-model (default)
Codex gpt-5.1-codex-max (default), gpt-5.1-codex, gpt-5.1-codex-mini, gpt-5.2, gpt-5.1
Cursor auto (default), sonnet-4.5, opus-4.5, gemini-3-, gpt-5., grok

Bug Fixes

  • Fixed container mount deduplication that was causing "invalid reference format" errors
  • Fixed workflow display in init to show proper names and descriptions
  • Fixed model prompt to only show for the selected agent

Test Plan

  • Test -a claude:haiku - basic model selection
  • Test -a claude:sonnet - different model
  • Test -o plan:claude:opus -o implement:claude:haiku - per-step overrides with same agent
  • Test multi-agent workflow with different agents per step
  • Verify rover init shows correct model options
  • Test with Gemini agent
  • Test with Codex agent (requires compatible account)

🤖 Generated with Claude Code

dataforxyz and others added 9 commits January 6, 2026 22:52
Add the ability to specify AI models via:
- CLI flag: `-a claude:opus` colon syntax
- Settings: Default models per agent in `.rover/settings.json`
- Init flow: Model selection prompts during `rover init`

Model priority (highest to lowest):
1. CLI flag (`-a claude:opus`)
2. User settings (`defaults.models.claude`)
3. Agent built-in default

Changes:
- Update user-settings schema to v1.1 with models field
- Add agentModel field to task-description schema
- Create agent-parser.ts utility for parsing agent:model syntax
- Create agent-models.ts with model definitions per agent
- Update task.ts to parse colon syntax and pass model through
- Update init.ts with model selection prompts
- Update docker.ts and podman.ts to pass --agent-model flag

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add "Inherit (use agent default)" as first option in model selection
- With --yes flag, use inherit behavior (no models saved)
- Fix -a option to not consume task description

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update agent package to actually pass the model flag to underlying CLI tools:
- Add model field to Agent interface and BaseAgent class
- Update createAgent() to accept model parameter
- Update toolArguments() in all agents to include --model flag:
  - Claude: --model
  - Gemini: --model
  - Qwen: --model
  - Codex: --model
  - Cursor: --model
- Update Runner to pass model when creating agent

This completes the model selection feature by ensuring the model flows
all the way from CLI → task → container → agent CLI.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add the ability to specify different AI tools and models for each
workflow step via CLI option and settings:

- Add `-o, --step-agent <step:tool:model>` CLI option for runtime overrides
- Add per-step workflow config in settings (v1.2 schema)
- Add opt-in per-step configuration during `rover init`
- Add "Other" option for custom model names in init prompts
- Update Codex and Cursor with proper model options

Priority order:
1. CLI --step-agent (per-step runtime override)
2. CLI -a (applies to all steps)
3. Settings defaults.workflows config
4. Workflow YAML defaults

Example usage:
  rover task -a claude:sonnet -o implement:claude:opus "feature"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add the ability to specify different AI tools and models for each
workflow step via CLI option and settings:

- Add `-o, --step-agent <step:tool:model>` CLI option for runtime overrides
- Add per-step workflow config in settings (v1.2 schema)
- Add opt-in per-step configuration during `rover init`
- Add "Other" option for custom model names in init prompts
- Update Codex and Cursor with proper model options

Priority order:
1. CLI --step-agent (per-step runtime override)
2. CLI -a (applies to all steps)
3. Settings defaults.workflows config
4. Workflow YAML defaults

Example usage:
  rover task -a claude:sonnet -o implement:claude:opus "feature"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Model selection now only prompts for the selected default agent
  instead of all available agents with multiple models
- Fixed "Other (enter custom model)" option by using plain string
  choices instead of {name, value} objects to avoid enquirer
  returning display name instead of value
- Applied same fix to per-step workflow tool/model selection

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fixed workflow name display (was showing undefined for workflow.id)
- Now shows formatted workflow name (e.g., "SWE", "Tech Writer")
- Added workflow description from YAML (e.g., "Complete software
  engineering workflow with adaptive complexity handling")
- Changed tree connector from ├── to └── for the last instruction line

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When workflows use different agents for different steps (via per-step
agent configuration), the container now installs ALL required agents
instead of just the default agent. This enables workflows like:
- Step 1: Use Claude for context analysis
- Step 2: Use Gemini for implementation

Changes:
- SetupBuilder now accepts array of agents instead of single agent
- entrypoint.sh loops through all agents to install each one
- Docker/Podman sandboxes collect unique agents from task.agent and
  task.stepAgents, mount credentials for all, and pass env vars for all
- MCP servers are configured for all agents

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add a useCases field to workflow schema and display it during init
to help users understand what each workflow is for.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Angelmmiguel
Copy link
Contributor

Hey @dataforxyz,

Thank you for the PR and all the work here. This is a feature we discussed in the past, so it makes sense to introduce it in Rover 😄. Overall, the end goal is to allow you to select the specific model you want to use, offering multiple ways to define it:

  • Project configuration (team default value)
  • User settings (user default value)
  • Per task (change agent + model for a task or override a step)

And different granularity levels:

  • Same agent + model for the entire workflow
  • Specific agent + model per step

All these combinations cover different use cases and they will provide a lot of flexibility to users.

Currently, we are working on moving all task metadata and project workspaces to a central location. As part of these changes, we are updating some configuration files like user settings and task descriptions.

I foresee some conflicts between this PR and that workstream. To miminize them and simplify the merge process, I would ask you to split this PR into smaller ones that we can merge individually. The list of items in the summary seems to me a reasonable way to split this PR:

PR: Support agent:model format

CLI syntax: -a claude:opus colon syntax to specify agent and model together

Easy to merge with the current workstream 👍

PR: Configure user model preferences

Settings: Default models per agent stored in .rover/settings.json

This file will contain the project configuration (current rover.json) and will be optional in v2. For user-specific configuration, Rover will use the .rover/settings.local.json path.

[SKIP] PR: Configure models during project initialization

Init flow: Model selection prompts during rover init with "Inherit" option

The init command will be optional from v2.0. I would try to keep this command as simple as possible, so I prefer not to add all these questions here. In the future, Rover will come with multiple workflows and configuring all of them since the beginning might be tedious.

However, I like the idea of the syntax you introduce to override steps in the project configuration. We can document this process and work on a different CLI experience to set it.

PR: Override workflow steps configuration without having to create a separate workflow

Per-step workflow config: Configure different tools/models for each workflow step
Runtime override: -o step:tool:model flag to override per-step config at task time

You will be able to add custom workflows in the next version. Based on this, you can export the default swe workflow, edit it and save your own version.

What's the use case you have in mind for this feature? Would it be enough to create a more specific workflow for you?


Thank you! We are happy to help you going through all these changes. Feel free to reach you to us here or in our Discord server. I created a specific forum thread there for these changes in case you want a more direct communication :)

dataforxyz and others added 3 commits January 7, 2026 13:13
Mount arrays come as pairs ['-v', 'path1', '-v', 'path2'].
Using Set on the array incorrectly removed duplicate '-v' flags,
causing "invalid reference format" container errors.

Now deduplicates by mount path while preserving all -v flags.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Updated to current available models:
- Codex: gpt-5.1-codex-max (default), gpt-5.1-codex, gpt-5.1-codex-mini, gpt-5.2, gpt-5.1
- Gemini: flash (default), pro, flash-lite

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Cursor: auto (default), sonnet-4.5, opus-4.5, gemini-3-*, gpt-5.*, grok
- Qwen: coder-model (only relevant option)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@dataforxyz
Copy link
Contributor Author

separated to #388 #387 #386.

@dataforxyz dataforxyz closed this Jan 7, 2026
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