Model Leaderboard page
The Model Leaderboard page shows which models your whole gateway used and how their share changed. It charts the top models over time, ranks them, breaks usage down by task type, and, when online scoring is set up, shows how sampled production responses scored. Open it at /ui/model-insights. It sits in the left nav in the Observability group as Model Leaderboard, after Usage and before Cost Optimization.
The nav shows it to proxy admins and proxy admin viewers. Org admins, internal users and internal viewers do not see it. The gateway enforces the same rule, because the data covers every team. Any other caller gets "Only proxy admins can view deployment-wide model insights". The page needs no license. The online quality card at the bottom reads eval data, so it only appears when the proxy has the Evals and red teaming license feature.
What this page is for
Usage per key or team tells you who spends. This page tells you what they spend it on: which models dominate, whether a newer model is taking share, and which model handles each kind of work once requests carry a task tag. Everything on it is read only and covers the whole gateway.
Scenario
A platform team rolled out a cheaper model last month. They open the page, pick the last 60 days and the Spend tab, and watch the new model's share climb in the Leaderboard card while the old one's falls. The By task type card shows the new model already leads summarization but not code generation, so that is the next thing they route.
Steps
-
Pick the range. Set From and To above the charts. Both days are included, in UTC, and the range may not exceed 365 days.
-
Pick the metric. On the Top models card choose Requests, Spend or Tokens, and Daily or Weekly. The Leaderboard card ranks the top ten by share with the change between the two halves of the range. From the command line:
curl "http://localhost:4000/model-insights?start_date=2026-09-16&end_date=2026-10-16&metric=spend" \-H "Authorization: Bearer $SPANWAY_API_KEY" -
Fill the By task type card by tagging requests with
x-spanway-tags: task:code_reviewor another type from the task catalogue. From the command line:curl "http://localhost:4000/model-insights/tasks?start_date=2026-09-16&end_date=2026-10-16&metric=spend" \-H "Authorization: Bearer $SPANWAY_API_KEY"
Expected result
The chart shows one stacked bar per day or week for the top ten models, the Leaderboard card lists them with their share and change, and the task card lists one row per task type with its total, share and leading model. The API returns the same numbers, top_models, daily and daily_totals from /model-insights and tasks from /model-insights/tasks, as shown on the model leaderboard page.
Date range
The header reads "Model Leaderboard", with a line under it that names the first and last day of the data on screen.
| Control | Type | What it does |
|---|---|---|
| From | Date field | The first day of the range. Defaults to 364 days before today, so the default range is the last 365 days. |
| To | Date field | The last day of the range. Defaults to today. |
Days are UTC and both dates are included. The line next to the fields says so, or shows the problem with the range. "Pick a start and an end date." shows when a date is missing, "The end date must not be before the start date." when the range is backwards, and "Pick at most 365 days." when it is longer than 365 days. While the range is invalid the page keeps showing the last data it loaded and does not ask the gateway again.
Top models
The Top models card charts the top 10 models of the range as stacked bars, one bar per bucket. Its description names the bucket size and metric, for example "Daily tokens across your gateway". Hovering a bar lists each model's value and the Gateway total for that bucket, which counts every model, not only the top 10.
| Control | Type | What it does |
|---|---|---|
| Requests, Spend, Tokens | Tabs | The metric the models are ranked and charted by. Tokens is the default and counts input plus output tokens. Spend shows in US dollars. A help line under the card title says the same. |
| Daily, Weekly | Tabs | The bucket size. Daily is the default. |
| Linear, Log | Tabs | The chart's vertical scale. Linear is the default. Log makes small models visible next to large ones. |
Changing the metric loads new data. Until it arrives, the two cards fade and keep the previous metric's numbers. Changing the bucket size or scale only redraws the chart.
Leaderboard
The Leaderboard card ranks the top models by their share of the chosen metric, with the change between the first and second half of the period. The first five sit in the left column and the rest in the right.
| Field | Meaning |
|---|---|
| Rank | The position, from 1 |
| Logo | The provider's logo |
| Model | The model group, with "by" and the provider under it |
| Share | The model's percentage of the metric among the top models |
| Change | Percentage points gained or lost between the first and second half of the range. Green with an upward icon for a gain, red with a downward icon for a loss, and 0.0 for a change under 0.05. It reads 0.0 for every model when either half has no usage. |
By task type
The By task type card shows the share of the chosen metric per task, from requests tagged task:<type>, and the model that leads each task.
| Column | Meaning |
|---|---|
| Task | The task's display name |
| Category | The task's category |
| Total | The metric summed over the range |
| Share | The task's percentage of the metric |
| Leading model | The model with the most usage on that task, followed by "by" and the provider |
A request declares its task with a tag such as task:code_review, sent in the x-spanway-tags header. Requests with no task tag or an unknown task type roll up as one Uncategorized row. Each task's leading model adds up every deployment of a model group. The card follows the metric and date range of the page, and it is hidden while the range is invalid.
Live deployment speed
This card shows how fast each deployment answered over the last 30 minutes and how often its provider refused with HTTP 429, so you can spot a slow or rate limited deployment before users complain and move traffic or raise its limits. It has one row per deployment that served traffic with Deployment (model group, provider and deployment id), Latency, Time to first token, Total time, Tokens per second, Requests and Rate limited (429). Each time shows the typical value and the slow end (p50 / p90), and "over 21 s" or "over 144 s" means slower than the largest bucket. The card refreshes every minute and ignores the page's date range and metric. It reads GET /health/deployments, see alerts inbox and deployment speed.
Cost per session
This card explains that session cost is not estimated from request counts. It has no controls. It says that adding a stable session_id to requests prepares for session level comparisons in a future release.
Online quality, last 7 days
When online scoring rules have scored anything in the last 7 days, a card titled Online quality, last 7 days lists the scores of sampled production responses. It has one row per rule, model group and scorer with Rule, Model group, Scorer, Scored, Errors, Pass rate and Judge cost. It always covers the last 7 days and ignores the page's date range. With no scores, or without the license, the card is not shown. Online rules are managed on the Online tab of the Evals page.
Empty, error and disabled states
While the first data loads the page shows grey placeholder blocks. If the gateway refuses or fails, the whole page is replaced by "Could not load model insights" with the gateway's message. The date fields are gone in that state, so reload the page to try again.
With no usage in the range the chart and leaderboard are empty. The task card reads "Loading task types..." while it loads, "Could not load task types" with the error when its request fails, and "No requests in this range carry a task tag, so any traffic shows as one Uncategorized row. Send x-spanway-tags: task:code_review, or another task type from the docs, to see a breakdown here." when no request in the range has a task tag. With untagged traffic the hint sits above a single Uncategorized row.
Differences by role and license
Only proxy admins and proxy admin viewers can use the page, in the nav and on the gateway. Both see the same data, and the page has no controls that change anything. The leaderboard itself needs no license. The online quality card appears only for proxy admins and proxy admin viewers on a proxy with the Evals and red teaming license feature.
Errors
| What you see | Why | Fix |
|---|---|---|
"Could not load model insights" with Only proxy admins can view deployment-wide model insights | The session is an org admin, internal user or viewer. | Use a proxy admin or admin viewer account. |
"Could not load model insights" with DB not connected. This endpoint needs a database; ... | The rollup lives in the database. | Set DATABASE_URL. |
| "Pick at most 365 days." or "The end date must not be before the start date." | The range is invalid. The page keeps the last data loaded. | Fix the dates. |
400 Dates must use YYYY-MM-DD from the API | A date was in another format. | Send YYYY-MM-DD. |
| "No requests in this range carry a task tag." | Nothing in the range was tagged. | Tag requests as in step 3 and widen the range. |
| Every task shows as uncategorized | The tag is misspelled or lacks the task: prefix. | Compare it with the task catalogue. |