SIGN IN SIGN UP
yichuan-w / LEANN UNCLAIMED

[MLsys2026]: RAG on Everything with LEANN. Enjoy 97% storage savings while running a fast, accurate, and 100% private RAG application on your personal device.

0 0 212 Python

feat: re-add web search with robust dual-source routing (#283)

Re-introduces web search (Serper API) and page fetching (Jina Reader)
to the ReAct agent with improvements over the reverted PR #232:

- Dynamic prompt adapts tool list based on API key availability
- Graceful fallback when web_search is called without SERPER_API_KEY
- Error responses from Serper (401, etc.) handled without crashing
- visit_page errors (404, network) caught and surfaced to the LLM
- search_history entries include 'source' field (local/web)
- CLI gains --serper-api-key and --jina-api-key flags
- 13 comprehensive tests covering all routing and edge case scenarios

Closes #283

Made-with: Cursor
A
Aakash Suresh committed
c5cf08cd2530a7eb0292ff5f0a3eb406c2b16eb7
Parent: 9a15f10