Repository navigation
Conversation
MCP search endpoints report tool failures, such as an exhausted keyless quota, as a 200 response with isError. WebSearchMcp.call ignored the flag, so the provider's message was lost and the search reported "No search results found". Fail with the provider's message instead, and show it in the websearch tool error. Refs anomalyco#54311 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The following comment was made by an LLM, it may be inaccurate: |
|
Thanks for tracking this down and for the clear write-up and tests! I think this duplicates #50938, which is still open. It also makes MCP If you see something missing there, such as a provider case or a test like the ones you wrote here, a review, testing or a comment on #50938 would be very welcome. The |
|
#50938 was closed by the automated cleanup on 2026-10-23 without being merged, so the empty-results problem in #54311 is still unfixed on |
|
Hey, I'm Juampi from the Firecrawl team. Adding a Firecrawl-side data point in support of the reopen request above. In tests on Oct 25 and again today (Oct 26) with no Authorization header, {"result":{"content":[{"type":"text","text":"Anonymous keyless access is unavailable for this request.\n\nFix: Create an API key at https://firecrawl.dev/... and then:\n- Set the header: Authorization: Bearer YOUR_API_KEY ..."}],"isError":true}}On current |
|
Reopened as #59637, rebased on current |
Issue for this PR
Closes #54311 (the empty-results part; see below for what this leaves open)
Type of change
What does this PR do?
MCP search endpoints report tool failures as a 200 response whose result has
isError: true. Firecrawl and Exa do this when their keyless quota runs out, with a message like "You've hit Firecrawl's free MCP rate limit" (traced by @carson2222 in #54311).WebSearchMcp.callignored the flag. The adapter couldn't decode the message as results and returned[], so the tool said "No search results found. Please try a different query." and the model had no idea why.WebSearchMcp.callnow fails with aWebSearchMcp.ToolErrorthat carries the provider's text whenisErroris set. This covers every MCP-based provider (Exa, Parallel, Firecrawl, TinyFish). The websearch tool shows it asWeb search failed: <provider message>. Valid responses are unchanged.Not included: with
websearch.provider: "random", opencode still only switches providers on HTTP 429, so this error doesn't rotate to another provider. Rotating on it would change retry behavior, and I'm happy to follow up if you want that. The keyless-docs part of #54311 is also not covered here.How did you verify your code works?
test/plugin/websearch.test.ts: for each MCP provider, a 200 response withisError: truenow fails withToolErrorand the provider's message. These fail ondev, where the query succeeds with no results.test/tool-websearch.test.ts: the tool error message isWeb search failed: <provider message>. It fails without the tool change.packages/core(60) andbun typecheckinpackages/corepass.Screenshots / recordings
N/A
Checklist
🤖 Generated with Claude Code