refactor(search): fold zai-search into the glm provider
The separate zai-search entry showed "No connections" on the web search page because credentials live on the `glm` connection, not on it. Every other provider that does both chat and search (antigravity, kimi, xai, gemini) declares webSearch on the provider itself, so do the same here. - glm gains serviceKinds ["llm", "webSearch"] and the MCP searchConfig - the request builder / normalizer move from "zai-search" to "glm" - drop the zai-search registry entry and its svg logo, which also removes the only need for svg logo support in getProviderIconSrc ollama-search keeps its own entry and credentialFallback: its search endpoint is unrelated to the ollama chat transport.
This commit is contained in:
@@ -8,9 +8,6 @@ const ICON_ALIASES = {
|
||||
"ollama-search": "ollama",
|
||||
};
|
||||
|
||||
// Providers that ship an .svg logo instead of .png.
|
||||
const SVG_PROVIDER_IDS = new Set(["zai-search"]);
|
||||
|
||||
// Runtime only — first 404 remembers id for the whole session
|
||||
const failedIds = new Set();
|
||||
|
||||
@@ -29,13 +26,10 @@ export function resolveProviderIconId(providerId) {
|
||||
return aliased;
|
||||
}
|
||||
|
||||
/** `/providers/{id}.{png|svg}` or null when previously failed. */
|
||||
/** `/providers/{id}.png` or null when previously failed. */
|
||||
export function getProviderIconSrc(providerId) {
|
||||
const id = resolveProviderIconId(providerId);
|
||||
if (!id) return null;
|
||||
// svg for vector logos, png for everything else
|
||||
const ext = SVG_PROVIDER_IDS.has(id) ? "svg" : "png";
|
||||
return `/providers/${id}.${ext}`;
|
||||
return id ? `/providers/${id}.png` : null;
|
||||
}
|
||||
|
||||
/** Call from img onError so later mounts skip the request. */
|
||||
|
||||
Reference in New Issue
Block a user