fix(gemini): pass search time filters

This commit is contained in:
Peter Steinberger
2026-05-02 05:00:31 +01:00
parent e93ff249b0
commit 20333bd58d
6 changed files with 242 additions and 9 deletions

View File

@@ -75,14 +75,16 @@ URLs.
## Supported parameters
Gemini search supports `query`.
Gemini search supports `query`, `freshness`, `date_after`, and `date_before`.
`count` is accepted for shared `web_search` compatibility, but Gemini grounding
still returns one synthesized answer with citations rather than an N-result
list.
Provider-specific filters like `country`, `language`, `freshness`, and
`domain_filter` are not supported.
`freshness` accepts `day`, `week`, `month`, `year`, and the shared shortcuts
`pd`, `pw`, `pm`, and `py`. OpenClaw converts these values, or an explicit
`date_after`/`date_before` range, into Gemini Google Search grounding's
`timeRangeFilter`. `country`, `language`, and `domain_filter` are not supported.
## Model selection

View File

@@ -300,7 +300,8 @@ show the `x_search` prompt.
freshness ranges require both start and end dates.
Gemini, Grok, and Kimi return one synthesized answer with citations. They
accept `count` for shared-tool compatibility, but it does not change the
grounded answer shape.
grounded answer shape. Gemini supports `freshness`, `date_after`, and
`date_before` by converting them to Google Search grounding time ranges.
Perplexity behaves the same way when you use the Sonar/OpenRouter
compatibility path (`plugins.entries.perplexity.config.webSearch.baseUrl` /
`model` or `OPENROUTER_API_KEY`).