From 66585549f1fa83d19e814299b71958681987dd26 Mon Sep 17 00:00:00 2001 From: JianFeeeee Date: Wed, 26 Aug 2026 20:36:05 +0800 Subject: [PATCH] fix(webui): allow image models in priority/AUTO chain editor The priority page and key-scope pickers skipped kind=image models, so image sources (e.g. Kwai-Kolors/Kolors) could not be placed in the AUTO chain or granted per-key. The backend already supports it: handleImage resolves AUTO through the chain then filters with imageOnly, while chat requests are protected by chatOnly, so image slots never receive chat traffic. Image models now appear in the priority canvas, the add-slot picker (labelled ' (image)'), and the key scope dialog. --- internal/gateway/ui/index.html | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/internal/gateway/ui/index.html b/internal/gateway/ui/index.html index 174e464..8e3bcd0 100644 --- a/internal/gateway/ui/index.html +++ b/internal/gateway/ui/index.html @@ -2583,8 +2583,7 @@ const sourceRows = new Map(); j.sources.forEach((s) => (s.models || []).forEach((m) => { - if (m.kind === "image") return; - const it = { src: s.name, id: m.id, prio: m.priority || 0 }; + const it = { src: s.name, id: m.id, prio: m.priority || 0, kind: m.kind }; byPair.set(m.id + "|" + s.name, it); if (!byModel.has(m.id)) byModel.set(m.id, it); if (!sourceRows.has(it.prio)) sourceRows.set(it.prio, []); @@ -3408,11 +3407,11 @@ const pairs = []; (srcs || []).forEach((s) => (s.models || []).forEach((m) => { - if (m.kind === "image") return; pairs.push({ src: s.name, id: m.id, - label: m.id + " · " + s.name, + label: m.id + " · " + s.name + (m.kind === "image" ? " (image)" : ""), + kind: m.kind, key: m.id + "|" + s.name, }); }),