LIBERATED AI CHAT
TypeScript
feat: Venice-only standalone mode (no OpenRouter key required)
faber7b1d534f59e5
diff --git a/index.html b/index.htmlindex 2d839ba..d232638 100644--- a/index.html+++ b/index.html@@ -3469,7 +3469,7 @@<div class="input-area"><div class="input-container"><div id="noApiWarning" class="no-api-warning" style="display: none;">- ⚠️ No API key. <a onclick="startOpenRouterLogin()" style="cursor:pointer;text-decoration:underline;">Log in with OpenRouter</a> or <a onclick="openSettings()" style="cursor:pointer;text-decoration:underline;">paste your key</a> to start.+ ⚠️ No API key. <a onclick="startOpenRouterLogin()" style="cursor:pointer;text-decoration:underline;">Log in with OpenRouter</a> or <a onclick="openSettings()" style="cursor:pointer;text-decoration:underline;">paste a key</a> (OpenRouter or Venice) to start.</div><!-- Image preview strip (shown when image attached) --><div class="image-preview-strip" id="imagePreviewStrip">@@ -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 messageasync 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 imageif ((!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 neededif (!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)