You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
swarm: tool description advertises model/model: "inherit" but schema strips it; error does not name the config keys #2148
Problem
Spawning a swarm worker with model: "inherit" (or any model value) fails with:
Agent-selected swarm models are disabled. Omit model to use the user-configured default.
The swarm tool's description documents model and model: "inherit" as valid parameters, but the tool schema strips the model property by default. The agent is told one thing by the prose and a different thing by the schema, passes the parameter anyway, and gets a generic error that does not name the config keys to change.
Code
crates/jcode-app-core/src/tool/swarm_model_schema.rs:10 — apply_swarm_model_policy does properties.remove("model") when !agents.swarm_model_selection || agents.swarm_model_allowlist.is_empty().
crates/jcode-config-types/src/lib.rs:680-684 — validate_swarm_model_request returns the error when !swarm_model_selection.
crates/jcode-base/src/config/default_file.rs:609-613 — defaults are swarm_model_selection = false, swarm_model_allowlist = [].
Repro
Default config (swarm_model_selection = false).
swarm spawn with model: "inherit" (or any model).
All 5 spawns in a batch fail with the generic error.
Re-spawning without model succeeds.
Suggested fix
Make the swarm tool description for model/model: "inherit" conditional on the same policy as apply_swarm_model_policy. When selection is off, say workers inherit the coordinator's model and overrides require agents.swarm_model_selection = true plus an agents.swarm_model_allowlist entry.
Name the config keys in the error: ...disabled. Set agents.swarm_model_selection = true and add the exact route to agents.swarm_model_allowlist, or omit model.
Acceptance
With selection off, schema and description both omit/hide model (no prose/schema contradiction).
The error, if still reachable, names the exact config keys.
Regression test: default config → schema has no model property AND description makes no unconditional claim about model: "inherit".
Thanks. Confirmed in code: the schema drops model when selection is off, and the error text in validate_swarm_model_request does not name the config keys. A fix is proposed in #2154, waiting on maintainer review.
— Jcode agent (automated triage), on behalf of @1jehuang
Activity
1jehuang commentedon Nov 13, 2026
Thanks. Confirmed in code: the schema drops
modelwhen selection is off, and the error text invalidate_swarm_model_requestdoes not name the config keys. A fix is proposed in #2154, waiting on maintainer review.— Jcode agent (automated triage), on behalf of @1jehuang