feat: make Serper base URL configurable via AGENT_SERPER_DEV_BASE_URL - #6290
Open
ivashhchenko wants to merge 1 commit into
Open
feat: make Serper base URL configurable via AGENT_SERPER_DEV_BASE_URL#6290ivashhchenko wants to merge 1 commit into
ivashhchenko wants to merge 1 commit into
Conversation
The Serper endpoint is hardcoded in the web-browsing agent plugin, so routing it through a proxy or a regional endpoint means patching the file. Follows the existing convention: AgentSearXNGApiUrl already registers a provider URL alongside its key in updateENV.js. Defaults to the current URL, so existing installs are unaffected. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
The Serper endpoint is hardcoded in the web-browsing agent plugin:
Anyone who needs that request to go elsewhere has to patch the file and carry the patch across upgrades. It comes up in a few ordinary situations: an egress proxy on a locked-down network, a regional endpoint for latency or data residency, and pointing the agent at a local mock during development so tests do not make live calls.
Approach
This follows the convention already in the codebase.
updateENV.jsregistersAgentSearXNGApiUrl → AGENT_SEARXNG_API_URL, a provider URL sitting next to its key — so Serper gets the same treatment:and the plugin reads it with the current URL as the default:
Files
server/utils/agents/aibitat/plugins/web-browsing.js— use the variableserver/utils/helpers/updateENV.js— register itserver/.env.example,docker/.env.example— document it next to the keyTen added lines, no new dependency. Trailing slashes are stripped so
https://host,https://host/andhttps://host///all behave the same, and an unset or empty value resolves to the current endpoint — behaviour is unchanged unless the variable is set.Happy to add a field to the Web Search admin screen in a follow-up if you would like it configurable from the UI rather than only through the environment.