From 7b1d534f59e57ea2d46738c81fcd43a05585d4a3 Mon Sep 17 00:00:00 2001 From: faber Date: Sat, 11 Jul 2026 09:19:06 -0400 Subject: [PATCH] feat: Venice-only standalone mode (no OpenRouter key required) Users can now use G0DM0D3 with just a Venice API key: - Send guard accepts either OpenRouter or Venice key - Auto-switches to ULTRAPLINIAN when Venice-only (other modes need OpenRouter) - Race entries conditionally include OpenRouter models only when key exists - Warning banner updated to mention Venice as an option - Regeneration guard accepts either key - Vision processing degrades gracefully without OpenRouter All three key combinations work: - OpenRouter only: all modes, full feature set - Both keys: ULTRAPLINIAN races both providers - Venice only: ULTRAPLINIAN with Venice models, local scoring Co-Authored-By: Claude Opus 4.6 --- index.html | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/index.html b/index.html index 2d839ba..d232638 100644 --- a/index.html +++ b/index.html @@ -3469,7 +3469,7 @@
@@ -10942,8 +10942,10 @@ Analyze and refine. Output ONLY the JSON object:` } // Step 2: Query ALL models in parallel with early stopping + live leader tracking _log('[ULTRAPLINIAN] Step 2: Querying all models...'); - // Build race entries: OpenRouter models + Venice models (when key present) - const raceEntries = modelsToQuery.map(m => ({ model: m, provider: 'openrouter' })); + // Build race entries: OpenRouter models (when key present) + Venice models (when key present) + const raceEntries = state.apiKey + ? modelsToQuery.map(m => ({ model: m, provider: 'openrouter' })) + : []; if (state.veniceApiKey) { const veniceTier = state.ultraSpeedTier || 'standard'; const veniceCount = VENICE_TIER_SIZES[veniceTier] || VENICE_TIER_SIZES.standard; @@ -12548,7 +12550,8 @@ Ignoring conversation history will cause you to LOSE the evaluation.`; } function updateApiWarning() { - document.getElementById('noApiWarning').style.display = state.apiKey ? 'none' : 'flex'; + const hasAnyKey = !!(state.apiKey || state.veniceApiKey); + document.getElementById('noApiWarning').style.display = hasAnyKey ? 'none' : 'flex'; } // Sidebar @@ -13287,7 +13290,12 @@ Ignoring conversation history will cause you to LOSE the evaluation.`; // Regenerate response from a specific user message async function regenerateFromMessage(userMsgIdx) { const conv = getCurrentConv(); - if (!conv || !state.apiKey) return; + if (!conv || (!state.apiKey && !state.veniceApiKey)) return; + + // Venice-only: ensure ULTRAPLINIAN for regeneration too + if (!state.apiKey && state.veniceApiKey && !state.ultraplinian) { + selectMode('ultraplinian'); + } isStreaming = true; updateSendButton(); @@ -13942,11 +13950,16 @@ Ignoring conversation history will cause you to LOSE the evaluation.`; // Need either text or image if ((!content && !attachedImage) || isStreaming) return; - if (!state.apiKey) { + if (!state.apiKey && !state.veniceApiKey) { openSettings(); return; } + // Venice-only: auto-switch to ULTRAPLINIAN (other modes need OpenRouter) + if (!state.apiKey && state.veniceApiKey && !state.ultraplinian) { + selectMode('ultraplinian'); + } + // Create conv if needed if (!state.currentId) { newChat(); @@ -13986,9 +13999,10 @@ Ignoring conversation history will cause you to LOSE the evaluation.`; // ── Image Vision Processing ────────────────────────────────────── // If user attached an image, send it to Gemini Flash for analysis - // then inject the vision description into the conversation context + // then inject the vision description into the conversation context. + // Vision requires OpenRouter (Gemini Flash) — skip gracefully in Venice-only mode. let visionContext = null; - if (attachedImage) { + if (attachedImage && state.apiKey) { try { console.log(`[G0DM0D3] 📷 Processing image via ${VISION_MODEL}...`); visionContext = await processImageWithVision(attachedImage, content); @@ -13997,6 +14011,8 @@ Ignoring conversation history will cause you to LOSE the evaluation.`; console.error('[G0DM0D3] Vision processing failed:', err); visionContext = `[Image was attached but vision processing failed: ${err.message}]`; } + } else if (attachedImage && !state.apiKey) { + visionContext = '[Image attached — vision analysis unavailable without OpenRouter key]'; } // Fire harm classification in parallel (never blocks UI)