feat(gateway): add /models slash command for model discovery#3503
Open
dlkakbs wants to merge 3 commits intoNousResearch:mainfrom
Open
feat(gateway): add /models slash command for model discovery#3503dlkakbs wants to merge 3 commits intoNousResearch:mainfrom
dlkakbs wants to merge 3 commits intoNousResearch:mainfrom
Conversation
- /models → list models for the active provider - /models <provider> → list models for a named provider (openai, anthropic, nous, etc.) - /models custom:lmstudio → list models from a named custom OpenAI-compatible endpoint - Marks the currently active model with '← active' - Truncates long lists at 50 with remaining count shown - Falls back to static catalog when live /models endpoint is unreachable - Wires into existing provider_model_ids / curated_models_for_provider / fetch_api_models Closes NousResearch#3500
…agile internal import
Contributor
|
+1 — cherry-picked all three commits (c11fa2f + 23ed415 + caf5502) onto my fork and deployed. The new |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds a /models slash command for first-class model discovery from any gateway surface (Telegram, Discord, CLI, etc.).
Usage:
Output behavior:
Implementation:
Related Issue
Closes #3500
Type of Change
Changes Made
What's not in this PR and why
/model follow-up integration (e.g. tappable model names that auto-fill /model anthropic:claude-sonnet-4-5):
This would require platform-specific inline keyboard or button support (Telegram InlineKeyboardMarkup, Discord components). Each platform has a different API for interactive elements. Adding this correctly is a separate feature with significant per-platform scope — and /models is already useful without it since the footer tells the user exactly what to type.
Named custom provider syntax improvements (/models custom:work, space-tolerant matching, etc.):
Basic custom: is supported and tested. Edge cases like fuzzy name matching, listing all configured custom providers, or showing metadata (base URL, auth status) were left out to keep scope contained. These are straightforward follow-ups once the base command is in use and real UX feedback exists.
How to Test
Checklist