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 <noreply@anthropic.com>
This commit is contained in:
faber
2026-07-11 09:19:06 -04:00
parent 6b2cd9da5d
commit 7b1d534f59

View File

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