Consolidate OpenCode Chain into OpenCode Models section
- Removed separate OpenCode Chain card - Integrated chain functionality as subsection within OpenCode Models - Chain form and list now appear below the models list - Added styling to distinguish the chain subsection
This commit is contained in:
@@ -16,6 +16,18 @@
|
|||||||
}
|
}
|
||||||
/* Slightly tighten cards on the build page */
|
/* Slightly tighten cards on the build page */
|
||||||
body[data-page="build"] .admin-card { padding: 12px; }
|
body[data-page="build"] .admin-card { padding: 12px; }
|
||||||
|
|
||||||
|
/* Chain section styling */
|
||||||
|
.chain-section {
|
||||||
|
margin-top: 24px;
|
||||||
|
padding-top: 16px;
|
||||||
|
border-top: 2px solid var(--border);
|
||||||
|
}
|
||||||
|
.chain-section h4 {
|
||||||
|
margin: 0 0 8px 0;
|
||||||
|
font-size: 14px;
|
||||||
|
color: var(--muted);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- PostHog Analytics -->
|
<!-- PostHog Analytics -->
|
||||||
@@ -67,15 +79,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Section 1: OpenCode Models -->
|
<!-- Section 1: OpenCode Models (with integrated Chain) -->
|
||||||
<div class="admin-card">
|
<div class="admin-card">
|
||||||
<header>
|
<header>
|
||||||
<h3>OpenCode Models</h3>
|
<h3>OpenCode Models</h3>
|
||||||
<div class="pill">Backend</div>
|
<div class="pill">Backend</div>
|
||||||
</header>
|
</header>
|
||||||
<p style="margin-top:0; color: var(--muted);">Add models from OpenCode. These models process requests and use the OpenCode Chain below for fallback when rate limits are reached.</p>
|
<p style="margin-top:0; color: var(--muted);">Add models from OpenCode. These models process requests and can fall back to the provider chain when rate limits are reached.</p>
|
||||||
|
|
||||||
<!-- Add Form -->
|
<!-- Add Model Form -->
|
||||||
<form id="opencode-model-form" class="admin-form" style="margin-bottom: 24px;">
|
<form id="opencode-model-form" class="admin-form" style="margin-bottom: 24px;">
|
||||||
<label>
|
<label>
|
||||||
Choose from OpenCode
|
Choose from OpenCode
|
||||||
@@ -112,61 +124,59 @@
|
|||||||
<div class="status-line" id="opencode-model-status"></div>
|
<div class="status-line" id="opencode-model-status"></div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<!-- List -->
|
<!-- Models List -->
|
||||||
<header style="margin-top: 24px; border-top: 1px solid var(--border); padding-top: 16px;">
|
<header style="margin-top: 24px; border-top: 1px solid var(--border); padding-top: 16px;">
|
||||||
<h3>OpenCode Models List</h3>
|
<h3>OpenCode Models List</h3>
|
||||||
<div class="pill" id="opencode-models-count">0</div>
|
<div class="pill" id="opencode-models-count">0</div>
|
||||||
</header>
|
</header>
|
||||||
<p class="muted" style="margin-top:0;">Arrange the order below. This controls which model is primary for OpenCode requests.</p>
|
<p class="muted" style="margin-top:0;">Arrange the order below. This controls which model is primary for OpenCode requests.</p>
|
||||||
<div id="opencode-models-list" class="admin-list"></div>
|
<div id="opencode-models-list" class="admin-list"></div>
|
||||||
|
|
||||||
|
<!-- Chain Section (integrated) -->
|
||||||
|
<div class="chain-section">
|
||||||
|
<h4>Fallback Chain (for when rate limits are reached)</h4>
|
||||||
|
<p class="muted" style="margin-top:0; margin-bottom: 12px;">When the primary OpenCode model hits rate limits, the system falls back through these providers in order.</p>
|
||||||
|
|
||||||
|
<!-- Add to Chain Form -->
|
||||||
|
<form id="chain-form" class="admin-form" style="margin-bottom: 16px;">
|
||||||
|
<div class="admin-grid" style="grid-template-columns: 1fr 2fr; gap: 12px;">
|
||||||
|
<label>
|
||||||
|
Provider
|
||||||
|
<select id="chain-provider">
|
||||||
|
<option value="openrouter">OpenRouter</option>
|
||||||
|
<option value="mistral">Mistral</option>
|
||||||
|
<option value="google">Google</option>
|
||||||
|
<option value="groq">Groq</option>
|
||||||
|
<option value="nvidia">NVIDIA</option>
|
||||||
|
<option value="chutes">Chutes</option>
|
||||||
|
<option value="cerebras">Cerebras</option>
|
||||||
|
<option value="ollama">Ollama</option>
|
||||||
|
<option value="cohere">Cohere</option>
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
Model ID
|
||||||
|
<input id="chain-model" type="text" placeholder="e.g., anthropic/claude-3.5-sonnet" required />
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="admin-actions" style="margin-top: 12px;">
|
||||||
|
<button type="submit" class="primary">Add to Fallback Chain</button>
|
||||||
|
</div>
|
||||||
|
<div class="status-line" id="chain-status"></div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<!-- Chain List -->
|
||||||
|
<div style="margin-top: 16px;">
|
||||||
|
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;">
|
||||||
|
<span class="muted">Fallback Chain Order</span>
|
||||||
|
<span class="pill" id="chain-count">0</span>
|
||||||
|
</div>
|
||||||
|
<div id="chain-list" class="admin-list"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Section 2: OpenCode Chain (Fallback) -->
|
<!-- Section 2: Public Models (Completely Separate) -->
|
||||||
<div class="admin-card" style="margin-top: 16px;">
|
|
||||||
<header>
|
|
||||||
<h3>OpenCode Chain</h3>
|
|
||||||
<div class="pill">Fallback</div>
|
|
||||||
</header>
|
|
||||||
<p style="margin-top:0; color: var(--muted);">When rate limits are reached or errors occur, the system falls back through this chain of providers.</p>
|
|
||||||
|
|
||||||
<!-- Add Form -->
|
|
||||||
<form id="chain-form" class="admin-form" style="margin-bottom: 24px;">
|
|
||||||
<div class="admin-grid" style="grid-template-columns: 1fr 2fr; gap: 12px;">
|
|
||||||
<label>
|
|
||||||
Provider
|
|
||||||
<select id="chain-provider">
|
|
||||||
<option value="openrouter">OpenRouter</option>
|
|
||||||
<option value="mistral">Mistral</option>
|
|
||||||
<option value="google">Google</option>
|
|
||||||
<option value="groq">Groq</option>
|
|
||||||
<option value="nvidia">NVIDIA</option>
|
|
||||||
<option value="chutes">Chutes</option>
|
|
||||||
<option value="cerebras">Cerebras</option>
|
|
||||||
<option value="ollama">Ollama</option>
|
|
||||||
<option value="cohere">Cohere</option>
|
|
||||||
</select>
|
|
||||||
</label>
|
|
||||||
<label>
|
|
||||||
Model ID
|
|
||||||
<input id="chain-model" type="text" placeholder="e.g., anthropic/claude-3.5-sonnet" required />
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div class="admin-actions">
|
|
||||||
<button type="submit" class="primary">Add to Chain</button>
|
|
||||||
</div>
|
|
||||||
<div class="status-line" id="chain-status"></div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<!-- List -->
|
|
||||||
<header style="margin-top: 24px; border-top: 1px solid var(--border); padding-top: 16px;">
|
|
||||||
<h3>Chain Order</h3>
|
|
||||||
<div class="pill" id="chain-count">0</div>
|
|
||||||
</header>
|
|
||||||
<p class="muted" style="margin-top:0;">The system tries providers in this order. Use arrows to reorder.</p>
|
|
||||||
<div id="chain-list" class="admin-list"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Section 3: Public Models (Completely Separate) -->
|
|
||||||
<div class="admin-card" style="margin-top: 16px;">
|
<div class="admin-card" style="margin-top: 16px;">
|
||||||
<header>
|
<header>
|
||||||
<h3>Public Models</h3>
|
<h3>Public Models</h3>
|
||||||
|
|||||||
Reference in New Issue
Block a user