Skip to content

feat(web): expose limit for web_search#16934

Merged
teknium1 merged 2 commits into
mainfrom
hermes/hermes-3194bcd3
Apr 28, 2026
Merged

feat(web): expose limit for web_search#16934
teknium1 merged 2 commits into
mainfrom
hermes/hermes-3194bcd3

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Salvages #16808 by @BlackishGreen33 onto current main, plus a docs follow-up.

Summary

Adds optional limit (1-100, default 5) to the web_search tool schema and documents query operators in both the schema description and the built-in tools reference page.

Changes

  • tools/web_tools.py: schema gains optional limit, handler forwards args.get("limit", 5), runtime clamp to 1..100 before backend call, description mentions site:, filetype:, intitle:, -term, exact phrases (backend-dependent).
  • tests/tools/test_web_tools_config.py: 4 new tests (schema shape, handler default, handler forwards limit, runtime clamp).
  • website/docs/reference/tools-reference.md: web_search row updated to match new description.

Validation

  • scripts/run_tests.sh tests/tools/test_web_tools_config.py -q → 49 passed.
  • Per-backend inner clamps (Parallel/Tavily max_results=20) remain intact; outer clamp to 100 just caps agent-requested values.

Closes #16696. Credits @BlackishGreen33 — commit authorship preserved via rebase merge.

@teknium1 teknium1 merged commit 4148e85 into main Apr 28, 2026
8 of 12 checks passed
@teknium1 teknium1 deleted the hermes/hermes-3194bcd3 branch April 28, 2026 09:09
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have tool/web Web search and extraction labels Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low — cosmetic, nice to have tool/web Web search and extraction type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Expose limit parameter and document query operators in web_search tool

4 participants