Skip to content

ENG-847: Fix scratchpad web_search() on the minds-cloud gateway#258

Open
ea-rus wants to merge 1 commit into
stagingfrom
fix/eng847-web_search-returns-empty
Open

ENG-847: Fix scratchpad web_search() on the minds-cloud gateway#258
ea-rus wants to merge 1 commit into
stagingfrom
fix/eng847-web_search-returns-empty

Conversation

@ea-rus

@ea-rus ea-rus commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Problem

Scratchpad web_search() returns an empty string under the minds-cloud provider (the
standard 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.name
is always "openai" even on the minds gateway — so it chose the OpenAI Responses API and
dispatched 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 from scratchpad_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.py
still green (107 passed).

Fixes https://linear.app/mindsdb/issue/ENG-847/scratchpad-web-search-silently-returns-empty-on-the-minds-cloud

@ea-rus
ea-rus requested a review from StpMax July 17, 2026 15:53
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