You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace the paginated inline-keyboard model picker in Telegram with a type-to-search picker. Instead of scrolling through pages of model names, the user types part of a model name and gets filtered results.
Motivation
The /model picker currently uses a paginated inline keyboard with max_models per page. This breaks down for providers with large catalogs:
Nvidia has 136 models (confirmed via live API). Even with a live-fetch fix, that's 28 pages of keyboard navigation at 5 per page.
OpenRouter has hundreds. Copilot's catalog is tier-dependent and growing.
The curated list pattern exists because the picker UX can't handle large lists — it's a UX workaround that became policy.
A search-based picker eliminates the need for curation. Show everything, let the user filter.
Proposed Solution
Flow:
/model → "Reply with a model name to search"
User types nemeon
Hermes fuzzy-matches against the full provider catalog (via live fetch_models())
Returns top N matching results as inline keyboard buttons
User taps one → model switch confirmed
Technical approach (Option A — stateful text input):
After /model, the gateway registers a temporary search state per chat. The next text message is captured as the query, fuzzy-matched, and results are returned as inline keyboard. State auto-expires after 60 seconds or on successful selection.
Technical approach (Option B — Telegram inline queries):
Uses Telegram's @botname query... inline query pattern. Type-as-you-search with real-time results. Requires gateway-level support for inline query handling via InlineQueryHandler.
Existing infrastructure:
Fuzzy matching exists in models.py:resolve_model_name() via difflib.get_close_matches
The ProviderProfile.fetch_models() call already returns full catalogs (tested: 136 models from Nvidia)
Feature Description
Replace the paginated inline-keyboard model picker in Telegram with a type-to-search picker. Instead of scrolling through pages of model names, the user types part of a model name and gets filtered results.
Motivation
The
/modelpicker currently uses a paginated inline keyboard withmax_modelsper page. This breaks down for providers with large catalogs:A search-based picker eliminates the need for curation. Show everything, let the user filter.
Proposed Solution
Flow:
/model→ "Reply with a model name to search"nemeonfetch_models())Technical approach (Option A — stateful text input):
After
/model, the gateway registers a temporary search state per chat. The next text message is captured as the query, fuzzy-matched, and results are returned as inline keyboard. State auto-expires after 60 seconds or on successful selection.Technical approach (Option B — Telegram inline queries):
Uses Telegram's
@botname query...inline query pattern. Type-as-you-search with real-time results. Requires gateway-level support for inline query handling viaInlineQueryHandler.Existing infrastructure:
models.py:resolve_model_name()viadifflib.get_close_matchesProviderProfile.fetch_models()call already returns full catalogs (tested: 136 models from Nvidia)Alternatives Considered