Skip to content

fix: add -m/--model and --provider to root hermes parser - #4801

Closed
iRonin wants to merge 2 commits into
NousResearch:mainfrom
iRonin:fix/root-model-flag
Closed

fix: add -m/--model and --provider to root hermes parser#4801
iRonin wants to merge 2 commits into
NousResearch:mainfrom
iRonin:fix/root-model-flag

Conversation

@iRonin

@iRonin iRonin commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

The root hermes parser supports -c/--continue and -r/--resume as shortcuts to launch chat without typing hermes chat. However -m/--model and --provider were only defined on the hermes chat subparser, so combining them didn't work:

hermes -c "my project" -m anthropic/claude-sonnet-4-6
# error: unrecognized arguments: -m anthropic/claude-sonnet-4-6

This adds -m/--model and --provider to the root parser and stops the root→chat passthrough from overwriting them with None.

Now works:

hermes -c "my project" -m anthropic/claude-sonnet-4-6   # resume by name + model
hermes -c -m gpt-4o                                       # most recent + model
hermes -r <session-id> -m anthropic/claude-opus-4-6       # resume by ID + model
hermes -m anthropic/claude-sonnet-4-6                     # new session with model
hermes -c "my project" --provider anthropic              # resume + provider

@iRonin
iRonin force-pushed the fix/root-model-flag branch 3 times, most recently from e7f5bd6 to 314c6ed Compare April 4, 2026 22:00
iRonin added 2 commits April 11, 2026 16:31
hermes -c "session name" -m anthropic/claude-sonnet-4-6 now works.
Previously -m was only on 'hermes chat', so the shorthand root-level
-c flag couldn't be combined with a model override.

Also stop stomping args.model/provider with None in the root→chat
passthrough — the values from the root parser are now preserved.
@iRonin
iRonin force-pushed the fix/root-model-flag branch from 5e8bada to 517212c Compare April 11, 2026 20:37
iRonin added a commit to iRonin/hermes-agent-nous that referenced this pull request Apr 12, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the contribution, @iRonin! This is an automated hermes-sweeper review.

The fix proposed here is already on main — PR #15704 (commit a9fa73a62, merged 2026-04-25) added -m/--model and --provider to the root hermes parser with the same semantics:

  • hermes_cli/main.py lines 7391–7409: root-level parser.add_argument('-m', '--model', ...) and parser.add_argument('--provider', ...)
  • The kwargs passthrough to cli_main preserves those values and filters out None entries (line ~1188), so they don't overwrite the chat subparser's defaults.

Your PR was on the right track and likely informed the eventual fix. Closing as implemented on main.

@teknium1 teknium1 closed this Apr 27, 2026
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard labels May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants