Skip to content

feat(gateway): add model and provider info to /status command - #11079

Open
brucenewup wants to merge 3 commits into
NousResearch:mainfrom
brucenewup:feat/gateway-status-model-display
Open

feat(gateway): add model and provider info to /status command#11079
brucenewup wants to merge 3 commits into
NousResearch:mainfrom
brucenewup:feat/gateway-status-model-display

Conversation

@brucenewup

@brucenewup brucenewup commented Apr 16, 2026

Copy link
Copy Markdown

What does this PR do?

Adds model name and provider information to the gateway /status command output, with real-time session override support.

Key improvement: When you switch models with /model, /status immediately shows the new model instead of the global config. This brings /status to parity with /new and /reset commands.

Related Issue

N/A - Small UX enhancement to help gateway users quickly verify their active model configuration.

Changes Made

  • Read model config from config.yaml in _handle_status_command()
  • Check session-specific model overrides (same logic as /model command)
  • Display "Model: {name}" and "Provider: {provider}" in status output
  • Graceful error handling with fallback to "unknown" / "auto"

How to Test

  1. Start gateway: hermes gateway start
  2. Send /status → verify shows current model/provider
  3. Switch model: /model minimax/MiniMax-M2.7
  4. Send /status again → verify shows MiniMax-M2.7 (not global config)
  5. Test error handling: rename config.yaml → verify shows "unknown"/"auto" without crash

Checklist

Code

  • Read Contributing Guide
  • Conventional Commits format
  • Searched existing PRs
  • Only related changes
  • Tested on macOS
  • Session override feature verified working

Documentation

  • No README/docs changes needed (output-only change)
  • No new config keys
  • No architecture changes
  • Cross-platform compatible (pathlib, YAML)
  • No tool schema changes

Screenshots

Before:

📊 Hermes Gateway Status

Session ID: 20260417_045547_94fbb370
Created: 2026-04-17 04:55
Last Activity: 2026-04-17 05:09
Tokens: 0
Agent Running: No

Connected Platforms: telegram, weixin

After (global config):

📊 Hermes Gateway Status

Session ID: 20260417_045547_94fbb370
Created: 2026-04-17 04:55
Last Activity: 2026-04-17 05:09
Tokens: 0
Agent Running: No
Model: claude-sonnet-4-6
Provider: anthropic

Connected Platforms: telegram, weixin

After model switch (session override):

📊 Hermes Gateway Status

Session ID: 20260417_045547_94fbb370
Created: 2026-04-17 04:55
Last Activity: 2026-04-17 05:09
Tokens: 0
Agent Running: No
Model: MiniMax-M2.7
Provider: minimaxi.com

Connected Platforms: telegram, weixin

bruce added 3 commits April 16, 2026 22:21
Display configured model name and provider in gateway /status output,
matching the model info already shown in /new and /reset commands.

This helps users quickly verify which model configuration is active
without needing to check config.yaml or run hermes status separately.

Changes:
- Read model config from config.yaml in _handle_status_command()
- Add Model and Provider fields to status output
- Handle both dict and string model config formats
- Graceful fallback to 'unknown'/'auto' on config read errors

Tested on: macOS 14.7.2, Python 3.13.5
- Add session override check to _handle_status_command()
- Now shows the actual model being used after /model switch
- Matches the logic used in /model command
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/gateway Gateway runner, session dispatch, delivery labels Apr 25, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Related to #6750 and #8240 — all add model/provider info to /status output. Consider consolidating.

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for identifying the session-switch status gap. The current gateway status implementation already restores model/provider output, but the exact immediate post-/model case remains incomplete.

Problems

  • Current /status resolves from live/cached agent state, then SessionDB/config (gateway/slash_commands.py:550-610), but /model stores its selected provider in _session_model_overrides and evicts the cached agent (gateway/slash_commands.py:1867-1891). Since update_session_model() writes only sessions.model (hermes_state.py:2363-2375), a cross-provider session switch can show the new model with a stale provider.
  • The handler has moved from gateway/run.py to gateway/slash_commands.py in 619bd782738adfa87544d0fda7a1114defe86e4c, so this needs a targeted port rather than a clean cherry-pick.
  • tests/gateway/test_status_command.py:180-275 lacks a /model → immediate /status cross-provider regression case.

Suggested changes

  • Port the override lookup into GatewaySlashCommandsMixin._handle_status_command, preserving its live-agent-first behavior and localized t("gateway.status.model_provider", ...) rendering at gateway/slash_commands.py:605-610.
  • Add the immediate post-switch regression test, including an evicted cached agent.

Automated hermes-sweeper review.

@teknium1 teknium1 added sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants