feat(web): provider-grouped ModelPicker for the LiteLLM matrix#2
Merged
Conversation
Static MODEL_CATALOG per provider in web/src/lib/models.ts (4-6 models each: anthropic/openai/gemini/mistral/deepseek/groq). New <ModelPicker> renders a grouped <select> with a 'Custom...' escape hatch for models not yet in the catalog. Wired into: - Playground (single + compare modes) via ModelPicker - /judges create form via ProviderModelPicker (provider+model split) api: widen luna_judges _VALID_PROVIDERS to include the four new ones. Discoverability fix for the LiteLLM PR: configured a Gemini key but 'how do I pick a Gemini model' had no answer. The picker shows them grouped by provider; users still type custom IDs through the escape hatch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Follow-up to #1. The previous PR widened the credential matrix to six providers but didn't surface them in any UI; users had to know the right model string and provider prefix to type. This PR adds a curated picker.
What ships
web/src/lib/models.ts— static catalog: 4-6 models per provider (anthropic, openai, gemini, mistral, deepseek, groq), each withvalue(the<provider>/<model>string the gateway expects),label, and a one-line tier hint.<ModelPicker>— provider-grouped<select>with an "Other → Custom…" escape hatch that flips the input to free-text so the user can paste any model ID. Doesn't lock anyone out of new releases between catalog updates.<ProviderModelPicker>— same UI, but for surfaces like Luna judges that store{provider, model}as separate columns. Splits the catalog value on dispatch.Wired into:
PRESET_MODELSarray/judgescreate form — replaces the freeform "Model" inputAPI: Luna
_VALID_PROVIDERSwidens to the six-provider matrix + stub. The credential router was already widened in #1.Why a static catalog
Considered LiteLLM's runtime model registry (~500 entries, auto-updates) and recent-model autocomplete from ClickHouse traces. Both are heavier and most of the value is just "show me what Gemini can do." Static covers 95% of the discoverability need; LiteLLM's catalog endpoint can layer on later if needed. The Custom… escape hatch means the catalog is never a blocker.
Test plan
docker compose build api web && up -d. Web 200, api healthz ok./playground, confirm model dropdown groups: Anthropic / OpenAI / Gemini / Mistral / DeepSeek / Groq / Other./judges→ New judge → confirm provider dropdown shows all six + Custom; typestub/echoto test the deterministic path.gemini/gemini-2.5-pro.🤖 Generated with Claude Code