danielrosehill Claude commited on
Commit
fca700e
·
1 Parent(s): fcb188b

Add vendor grouping and clean model names

Browse files

Improvements:
- Added subtle visual grouping by vendor in table
- Light blue gradient on first row of each vendor group
- Thin blue border separating vendor groups
- Vendor names highlighted in primary color
- Cleaned up redundant vendor prefixes from model names
- "Moonshot AI: Kimi K2" → "Kimi K2"
- "Qwen: Qwen3 Max" → "Qwen3 Max"
- Easier to scan and compare models
- Vendor grouping visible when sorting by vendor
- Maintains all color coding for cost/context tiers

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

Files changed (2) hide show
  1. app.js +42 -6
  2. style.css +14 -0
app.js CHANGED
@@ -261,7 +261,36 @@ function getContextTier(context) {
261
  return 'context-ultra';
262
  }
263
 
264
- // Populate data table with color coding
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
265
  function populateTable(models = filteredModels) {
266
  const tbody = document.getElementById('table-body');
267
 
@@ -283,10 +312,16 @@ function populateTable(models = filteredModels) {
283
  }
284
  });
285
 
286
- tbody.innerHTML = sortedModels.map(m => `
287
- <tr>
288
- <td>${m.model_name}</td>
289
- <td>${m.displayVendor}</td>
 
 
 
 
 
 
290
  <td class="${getContextTier(m.context_length)}" style="font-weight: 600;">
291
  ${(m.context_length / 1000).toFixed(0)}K
292
  </td>
@@ -298,7 +333,8 @@ function populateTable(models = filteredModels) {
298
  </td>
299
  <td><span class="quadrant-badge">${m.quadrant}</span></td>
300
  </tr>
301
- `).join('');
 
302
  }
303
 
304
  // Setup sorting functionality
 
261
  return 'context-ultra';
262
  }
263
 
264
+ // Clean up model name by removing redundant vendor prefix
265
+ function cleanModelName(modelName, vendor) {
266
+ // Common patterns to remove
267
+ const patterns = [
268
+ new RegExp(`^${vendor}:\\s*`, 'i'),
269
+ /^Qwen:\s*/i,
270
+ /^Meta:\s*/i,
271
+ /^Google:\s*/i,
272
+ /^OpenAI:\s*/i,
273
+ /^Anthropic:\s*/i,
274
+ /^DeepSeek:\s*/i,
275
+ /^Mistral:\s*/i,
276
+ /^NVIDIA:\s*/i,
277
+ /^Amazon:\s*/i,
278
+ /^Microsoft:\s*/i,
279
+ /^xAI:\s*/i,
280
+ /^Zhipu AI:\s*/i,
281
+ /^MoonshotAI:\s*/i,
282
+ /^Moonshot AI:\s*/i,
283
+ /^Alibaba:\s*/i
284
+ ];
285
+
286
+ let cleaned = modelName;
287
+ for (const pattern of patterns) {
288
+ cleaned = cleaned.replace(pattern, '');
289
+ }
290
+ return cleaned;
291
+ }
292
+
293
+ // Populate data table with color coding and vendor grouping
294
  function populateTable(models = filteredModels) {
295
  const tbody = document.getElementById('table-body');
296
 
 
312
  }
313
  });
314
 
315
+ let lastVendor = null;
316
+ tbody.innerHTML = sortedModels.map((m, index) => {
317
+ const isNewVendor = m.displayVendor !== lastVendor;
318
+ lastVendor = m.displayVendor;
319
+ const vendorClass = isNewVendor ? 'vendor-group-start' : '';
320
+
321
+ return `
322
+ <tr class="${vendorClass}" data-vendor="${m.displayVendor}">
323
+ <td>${cleanModelName(m.model_name, m.displayVendor)}</td>
324
+ <td class="vendor-cell">${m.displayVendor}</td>
325
  <td class="${getContextTier(m.context_length)}" style="font-weight: 600;">
326
  ${(m.context_length / 1000).toFixed(0)}K
327
  </td>
 
333
  </td>
334
  <td><span class="quadrant-badge">${m.quadrant}</span></td>
335
  </tr>
336
+ `;
337
+ }).join('');
338
  }
339
 
340
  // Setup sorting functionality
style.css CHANGED
@@ -490,14 +490,28 @@ tbody tr {
490
  transition: background-color 0.2s;
491
  }
492
 
 
 
 
 
 
493
  tbody tr:hover {
494
  background: var(--bg);
495
  }
496
 
 
 
 
 
497
  td {
498
  padding: 1rem;
499
  }
500
 
 
 
 
 
 
501
  .quadrant-badge {
502
  display: inline-block;
503
  padding: 0.25rem 0.75rem;
 
490
  transition: background-color 0.2s;
491
  }
492
 
493
+ tbody tr.vendor-group-start {
494
+ border-top: 2px solid var(--primary);
495
+ background: linear-gradient(to bottom, rgba(37, 99, 235, 0.05) 0%, transparent 100%);
496
+ }
497
+
498
  tbody tr:hover {
499
  background: var(--bg);
500
  }
501
 
502
+ tbody tr.vendor-group-start:hover {
503
+ background: linear-gradient(to bottom, rgba(37, 99, 235, 0.08) 0%, var(--bg) 100%);
504
+ }
505
+
506
  td {
507
  padding: 1rem;
508
  }
509
 
510
+ td.vendor-cell {
511
+ font-weight: 600;
512
+ color: var(--primary);
513
+ }
514
+
515
  .quadrant-badge {
516
  display: inline-block;
517
  padding: 0.25rem 0.75rem;