@@ -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)