fix(kanban): add --model to create + fix dispatcher -m placement (#67459) - #67518
fix(kanban): add --model to create + fix dispatcher -m placement (#67459)#67518Enough1122 wants to merge 2 commits into
Conversation
teknium1
left a comment
There was a problem hiding this comment.
Thanks for wiring the missing CLI write path through to task persistence. That part addresses a real current-main gap.
Problems
- The dispatcher change is based on stale parser behavior.
hermes_cli/_parser.py:280-295already usesargparse.SUPPRESSfor the chat subparser's inherited-m, andtests/hermes_cli/test_kanban_worker_spawn_toolsets.py:128-170verifies the existing pre-chatworker argv preserves the override. The new comment inhermes_cli/kanban_db.pytherefore describes behavior main no longer has. - Please add coverage for the new CLI-to-DB path. The existing worker-spawn test manually assigns
Task.model_overrideand does not exercisekanban create --model,_cmd_create, or the INSERT persistence.
Suggested changes
- Keep the CLI/DB write-surface change, but remove the redundant dispatcher relocation or update its rationale.
- Add an isolated-HERMES_HOME test that creates a task with
--modeland asserts the stored task has that override.
Automated hermes-sweeper review.
| @@ -1368,6 +1373,7 @@ def _cmd_create(args: argparse.Namespace) -> int: | |||
| max_runtime_seconds=max_runtime, | |||
| skills=getattr(args, "skills", None) or None, | |||
| max_retries=max_retries, | |||
| model_override=getattr(args, "model", None), | |||
There was a problem hiding this comment.
Please add an isolated-HERMES_HOME regression test for this new CLI-to-DB path: parse/create with --model, then reload the task and assert model_override. The existing spawn test assigns the field directly, so it does not cover this forwarding call.
Related to #67459: this is the fix PR for the missing Kanban model-override write path and dispatch argument placement. |
|
cc @teknium1 — addressed both sweeper findings in commit
Final diff vs
Local: new test passes; the existing — written by Hermes Agent on behalf of @Enough1122 |
…sResearch#67459) Two independent bugs made kanban's model_override feature unusable: 1. **No write surface.** `hermes kanban create` had no `--model` option, and `create_task()` had no `model_override` parameter. The column existed in the schema but nothing set it. Fix: add `--model` to the CLI create subparser, pass it through `_cmd_create` → `create_task()`, and include it in the INSERT statement. 2. **Dispatcher `-m` placement discarded by argparse.** `_default_spawn` placed `-m <model>` BEFORE the `chat` subcommand. The `chat` subparser redefines `-m/--model` with a `None` default, which on Python argparse overwrites the top-level value. Fix: move `-m` AFTER the `chat` subcommand in the argv list, so the chat subparser's default is the effective value and user-provided `-m` wins. Now `hermes kanban create --model openrouter/anthropic/claude-sonnet-4 ...` actually works, and the dispatcher passes the override to the worker. Fixes NousResearch#67459.
…ousResearch#67518 sweeper) Reverts the dispatcher -m relocation (main already uses argparse.SUPPRESS for the chat subparser's inherited -m, so the model_override reaches the worker correctly via the pre-chat position). Adds a test that creates a task with --model and asserts the stored task has the override in the DB. Addresses: NousResearch#67518 hermes-sweeper review (teknium1, 2026-07-19).
8089ec7 to
6b983d6
Compare
|
cc @teknium1 — rebased onto current upstream main. The fix is unchanged in content (3 files, +25/-8). Both sweeper findings from 2026-07-19 still addressed:
— written by Hermes Agent on behalf of @Enough1122 |
|
Thanks @Enough1122 — this correctly identified and fixed the missing write surface for tasks.model_override, and your follow-ups addressing the sweeper findings were on point. The gap is now closed on main by #69876 (c1b0f6f), which shipped a superset of this fix: kanban create --model plus a --provider pair (so cross-provider overrides resolve against the right backend), a set-model subcommand, the dashboard model dropdown + PATCH/bulk API, and agent-tool params. You were the first submitter on the core write-surface gap — credit to you for flagging and fixing it first in #67459/#67518. Closing since the change is now redundant against main. Sorry we couldn't land your commits directly — the broader feature branch was already in flight when the overlap surfaced. |
Fixes #67459.
Two independent bugs made kanban's
model_overridefeature unusable:1. No write surface
hermes kanban createhad no--modeloption, andcreate_task()had nomodel_overrideparameter. The column existed in the schema but nothing set it.Fix: add
--modelto the CLI create subparser (hermes_cli/kanban.py), pass it through_cmd_create→create_task(), and include it in the INSERT statement (hermes_cli/kanban_db.py).2. Dispatcher
-mplacement discarded by argparse_default_spawnplaced-m <model>BEFORE thechatsubcommand. Thechatsubparser redefines-m/--modelwith aNonedefault, which on Python argparse overwrites the top-level value. So even a manually-setmodel_overridereached the worker asNone.Fix: move
-mAFTER thechatsubcommand in the argv list, so the chat subparser's default is the effective value and user-provided-mwins.Test
Imports confirmed:
from hermes_cli.kanban_db import create_taskandfrom hermes_cli.kanban import build_parserboth work.