diff --git a/src/commands/doctor-legacy-config.migrations.test.ts b/src/commands/doctor-legacy-config.migrations.test.ts index a429b3e4363..c29ac1c8cb6 100644 --- a/src/commands/doctor-legacy-config.migrations.test.ts +++ b/src/commands/doctor-legacy-config.migrations.test.ts @@ -110,38 +110,6 @@ describe("normalizeCompatibilityConfigValues", () => { ]); }); - it("migrates legacy x_search auth into xai plugin-owned config", () => { - const res = normalizeCompatibilityConfigValues({ - tools: { - web: { - x_search: { - apiKey: "xai-legacy-key", - enabled: true, - model: "grok-4-1-fast", - }, - } as Record, - }, - }); - - expect((res.config.tools?.web as Record | undefined)?.x_search).toEqual({ - enabled: true, - model: "grok-4-1-fast", - }); - expect(res.config.plugins?.entries?.xai).toEqual({ - enabled: true, - config: { - webSearch: { - apiKey: "xai-legacy-key", - }, - }, - }); - expect(res.changes).toEqual( - expect.arrayContaining([ - "Moved tools.web.x_search.apiKey → plugins.entries.xai.config.webSearch.apiKey.", - ]), - ); - }); - it("migrates Discord account dm.policy/dm.allowFrom to dmPolicy/allowFrom aliases", () => { const res = normalizeCompatibilityConfigValues({ channels: { @@ -565,42 +533,6 @@ describe("normalizeCompatibilityConfigValues", () => { ]); }); - it("migrates legacy web fetch provider config to plugin-owned config paths", () => { - const res = normalizeCompatibilityConfigValues({ - tools: { - web: { - fetch: { - provider: "firecrawl", - timeoutSeconds: 15, - firecrawl: { - apiKey: "firecrawl-key", - baseUrl: "https://api.firecrawl.dev", - onlyMainContent: false, - }, - }, - }, - }, - } as OpenClawConfig); - - expect(res.config.tools?.web?.fetch).toEqual({ - provider: "firecrawl", - timeoutSeconds: 15, - }); - expect(res.config.plugins?.entries?.firecrawl).toEqual({ - enabled: true, - config: { - webFetch: { - apiKey: "firecrawl-key", - baseUrl: "https://api.firecrawl.dev", - onlyMainContent: false, - }, - }, - }); - expect(res.changes).toEqual([ - "Moved tools.web.fetch.firecrawl → plugins.entries.firecrawl.config.webFetch.", - ]); - }); - it("keeps explicit plugin-owned web fetch config while filling missing legacy fields", () => { const res = normalizeCompatibilityConfigValues({ tools: {