Skip to content

feat(core): add Linkup web search - #49231

Open
shauryajain21 wants to merge 1 commit into
anomalyco:v2from
shauryajain21:linkup-websearch
Open

shauryajain21 wants to merge 1 commit into
anomalyco:v2from
shauryajain21:linkup-websearch

Conversation

@shauryajain21

Copy link
Copy Markdown

Issue for this PR

Closes # (none — feature PR)

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

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 the linkup integration (key + LINKUP_API_KEY env methods) and the linkup provider. It calls POST https://api.linkup.so/v1/search with depth: "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 existing WebSearch.RequestError path like Firecrawl does.
  • Results map nametitle and contentcontent; non-text result types (images) are dropped since the result shape has no place for them.
  • Registered in WebSearchPlugins. The session-ui / TUI labels are already dynamic and capitalize linkup → "Linkup" correctly.
  • Added a Linkup row to the providers table in services/www/src/docs/content/websearch.mdx (and dropped the hard-coded "four" count, which was already stale).

How did you verify your code works?

  • New test in packages/core/test/plugin/websearch.test.ts covering integration registration, request body, no bearer header without a key, bearer header with a key, the name/content mapping, 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.ts in packages/core: 13 pass.
  • bun typecheck in packages/core.
  • Live requests through the provider with a real FetchHttpClient and the same host wiring as the tests: no key → WebSearch.Request error with HTTP 402; with a key → 8 results with titles, URLs and content. Also confirmed the LINKUP_API_KEY env method is picked up automatically.

Screenshots / recordings

Not a UI change beyond the provider appearing in the selection list.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant