mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-10 22:32:16 +02:00
feat(agents): consolidate connectors under mcp_discovery; route web search through google_search
MCP consolidation: - Route all MCP-capable connectors (Slack, Jira, Linear, ClickUp, Airtable, Notion, Confluence, interim Gmail/Calendar, custom MCP) through a single `mcp_discovery` subagent. Drive/OneDrive/Dropbox stay native to enrich the KB. - Deprecate Discord/Teams/Luma: no viable official MCP server. Google-only web search: - Remove the main-agent `web_search` tool and the SearXNG platform service; all public web search now flows through the `google_search` subagent via task(). - Deprecate the Tavily/SearXNG/Linkup/Baidu search connectors (HTTP 410 on create, "Deprecated" badge); guide heavy users to the custom MCP connector. - Remove web search from anonymous chat (pure Q&A). - Tear SearXNG out of docker compose + install scripts; drop tavily-python and linkup-sdk deps and their config/env vars. Fix: - metrics._package_version() now swallows any metadata lookup failure. A malformed editable-install distribution with no `Version` field raised KeyError deep in importlib.metadata, and since it runs on every record_subagent_invoke_duration call it was crashing every task() delegation. Verified end-to-end against live GPT-5.4. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
ff2e5f390f
commit
ab747e7a49
206 changed files with 1704 additions and 7223 deletions
|
|
@ -166,8 +166,8 @@ class TestMetricHelpers:
|
|||
model="gpt-4o",
|
||||
provider="openai",
|
||||
)
|
||||
metrics.record_tool_call_duration(3.0, tool_name="web_search")
|
||||
metrics.record_tool_call_error(tool_name="web_search")
|
||||
metrics.record_tool_call_duration(3.0, tool_name="scrape_webpage")
|
||||
metrics.record_tool_call_error(tool_name="scrape_webpage")
|
||||
metrics.record_kb_search_duration(
|
||||
4.0,
|
||||
workspace_id=1,
|
||||
|
|
@ -278,3 +278,30 @@ class TestEnabledIntegration:
|
|||
sp.set_attribute("tool.truncated", False)
|
||||
with otel.model_call_span(model_id="m", provider="p") as sp:
|
||||
sp.set_attribute("retry.count", 3)
|
||||
|
||||
|
||||
class TestPackageVersionResilience:
|
||||
"""A version-tag lookup must never crash the request path (e.g. subagents).
|
||||
|
||||
An editable/dynamic install can have distribution metadata with no
|
||||
``Version`` field, which raises ``KeyError`` deep inside importlib.metadata.
|
||||
``_package_version`` must swallow that and every other lookup failure.
|
||||
"""
|
||||
|
||||
def test_missing_version_key_falls_back(
|
||||
self, monkeypatch: pytest.MonkeyPatch
|
||||
) -> None:
|
||||
def _raise_key_error(_name: str) -> str:
|
||||
raise KeyError("Version")
|
||||
|
||||
monkeypatch.setattr(metrics.metadata, "version", _raise_key_error)
|
||||
assert metrics._package_version() == "unknown"
|
||||
|
||||
def test_package_not_found_falls_back(
|
||||
self, monkeypatch: pytest.MonkeyPatch
|
||||
) -> None:
|
||||
def _raise_not_found(_name: str) -> str:
|
||||
raise metrics.metadata.PackageNotFoundError("surf-new-backend")
|
||||
|
||||
monkeypatch.setattr(metrics.metadata, "version", _raise_not_found)
|
||||
assert metrics._package_version() == "unknown"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue