Models: Provider column + top-bar stats fix #34

Closed
opened 2026-03-30 10:36:48 +00:00 by mahmoud · 1 comment
Owner

Problem

  1. The Models table has no Provider column, so users can't tell which provider a model belongs to
  2. Top-right of the app shows "0 models, 0 providers" even when models are clearly listed

Expected Behavior

  • Models table includes a Provider column (e.g. OpenRouter, Groq)
  • Optionally show basic model metadata: context window size, token limits
  • Top-right stats accurately reflect the number of loaded models and providers

Acceptance Criteria

  • Provider column visible in models table
  • Each model correctly labeled with its source provider
  • Top-right counter shows correct model + provider counts
  • Optional: context/token info shown per model
## Problem 1. The Models table has no **Provider** column, so users can't tell which provider a model belongs to 2. Top-right of the app shows **"0 models, 0 providers"** even when models are clearly listed ## Expected Behavior - Models table includes a `Provider` column (e.g. OpenRouter, Groq) - Optionally show basic model metadata: context window size, token limits - Top-right stats accurately reflect the number of loaded models and providers ## Acceptance Criteria - [x] Provider column visible in models table - [x] Each model correctly labeled with its source provider - [x] Top-right counter shows correct model + provider counts - [x] Optional: context/token info shown per model
Author
Owner

Implementation Spec for Issue #34

Objective

Fix two UI issues: (1) Add a Provider column to the Models table, (2) Fix the top-right navbar stats to show correct model/provider counts from the models configuration instead of the active registry.

Root Cause

The top-bar calls rpc('info') which returns model_count from state.registry (only models with active API key backends) and configured_providers() (only providers with keys set). When no API keys are configured, both return 0 — but the Models table reads from models.config (raw YAML) which always shows all configured models.

Requirements

  • Models table includes a "Provider" column with provider badges per model
  • Top-right stats derived from models.config RPC (matching the table)
  • No Rust code changes — purely HTML/JS template fixes

Files to Modify

File Change
templates/fragments/models_pane.html Add Provider column header + render provider badges from backends
templates/base.html Fix extraInfoFn to derive counts from models.config RPC

Implementation Plan

Step 1: Add Provider column to Models table (independent)

Files: models_pane.html

  • Add <th>Provider</th> after "Display Name"
  • Extract unique providers from m.backends and render as badges
  • Update colspan values from 7 to 8

Step 2: Fix top-bar stats (independent)

Files: base.html

  • Replace extraInfoFn to call models.config and derive counts
  • Count unique providers from all model backends

Acceptance Criteria

  • Provider column visible in models table
  • Each model shows correct provider badges
  • Top-right counter shows correct model + provider counts
  • Context column already exists (optional requirement satisfied)

Notes

  • Steps 1 & 2 are independent — can run in parallel
  • .provider-badge CSS class already exists in base.html
  • No Rust changes, no data structure changes
## Implementation Spec for Issue #34 ### Objective Fix two UI issues: (1) Add a Provider column to the Models table, (2) Fix the top-right navbar stats to show correct model/provider counts from the models configuration instead of the active registry. ### Root Cause The top-bar calls `rpc('info')` which returns `model_count` from `state.registry` (only models with active API key backends) and `configured_providers()` (only providers with keys set). When no API keys are configured, both return 0 — but the Models table reads from `models.config` (raw YAML) which always shows all configured models. ### Requirements - Models table includes a "Provider" column with provider badges per model - Top-right stats derived from `models.config` RPC (matching the table) - No Rust code changes — purely HTML/JS template fixes ### Files to Modify | File | Change | |------|--------| | `templates/fragments/models_pane.html` | Add Provider column header + render provider badges from backends | | `templates/base.html` | Fix `extraInfoFn` to derive counts from `models.config` RPC | ### Implementation Plan #### Step 1: Add Provider column to Models table (independent) Files: `models_pane.html` - Add `<th>Provider</th>` after "Display Name" - Extract unique providers from `m.backends` and render as badges - Update colspan values from 7 to 8 #### Step 2: Fix top-bar stats (independent) Files: `base.html` - Replace `extraInfoFn` to call `models.config` and derive counts - Count unique providers from all model backends ### Acceptance Criteria - [ ] Provider column visible in models table - [ ] Each model shows correct provider badges - [ ] Top-right counter shows correct model + provider counts - [ ] Context column already exists (optional requirement satisfied) ### Notes - Steps 1 & 2 are independent — can run in parallel - `.provider-badge` CSS class already exists in `base.html` - No Rust changes, no data structure changes
mahmoud self-assigned this 2026-03-31 17:42:49 +00:00
mahmoud added this to the ACTIVE project 2026-03-31 17:42:51 +00:00
mahmoud added this to the now milestone 2026-03-31 17:42:54 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_aibroker#34
No description provided.