feat(core): add Linkup web search - #49231
Open
shauryajain21 wants to merge 1 commit into
Open
shauryajain21 wants to merge 1 commit into
shauryajain21 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes # (none — feature PR)
Type of change
What does this PR do?
Adds Linkup as a built-in web search provider, in the same shape as
tavily.ts.packages/core/src/plugin/websearch/linkup.ts: registers thelinkupintegration (key +LINKUP_API_KEYenv methods) and thelinkupprovider. It callsPOST https://api.linkup.so/v1/searchwithdepth: "standard",outputType: "searchResults",maxResults: 8, and sends the credential as a bearer token when one is connected. Linkup has no keyless mode, so without a credential the request is sent unauthenticated (Linkup returns 402), which surfaces through the existingWebSearch.RequestErrorpath like Firecrawl does.name→titleandcontent→content; non-textresult types (images) are dropped since the result shape has no place for them.WebSearchPlugins. The session-ui / TUI labels are already dynamic and capitalizelinkup→ "Linkup" correctly.Linkuprow to the providers table inservices/www/src/docs/content/websearch.mdx(and dropped the hard-coded "four" count, which was already stale).How did you verify your code works?
packages/core/test/plugin/websearch.test.tscovering integration registration, request body, no bearer header without a key, bearer header with a key, thename/contentmapping, image-result filtering, and that the key does not leak into the response. Linkup is also added to the shared 429 cooldown test.bun test test/plugin/websearch.test.tsinpackages/core: 13 pass.bun typecheckinpackages/core.FetchHttpClientand the same host wiring as the tests: no key →WebSearch.Requesterror with HTTP 402; with a key → 8 results with titles, URLs and content. Also confirmed theLINKUP_API_KEYenv method is picked up automatically.Screenshots / recordings
Not a UI change beyond the provider appearing in the selection list.
Checklist