feat(ai): add OpenRouter and Ollama Cloud providers (#231)

Co-authored-by: Alex Kenley <Alex.Kenley@threatvectorsecurity.com>
This commit is contained in:
Alexander Kenley
2026-06-01 15:26:10 +10:00
committed by GitHub
parent 4dbc0fe73a
commit 2c4b8b57dd
27 changed files with 699 additions and 169 deletions

View File

@@ -6,6 +6,7 @@ import uiModule from './ui.js';
import markdownModule from './markdown.js';
import * as spinnerModule from './spinner.js';
import { makeWindowDraggable } from './windowDrag.js';
import { sortModelIds } from './modelSort.js';
const API_BASE = window.location.origin;
let _open = false;
@@ -1259,7 +1260,7 @@ function _showForm(existing, initTaskType, initTriggerType) {
if (it.offline || !it.models || it.models.length === 0) continue;
const group = document.createElement('optgroup');
group.label = it.endpoint_name || it.host || 'endpoint';
const all = [...(it.models || []), ...(it.models_extra || [])];
const all = sortModelIds([...(it.models || []), ...(it.models_extra || [])]);
for (const m of all) {
const opt = document.createElement('option');
opt.value = `${it.url}::${m}`;