ENG-847: Fix scratchpad web_search() on the minds-cloud gateway#258
Open
ea-rus wants to merge 1 commit into
Open
ENG-847: Fix scratchpad web_search() on the minds-cloud gateway#258ea-rus wants to merge 1 commit into
ea-rus wants to merge 1 commit into
Conversation
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.
Problem
Scratchpad
web_search()returns an empty string under the minds-cloud provider (thestandard config), so the agent silently loses web access and falls back to scraping.
Affects real cowork/anton usage, not just evals.
Cause: the scratchpad picks its web "flavor" by provider name, but
OpenAIProvider.nameis always
"openai"even on the minds gateway — so it chose the OpenAI Responses API anddispatched web_search to an endpoint the minds gateway doesn't implement (minds serves it
over the chat.completions passthrough) → empty. The gateway itself is fine (a direct
chat.completions call with
tools=[{"type":"web_search"}]returns real results).Fix
Resolve the flavor by HOST, not provider name: minds/mdb.ai base URL → passthrough.
Extracted as
OpenAIProvider.resolve_web_flavor(), called fromscratchpad_boot.py.All prior cases unchanged; only the broken
openai-name + minds-base case now works.Repro
cowork-server on
minds_cloud, then in the scratchpad:print(repr(web_search("current US CPI year-over-year rate")))Before:
''. After: a non-empty answer with sources.Tests
tests/test_scratchpad_flavor.py(new, 7 cases);test_scratchpad.py+test_web_tools.pystill green (107 passed).
Fixes https://linear.app/mindsdb/issue/ENG-847/scratchpad-web-search-silently-returns-empty-on-the-minds-cloud