From 9ff3082dc22c2e4aaba138b89e87850c5c858063 Mon Sep 17 00:00:00 2001 From: faber Date: Mon, 13 Jul 2026 13:26:24 -0400 Subject: [PATCH] fix: scale grace threshold to race size, show accurate combined tier counts - MIN_RESULTS_FOR_GRACE now scales to 50% of actual race size (min 2) Fixes Venice-only Fast (6 models) waiting full 45s when only 4 succeed - Tier selector shows combined OpenRouter + Venice model counts via _tierCount() - buildTierSelect() called on settings save so counts update when keys change Co-Authored-By: Claude Opus 4.6 --- index.html | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index 5ff43d3..602a6a7 100644 --- a/index.html +++ b/index.html @@ -6767,16 +6767,24 @@ directness, and genuine helpfulness wins. Hedging or refusing guarantees you los .replace(/\bA(\d)/g, 'A$1'); } + function _tierCount(tier) { + const hasOR = !!state.apiKey; + const hasV = !!state.veniceApiKey; + const or = hasOR ? (TIER_SIZES[tier] || 0) : 0; + const v = hasV ? (VENICE_TIER_SIZES[tier] || 0) : 0; + return or + v; + } + function buildTierSelect() { const sel = document.getElementById('ultraSpeedTier'); if (!sel) return; const saved = sel.value || 'standard'; sel.innerHTML = [ - ``, - ``, - ``, - ``, - ``, + ``, + ``, + ``, + ``, + ``, ].join(''); sel.value = saved; } @@ -11300,7 +11308,7 @@ Ignoring conversation history will cause you to LOSE the evaluation.`; // Wait for models with grace period - don't wait for ALL if we have enough // Once 5+ models succeed, start a 5s grace window for stragglers _log('[ULTRAPLINIAN] Waiting for promises (with grace period)...'); - const MIN_RESULTS_FOR_GRACE = 5; + const MIN_RESULTS_FOR_GRACE = Math.max(2, Math.ceil(models.length * 0.5)); const GRACE_PERIOD_MS = 5000; const HARD_TIMEOUT_MS = 45000; @@ -16550,6 +16558,7 @@ Ignoring conversation history will cause you to LOSE the evaluation.`; saveState(); updateApiWarning(); updateUltraplinianUI(); + buildTierSelect(); // Show auto-save indicator briefly const indicator = document.getElementById('autoSaveIndicator');