fix(brave): use canonical docs URL

This commit is contained in:
Peter Steinberger
2026-05-02 04:41:17 +01:00
parent 1a796b9700
commit 10256b6da4
4 changed files with 13 additions and 2 deletions

View File

@@ -2,6 +2,7 @@ import fs from "node:fs";
import { validateJsonSchemaValue } from "openclaw/plugin-sdk/config-schema";
import { afterEach, describe, expect, it, vi } from "vitest";
import { __testing } from "../test-api.js";
import { createBraveWebSearchProvider as createBraveWebSearchContractProvider } from "../web-search-contract-api.js";
import { createBraveWebSearchProvider } from "./brave-web-search-provider.js";
const braveManifest = JSON.parse(
@@ -40,6 +41,15 @@ describe("brave web search provider", () => {
global.fetch = priorFetch;
});
it("points provider metadata at the canonical Brave docs page", () => {
expect(createBraveWebSearchProvider().docsUrl).toBe(
"https://docs.openclaw.ai/tools/brave-search",
);
expect(createBraveWebSearchContractProvider().docsUrl).toBe(
"https://docs.openclaw.ai/tools/brave-search",
);
});
it("points missing-key users to fetch/browser alternatives", async () => {
vi.stubEnv("BRAVE_API_KEY", "");
const provider = createBraveWebSearchProvider();

View File

@@ -137,7 +137,7 @@ export function createBraveWebSearchProvider(): WebSearchProviderPlugin {
envVars: ["BRAVE_API_KEY"],
placeholder: "BSA...",
signupUrl: "https://brave.com/search/api/",
docsUrl: "https://docs.openclaw.ai/brave-search",
docsUrl: "https://docs.openclaw.ai/tools/brave-search",
autoDetectOrder: 10,
credentialPath: BRAVE_CREDENTIAL_PATH,
...createWebSearchProviderContractFields({

View File

@@ -15,7 +15,7 @@ export function createBraveWebSearchProvider(): WebSearchProviderPlugin {
envVars: ["BRAVE_API_KEY"],
placeholder: "BSA...",
signupUrl: "https://brave.com/search/api/",
docsUrl: "https://docs.openclaw.ai/brave-search",
docsUrl: "https://docs.openclaw.ai/tools/brave-search",
autoDetectOrder: 10,
credentialPath,
...createWebSearchProviderContractFields({