Repository navigation
Replace Exa web search with TinyFish Search API integration - #51
Conversation
Swaps the exa-js dependency for the official @tiny-fish/sdk and reworks the webSearch tool around the TinyFish Search API. - add a lazy TinyFish client with a 15s timeout, since the SDK defaults to 10 minutes which is far too long for a tool call a user is waiting on - trim the result page client-side, as the Search API has no result-count parameter - map typed SDK errors (401/403/429/5xx, timeout, connection) to short messages instead of throwing out of the tool, and log the cause - return an explicit no-results message so the model does not invent sources - forward the optional purpose param for better result quality - add .env.example documenting every environment variable
feat: replace Exa web search with the TinyFish Search API
|
Warning Some commit messages in this PR do not follow the Conventional Commits specification. Expected format: 📋 Invalid commit messages
Tip Valid types: Note This is just a friendly reminder and will not block the PR from being merged. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
@calebephrem create the api key and put that thats all needed , web search will be free and quick now |
|
Note Linting checks passed successfully 🎉 All formatting and code quality checks are clean. You're good to merge 🚀 |
|
it was free before as well (lol) but anyways, have u tested the changes? |
|
This pull request replaces the previous Exa-based web search integration with the TinyFish Search API, updates related documentation and configuration, and removes the Exa dependency. The most important changes are grouped below:
Web Search Integration:
src/tools/websearch.tswith TinyFish Search API, including improved error handling, result formatting, and support for an optionalpurposeparameter to improve search relevance. Limits search results and snippet length for concise responses.src/utils/ai.tsto remove Exa client logic and add a configurable TinyFish client with a sensible timeout and retry strategy. [1] [2]Dependencies and Configuration:
exa-jspackage and adds@tiny-fish/sdkas a dependency inpackage.json..env.examplefile with clear instructions and required environment variables for TinyFish, OpenRouter, Groq, and Discord configuration.Documentation Updates:
README.mdto reference TinyFish instead of Exa, including badge, search provider explanation, and setup instructions for the new API key. [1] [2]