fix(search): share web search count schema limit · openclaw/openclaw@2fd7c05
clawsweeper
·
2026-05-01
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import { describe, expect, it } from "vitest"; |
2 | 2 | import { |
| 3 | +MAX_SEARCH_COUNT, |
3 | 4 | buildUnsupportedSearchFilterResponse, |
4 | 5 | isoToPerplexityDate, |
5 | 6 | normalizeToIsoDate, |
6 | 7 | normalizeFreshness, |
7 | 8 | } from "./web-search-provider-common.js"; |
8 | 9 | import { mergeScopedSearchConfig } from "./web-search-provider-config.js"; |
| 10 | +import { createWebSearchTool } from "./web-search.js"; |
| 11 | + |
| 12 | +describe("web_search tool schema", () => { |
| 13 | +it("advertises the shared runtime count limit", () => { |
| 14 | +const tool = createWebSearchTool(); |
| 15 | +const parameters = tool?.parameters as |
| 16 | +| { properties?: { count?: { maximum?: unknown } } } |
| 17 | +| undefined; |
| 18 | + |
| 19 | +expect(parameters?.properties?.count?.maximum).toBe(MAX_SEARCH_COUNT); |
| 20 | +}); |
| 21 | +}); |
9 | 22 | |
10 | 23 | describe("web_search freshness normalization", () => { |
11 | 24 | it("accepts Brave shortcut values and maps for Perplexity", () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。