Skip to content

feat: interactive model picker for gateway (Discord/Telegram) - #3718

Closed
Chukwuebuka-2003 wants to merge 1 commit into
NousResearch:mainfrom
Chukwuebuka-2003:feat/interactive-model-picker
Closed

feat: interactive model picker for gateway (Discord/Telegram)#3718
Chukwuebuka-2003 wants to merge 1 commit into
NousResearch:mainfrom
Chukwuebuka-2003:feat/interactive-model-picker

Conversation

@Chukwuebuka-2003

@Chukwuebuka-2003 Chukwuebuka-2003 commented Mar 29, 2026

Copy link
Copy Markdown

What does this PR do?

Adds an interactive model picker for the gateway that allows users to select a provider first, then a model from that provider. This addresses the issue where users with multiple providers need to know the exact provider:model-name string to switch models.

Related Issue

Fixes #3710

Type of Change

  • ✨ New feature (non-breaking change that adds functionality)

Changes Made

  • hermes_cli/model_picker.py — New shared picker logic with provider/model lists, favorites support via ~/.hermes/models.yaml, and formatting functions for all platforms
  • hermes_cli/commands.py — Added /models command to the registry
  • gateway/run.py — Added _handle_models_command() handler with conversation flow (provider → model → confirm) and state management
  • gateway/platforms/discord.py — Added /models slash command and ModelPickerView class with button-based UI

How to Test

  1. Run the gateway with Discord or Telegram enabled
  2. Send /models to open the interactive picker
  3. Select a provider (e.g., "2" for Anthropic)
  4. Select a model from the list
  5. Verify the model switches and confirmation shows
# Example conversation flow:
# User: /models
# Bot: Select provider:
#      1. OpenRouter (current)
#      2. Anthropic
#      ...
# User: 2
# Bot: Models for Anthropic:
#      1. claude-opus-4-6 ★ (favourite)
#      2. claude-sonnet-4-6
#      ...
# User: 1
# Bot: ✓ Switched to: claude-opus-4-6 via Anthropic
#      Previous: gpt-5.4 via openai-codex

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits
  • I've run pytest tests/ -q and all tests pass (671 passed in hermes_cli/)
  • I've tested on my platform: macOS

Documentation & Housekeeping

  • N/A — No documentation changes needed (existing /model docs apply)

- Add /models command with provider -> model selection flow
- Add ModelPickerView for Discord button-based UI
- Add favorites support via ~/.hermes/models.yaml
- Reuse existing model_switch.py for actual switching
- 5-minute timeout for picker sessions

Closes NousResearch#3710
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the contribution @Chukwuebuka-2003! The core feature this PR implements — an interactive model picker for Discord and Telegram — was independently shipped to main in commit 5a2cf280a on 2026-04-06 (PR #5742), about a week after this PR was opened.

What's already on main:

  • DiscordAdapter.send_model_picker() + ModelPickerView (embed + Select-menu two-step drill-down) — gateway/platforms/discord.py:2942
  • Telegram inline-keyboard drill-down with provider → model navigation — gateway/platforms/telegram.py
  • Capability-detection dispatch in GatewayRunner._handle_model_command()gateway/run.py:5587
  • Full switch logic: session override, agent cache evict, model note injection

The implementation on main integrates the picker into the existing /model command (bare /model with no args triggers the interactive picker) rather than adding a new /models command, which keeps the command surface clean.

Closing as implemented. Thanks again for the work here — the approach was sound and the timing just didn't line up. This is an automated hermes-sweeper review.

@teknium1 teknium1 closed this Apr 27, 2026
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/gateway Gateway runner, session dispatch, delivery platform/discord Discord bot adapter labels Apr 27, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Likely duplicate of #5742 — same interactive model picker feature, #5742 was merged.

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 platform/discord Discord bot adapter type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: interactive model picker for gateway (Discord/Telegram) — provider → model selection

3 participants