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:
@@ -257,7 +257,7 @@ function normalizeOllamaSearch(data, _query, _searchType) {
|
||||
return { results, totalResults: results.length };
|
||||
}
|
||||
|
||||
function normalizeZaiSearch(data, _query, _searchType) {
|
||||
function normalizeGlmSearch(data, _query, _searchType) {
|
||||
const now = new Date().toISOString();
|
||||
// MCP envelope: { result: { content: [{ type: "text", text: "<json>" }] } }
|
||||
let payload = data;
|
||||
@@ -270,7 +270,7 @@ function normalizeZaiSearch(data, _query, _searchType) {
|
||||
: Array.isArray(payload) ? payload
|
||||
: [];
|
||||
const results = items.map((item, idx) =>
|
||||
makeResult("zai-search", {
|
||||
makeResult("glm", {
|
||||
title: item.title,
|
||||
url: item.link || item.url,
|
||||
snippet: item.content || "",
|
||||
@@ -295,7 +295,7 @@ const NORMALIZERS = {
|
||||
"searxng": normalizeSearxng,
|
||||
"xquik": normalizeXquik,
|
||||
"ollama-search": normalizeOllamaSearch,
|
||||
"zai-search": normalizeZaiSearch,
|
||||
"glm": normalizeGlmSearch,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user