Skip to content

fix(discord): paginate model picker beyond 25 providers/models#41029

Closed
dragocz1995 wants to merge 1 commit into
NousResearch:mainfrom
dragocz1995:upstream-pr/discord-picker-pagination
Closed

fix(discord): paginate model picker beyond 25 providers/models#41029
dragocz1995 wants to merge 1 commit into
NousResearch:mainfrom
dragocz1995:upstream-pr/discord-picker-pagination

Conversation

@dragocz1995

Copy link
Copy Markdown

Problem

Discord select menus are capped at 25 options. ModelPickerView truncated both
the provider dropdown (options[:25]) and the per-provider model dropdown
(models[:25]), silently hiding everything past the 25th entry. The gateway
builds the picker with list_picker_providers(max_models=50), so up to half the
models per provider were unreachable from the dropdown — and any deployment with
more than 25 providers couldn't reach the rest at all.

Change

  • Split both the provider and model dropdowns into pages of 25 with ◀ Prev /
    Next ▶
    buttons.
  • Navigation buttons appear only when there is more than one page, and are
    disabled at the first/last page.
  • The select placeholder shows a (page X/Y) indicator when paginated.
  • Single-page lists render exactly as before (no extra buttons).
  • Model pagination resets when switching providers or going Back.

Stays within Discord's view limits (one select row + one button row). The
existing "N more available — type /model <name> directly" hint now only
fires for models beyond the max_models cap rather than the 25-option UI limit.

Testing

Constructed ModelPickerView with 60 providers × 50 models and verified each
page renders ≤25 options, Prev/Next enable/disable correctly at the bounds, and
single-item lists show no navigation buttons.

Discord select menus are capped at 25 options. ModelPickerView truncated
both the provider list (`options[:25]`) and per-provider model list
(`models[:25]`), silently hiding everything past the 25th entry — with
`list_picker_providers(max_models=50)` up to half the models per provider
were unreachable from the dropdown.

Split both dropdowns into pages of 25 with ◀ Prev / Next ▶ buttons
(shown only when more than one page exists, disabled at the bounds) and a
page indicator in the placeholder. Single-page lists are unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have platform/discord Discord bot adapter comp/plugins Plugin system and bundled plugins labels Jun 7, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Fixed on main via PR #48611 — the interactive model pickers no longer cap at 50 models; large provider catalogs are fully searchable.

This was one of several PRs targeting the same picker cap. We merged @islam666's #48297 as the implementation (cleanest scope — it correctly keeps the Telegram/Discord inline-keyboard cap, which genuinely needs a bound) plus a follow-up tightening max_models=0 semantics and a regression test. Closing this as a duplicate — thanks for the contribution and for flagging the issue.

#48611

@teknium1 teknium1 closed this Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have platform/discord Discord bot adapter type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants