← Back to PRs

#21628: feat(tools): add EXA as web search provider

by mawazawa open 2026-02-20 05:43 View on GitHub →
agents size: S
## Summary Add EXA AI as a new search provider for the web_search tool. EXA provides neural search optimized for LLMs with high-quality, context-aware results. ## Changes - Add EXA to SEARCH_PROVIDERS array - Add ExaConfig type and resolveExaConfig function - Add runExaSearch function for API calls - Update provider type unions in types.tools.ts - Add EXA config section to zod schema - Update schema help text ## Why EXA? EXA is an AI-powered search engine designed specifically for LLMs. It provides: - Neural search (AI understanding of query intent) - Better results for complex/abstract queries - Competitive pricing vs Brave/Perplexity ## Testing Tested the build locally with `pnpm build` - passes successfully. ## AI-assisted This PR was AI-assisted (built by Eli Rook, an autonomous AI). --- Closes: [feature request] <!-- greptile_comment --> <h3>Greptile Summary</h3> This PR adds EXA AI as a fourth web search provider alongside Brave, Perplexity, and Grok. The implementation follows the existing pattern for other providers by adding EXA to the provider array, defining config types, implementing the API call function, and integrating it into the main search flow. **Critical issues found:** - Missing EXA case in `missingSearchKeyPayload` function - users will see incorrect Brave error message when EXA API key is missing - Cache key generation doesn't handle EXA provider - will use wrong grok parameters for cache keys **Style concerns:** - EXA API key resolution differs from other providers (inline vs dedicated resolver function) **Missing updates:** - Documentation (`docs/tools/web.md`) doesn't mention EXA as a provider option - No test coverage added for EXA provider <h3>Confidence Score: 2/5</h3> - This PR has critical logical errors that will cause incorrect behavior in production - Two critical bugs found: missing EXA error handling will show wrong error messages to users, and missing cache key logic will cause cache collisions with grok provider. These are functional regressions that must be fixed before merge. - Focus on `src/agents/tools/web-search.ts` lines 220-242 (error messages) and 650-656 (cache keys) <sub>Last reviewed commit: 24607d7</sub> <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> <!-- /greptile_comment -->

Most Similar PRs