1jehuang / 1jehuang/jcode

Feature Request: Support per-worker model in swarm spawn

Open
#1,222 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Rust
Stars
19.9k
Forks
2.3k
Avg merge
2d 7h
Merged PRs (30d)
30

Description

Problem

Current behavior:

  • /swarm spawn "agent" model=some-model ignores the model= parameter
  • All spawned workers use swarm_model from config.toml
  • This makes it impossible to assign different models to different agents

Expected behavior:

  • /swarm spawn "agent" model=some-model should use some-model for that worker
  • swarm_model should only be used as fallback when model= is not specified

Use Case

We have 6 agents with different model requirements (v6.2 binding table):

Agent Required Model Provider
明镜 (coordinator) agnes-2.5-flash agnes-ai-direct
明德 agnes-2.5-flash agnes-ai-direct
明品 agnes-2.5-flash agnes-ai-direct
明码 cohere/north-mini-code:free openrouter
明真 nvidia/nemotron-3-ultra-550b-a55b:free openrouter
明察 nvidia/nemotron-3-ultra-550b-a55b:free openrouter

Current limitation forces all agents to use agnes-2.5-flash, wasting free models and reducing quality for code/review tasks.

Proposed Solution

Modify resolve_swarm_spawn_selection to:

  1. Check if model= parameter is explicitly provided
  2. If yes, use the provided model
  3. If no, fallback to swarm_model from config

References

  • Issue #1156: "model= parameter being ignored is expected"
  • Commit b76f96561: fix(swarm): make worker model operator-controlled

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate resolve_swarm_spawn_selection and the /swarm spawn entry point, then inspect how config.toml supplies swarm_model. Verify that an explicit model= value is used for that worker while swarm_model remains the fallback when model= is omitted; run the relevant existing swarm tests if present.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
ai, cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.