Skip to content

feat: restore session-scoped /model switching in CLI and gateway#3700

Open
Git-on-my-level wants to merge 7 commits intoNousResearch:mainfrom
Git-on-my-level:fix/model-picker-cli-telegram-upstream
Open

feat: restore session-scoped /model switching in CLI and gateway#3700
Git-on-my-level wants to merge 7 commits intoNousResearch:mainfrom
Git-on-my-level:fix/model-picker-cli-telegram-upstream

Conversation

@Git-on-my-level
Copy link
Copy Markdown
Contributor

@Git-on-my-level Git-on-my-level commented Mar 29, 2026

Summary

  • restore the /model command in the CLI and gateway, and keep model/provider/base_url overrides scoped to the active session
  • preserve the active session model across /new, show it in session info/status output, and keep gateway fallback behavior sane
  • accept explicit provider/model inputs for direct providers like Codex and Z.AI, add GLM 5.1 support, and fix Z.AI's coding API base URL

Test Plan

  • /Users/dazheng/.hermes/hermes-agent/venv/bin/python -m pytest tests/gateway/test_model_command.py tests/gateway/test_session_info.py tests/gateway/test_session_reset_notify.py tests/gateway/test_status_command.py tests/test_cli_prefix_matching.py tests/test_cli_new_session.py tests/hermes_cli/test_model_validation.py tests/hermes_cli/test_model_switch.py tests/test_api_key_providers.py tests/gateway/test_honcho_lifecycle.py

Notes

  • This branch was built in a clean worktree from origin/main and cherry-picks the relevant model-picker improvements from my own fork of hermes
  • This doesn't change the hermes model global config change behavior

- Add /model slash command to switch models per-session
- Persist model/provider/base_url in session state
- Support provider:model syntax (e.g., /model zai:glm-5.1)
- List GLM models with /model zai
- Session model persists across /new and auto-resets

(cherry picked from commit 3adaff0)
@Git-on-my-level
Copy link
Copy Markdown
Contributor Author

Examples
image
image

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.

1 participant