mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 05:51:15 +08:00
test: tighten perplexity missing key assertion
This commit is contained in:
@@ -20,9 +20,11 @@ describe("perplexity web search provider", () => {
|
||||
throw new Error("Expected tool definition");
|
||||
}
|
||||
|
||||
await expect(tool.execute({ query: "OpenClaw docs" })).resolves.toMatchObject({
|
||||
await expect(tool.execute({ query: "OpenClaw docs" })).resolves.toEqual({
|
||||
error: "missing_perplexity_api_key",
|
||||
message: expect.stringContaining("use web_fetch for a specific URL or the browser tool"),
|
||||
message:
|
||||
"web_search (perplexity) needs an API key. Set PERPLEXITY_API_KEY or OPENROUTER_API_KEY in the Gateway environment, or configure tools.web.search.perplexity.apiKey. If you do not want to configure a search API key, use web_fetch for a specific URL or the browser tool for interactive pages.",
|
||||
docs: "https://docs.openclaw.ai/tools/web",
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user