diff --git a/extensions/google/google.live.test.ts b/extensions/google/google.live.test.ts index efe156b6262..62eede1edd4 100644 --- a/extensions/google/google.live.test.ts +++ b/extensions/google/google.live.test.ts @@ -6,6 +6,7 @@ import { } from "../../test/helpers/plugins/provider-registration.js"; import { normalizeTranscriptForMatch } from "../../test/helpers/stt-live-audio.js"; import plugin from "./index.js"; +import { createGeminiWebSearchProvider } from "./src/gemini-web-search-provider.js"; const GOOGLE_API_KEY = process.env.GEMINI_API_KEY?.trim() || process.env.GOOGLE_API_KEY?.trim() || ""; @@ -63,4 +64,19 @@ describeLive("google plugin live", () => { expect(normalized).toContain("google"); expect(normalized).toContain("openclaw"); }, 180_000); + + it("runs Gemini web search through the registered provider tool", async () => { + const provider = createGeminiWebSearchProvider(); + const tool = provider.createTool?.({ + config: {}, + searchConfig: { gemini: { apiKey: GOOGLE_API_KEY }, cacheTtlMinutes: 0 }, + } as never); + + const result = await tool?.execute({ query: "OpenClaw GitHub", count: 1 }); + + expect(result?.provider).toBe("gemini"); + expect(typeof result?.content).toBe("string"); + expect((result?.content as string).length).toBeGreaterThan(20); + expect(Array.isArray(result?.citations)).toBe(true); + }, 120_000); }); diff --git a/extensions/microsoft/microsoft.live.test.ts b/extensions/microsoft/microsoft.live.test.ts new file mode 100644 index 00000000000..35aaa637dcf --- /dev/null +++ b/extensions/microsoft/microsoft.live.test.ts @@ -0,0 +1,14 @@ +import { describe, expect, it } from "vitest"; +import { isLiveTestEnabled } from "../../src/agents/live-test-helpers.js"; +import { listMicrosoftVoices } from "./speech-provider.js"; + +const describeLive = isLiveTestEnabled() ? describe : describe.skip; + +describeLive("microsoft plugin live", () => { + it("lists Edge speech voices", async () => { + const voices = await listMicrosoftVoices(); + + expect(voices.length).toBeGreaterThan(100); + expect(voices.some((voice) => voice.id === "en-US-MichelleNeural")).toBe(true); + }, 60_000); +}); diff --git a/extensions/minimax/minimax.live.test.ts b/extensions/minimax/minimax.live.test.ts new file mode 100644 index 00000000000..9e3aa7c4eb3 --- /dev/null +++ b/extensions/minimax/minimax.live.test.ts @@ -0,0 +1,27 @@ +import { describe, expect, it } from "vitest"; +import { isLiveTestEnabled } from "../../src/agents/live-test-helpers.js"; +import { createMiniMaxWebSearchProvider } from "./src/minimax-web-search-provider.js"; + +const MINIMAX_SEARCH_KEY = + process.env.MINIMAX_CODE_PLAN_KEY?.trim() || + process.env.MINIMAX_CODING_API_KEY?.trim() || + process.env.MINIMAX_API_KEY?.trim() || + ""; +const describeLive = + isLiveTestEnabled() && MINIMAX_SEARCH_KEY.length > 0 ? describe : describe.skip; + +describeLive("minimax plugin live", () => { + it("runs MiniMax web search through the provider tool", async () => { + const provider = createMiniMaxWebSearchProvider(); + const tool = provider.createTool?.({ + config: {}, + searchConfig: { apiKey: MINIMAX_SEARCH_KEY, cacheTtlMinutes: 0 }, + } as never); + + const result = await tool?.execute({ query: "OpenClaw GitHub", count: 1 }); + + expect(result?.provider).toBe("minimax"); + expect(result?.count).toBeGreaterThan(0); + expect(Array.isArray(result?.results)).toBe(true); + }, 120_000); +}); diff --git a/extensions/moonshot/moonshot.live.test.ts b/extensions/moonshot/moonshot.live.test.ts new file mode 100644 index 00000000000..a3022996c29 --- /dev/null +++ b/extensions/moonshot/moonshot.live.test.ts @@ -0,0 +1,24 @@ +import { describe, expect, it } from "vitest"; +import { isLiveTestEnabled } from "../../src/agents/live-test-helpers.js"; +import { createKimiWebSearchProvider } from "./src/kimi-web-search-provider.js"; + +const KIMI_SEARCH_KEY = + process.env.KIMI_API_KEY?.trim() || process.env.MOONSHOT_API_KEY?.trim() || ""; +const describeLive = isLiveTestEnabled() && KIMI_SEARCH_KEY.length > 0 ? describe : describe.skip; + +describeLive("moonshot plugin live", () => { + it("runs Kimi web search through the provider tool", async () => { + const provider = createKimiWebSearchProvider(); + const tool = provider.createTool?.({ + config: {}, + searchConfig: { kimi: { apiKey: KIMI_SEARCH_KEY }, cacheTtlMinutes: 0 }, + } as never); + + const result = await tool?.execute({ query: "OpenClaw GitHub", count: 1 }); + + expect(result?.provider).toBe("kimi"); + expect(typeof result?.content).toBe("string"); + expect((result?.content as string).length).toBeGreaterThan(20); + expect(Array.isArray(result?.citations)).toBe(true); + }, 120_000); +});