Skip to content

feat: support configurable Serper base URL - #600

Open
litescraper wants to merge 1 commit into
LibreChat-AI:mainfrom
litescraper:feat/serper-base-url
Open

litescraper wants to merge 1 commit into
LibreChat-AI:mainfrom
litescraper:feat/serper-base-url

Conversation

@litescraper

Copy link
Copy Markdown

Summary

Support any Serper.dev-compatible endpoint (like litescrape.com, serpbase.dev, serpensapi.org, and others).

The Serper integration currently hardcodes its host. Allowing a configurable base URL lets deployments choose a compatible provider based on pricing and availability while retaining the existing search tools.

Set SERPER_BASE_URL to the provider?s base URL, without a search-type route, and configure its API key through the existing credentials. Trailing slashes are removed, and the integration appends /search, /images, /videos, or /news according to the requested search type.

When the setting is unset or empty, the integration continues using https://google.serper.dev. Document the setting in the README.

Validation

  • Existing adjacent search suites: 47 passed.
  • Type checking and focused ESLint passed.
  • Local HTTP checks exercised the actual Serper implementation and response parsing for all four routes.
  • An authenticated web search against a real Serper-compatible endpoint passed with safeSearch: 0.
  • No tests added.

Compatibility

Package publishing and LibreChat dependency updates are outside this change.

This branch has not been deployed

No deployments
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