Repository navigation
feat: add web_search.google_cse_base_url setting - #525
Open
Specstreamai wants to merge 1 commit into
Open
Specstreamai wants to merge 1 commit into
Specstreamai wants to merge 1 commit into
Conversation
Google ends the Custom Search JSON API for existing customers on January 1, 2027, and the Google path had no way to point at another host, so it would fail and drop to DuckDuckGo. Empty keeps Google's endpoint. Signed-off-by: Tarek Etman <tarek@specstream.ai>
ahmad-ajmal
approved these changes
Nov 13, 2026
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.
What
web_search.google_cse_base_url, read byget_web_search_cse_base_url()inapp/config.pynext toget_web_search_cse_id().google_cse_searchbuilds thecustomsearchclient withclient_options={"api_endpoint": ...}, so requests go to<base_url>/customsearch/v1with the samekey,cxandq. Empty keeps Google's endpoint.settings.json,_get_default_settings()and the settings manager defaults, and a line in both copies of theAGENT.mdsettings schema.Why
Google's overview page says "Existing Custom Search JSON API customers have until January 1, 2027 to transition to an alternative solution" (https://developers.google.com/custom-search/v1/overview). After that, anyone with a Google key and CSE ID gets a failed Google call on every search and quietly lands on the DuckDuckGo fallback, with nothing in settings to point the Google path elsewhere.
The client is built with
developerKey, and the library only looks up default credentials when there is no developer key (googleapiclient/discovery.py,if scopes and not developerKey), so the only thing that reaches a configured host is the same key that Google gets today.How to test
python -m pytest tests/test_web_search_cse_base_url.py -q: 2 passed. It runs the realweb_searchaction with the real discovery client and a recordinghttp, and checks the request URI starts withhttps://customsearch.googleapis.com/customsearch/v1?when the setting is empty and withhttps://cse.example.com/customsearch/v1?when it's set, with the result coming from that response and not the DuckDuckGo fallback.python -m pytest tests/test_action_set_loading.py -q: 11 passed. I didn't run the rest of the suite.ruff format --checkandruff checkclean on the changed files, andpython -m compileall -q app agent_core agents decorators skillspasses.Screenshots / Logs
Not UI-facing.
I run a search API that answers in the Custom Search JSON format, which is how I ran into the date.