feat(search): add ollama-search and zai-search with credential fallback

Register two web search providers that reuse an existing chat provider's
API key instead of requiring their own connection:

- ollama-search (POST ollama.com/api/web_search) reuses the `ollama` key
- zai-search (POST api.z.ai MCP web_search_prime) reuses the `glm` key

A new `credentialFallback` registry field drives this: when a search
provider has no connection of its own, the search handler falls back to
the linked chat provider's credentials.

Also teach getProviderIconSrc to serve .svg logos for providers that
ship vector art.
This commit is contained in:
decolua
2026-08-28 16:04:45 +07:00
parent eb312bd470
commit 5a86f6a8d2
9 changed files with 198 additions and 4 deletions

View File

@@ -66,6 +66,7 @@ import p63 from "./nebius.js";
import p64 from "./nvidia.js";
import p65 from "./ollama-local.js";
import p66 from "./ollama.js";
import p123 from "./ollama-search.js";
import p67 from "./openai.js";
import p68 from "./opencode-go.js";
import p69 from "./opencode.js";
@@ -97,6 +98,7 @@ import p95 from "./xai.js";
import p96 from "./xiaomi-mimo.js";
import p97 from "./xiaomi-tokenplan.js";
import p98 from "./youcom.js";
import p124 from "./zai-search.js";
import p99 from "./alims-intl.js";
import p100 from "./codebuddy-intl.js";
// Temporarily hidden — no tool calling support (trae SOLO agent / windsurf gRPC skip ToolCallChunk).
@@ -191,6 +193,7 @@ export default [
p64,
p65,
p66,
p123,
p67,
p68,
p69,
@@ -222,6 +225,7 @@ export default [
p96,
p97,
p98,
p124,
p99,
p100,
// p102, // trae — hidden, no tool calling