Skip to content

Add LangSearch as web search provider#265

Merged
virattt merged 3 commits into
virattt:mainfrom
Aditya190803:main
May 12, 2026
Merged

Add LangSearch as web search provider#265
virattt merged 3 commits into
virattt:mainfrom
Aditya190803:main

Conversation

@Aditya190803
Copy link
Copy Markdown
Contributor

This pull request adds support for the LangSearch web search provider throughout the codebase. The changes ensure that LangSearch is available as a selectable search provider, can be configured via environment variables, and is fully integrated into the tool registry and UI.

Integration of LangSearch as a web search provider:

  • Added a new langSearchTool in src/tools/search/langsearch.ts, implementing the API call and result formatting for LangSearch.
  • Updated the tool registry in src/tools/registry.ts to register LangSearch as a provider if the LANGSEARCH_API_KEY is set.
  • Exported langSearchTool from src/tools/search/index.ts for use elsewhere in the codebase.

User interface and configuration updates:

  • Included LangSearch in the provider selection UI and logic in src/components/select-list.ts and src/controllers/search-selection.ts, allowing users to select and configure it.
  • Extended the SearchProviderId type and the SEARCH_PROVIDERS mapping in src/utils/env.ts to include LangSearch and its environment variable.
  • Added LANGSEARCH_API_KEY to the example environment file for configuration guidance.

Aditya190803 and others added 3 commits May 12, 2026 21:36
… nits

The per-query Agent.create call invokes getToolRegistry, which reads
process.env fresh. saveApiKeyToEnv reloads .env into process.env via
dotenv override. So no provider needs a restart — replace the misleading
"Restart Dexter to use X" message (carved out only for perplexity, now
also langsearch) with a single accurate "X is now active" confirmation.

Also:
- Rename langSearchTool -> langSearch to match exaSearch/tavilySearch/
  perplexitySearch
- Sync description "content summaries" -> "content snippets" for
  consistency with other web_search providers
- Add trailing newline to langsearch.ts

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The previous commit replaced "Restart Dexter to use X" with
"X is now active" but kept routing through onError, which logs at
ERROR level and renders as "Error: ..." in red. Removing the
confirmation entirely matches perplexity's longstanding silent-success
path; the selector overlay closes on commit and /search shows the
active provider with a checkmark, so implicit feedback is sufficient.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Owner

@virattt virattt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@virattt virattt merged commit beb5f36 into virattt:main May 12, 2026
2 checks passed
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.

2 participants