Skip to content

feat(bench): model picker for multi-model routers - #56

Open
kesslerio wants to merge 1 commit into
MiaAI-Lab:mainfrom
kesslerio:feat/bench-model-picker
Open

feat(bench): model picker for multi-model routers#56
kesslerio wants to merge 1 commit into
MiaAI-Lab:mainfrom
kesslerio:feat/bench-model-picker

Conversation

@kesslerio

@kesslerio kesslerio commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

TL;DR

When an LLM backend exposes multiple models via /v1/models (e.g. LiteLLM routing to several backends), the benchmark dialog now shows a model picker dropdown instead of silently using the first model.

What Problem This Solves

Multi-model routers like LiteLLM return a list of models from /v1/models, but sparkDash's benchmark dialog only used the first one. If you wanted to benchmark a specific model behind the router, you had no way to pick it — the benchmark ran against whatever happened to be first in the list.

Why This Change Was Made

I run LiteLLM in front of several models and needed to benchmark individual models behind the router. This PR adds model selection to the benchmark dialog so you can target any model the router exposes.

User Impact

  • Benchmark dialog shows a dropdown when /v1/models returns 2+ models
  • Defaults to the first model; user can pick any model from the list
  • Single-model backends see no change — the dropdown only appears for multi-model routers
  • Showcase URL params use the selected model, not just modelId

Risk and Rollout

Low risk — the model picker only renders when models.length > 1. Single-model backends hit the same code path as before. No migration needed; the benchmarkModel and models fields are optional on LlmMetrics and default to null/undefined.

Evidence

  • npm run typecheck — passes clean
  • npm run build — passes (57 modules, 424 KB JS bundle)
  • npm test — 149 server tests pass, 0 fail
  • No harness/session code leaked: git diff upstream/main..feat/bench-model-picker -- src/components/HarnessWizard.tsx is empty
  • grep -r "HarnessWizard\|SessionSource\|occupancyPoller" src/ returns nothing on the bench branch
  • Gitleaks scan clean on commit

Adds a model picker dropdown to the benchmark dialog for multi-model
routers like LiteLLM. When /v1/models returns multiple models, the
benchmark uses the first model by default and the user can pick from
the full list.

- LlmProbe: detect multi-model routers, expose models array and
  benchmarkModel field
- BenchmarkDialog: model picker dropdown with .bench-select styling
- LlmPanel: pass benchmarkModel and models to BenchmarkDialog, use
  benchmarkModel in showcase URL params
- types.ts: add benchmarkModel and models fields to LlmMetrics

Re-submission of closed PR MiaAI-Lab#51, rebased on current upstream/main.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@kesslerio
kesslerio force-pushed the feat/bench-model-picker branch from ea5caa4 to 7113e98 Compare August 19, 2026 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant