From e640bb5e184c19a659a45d3327924b321f8892a3 Mon Sep 17 00:00:00 2001 From: kshitijk4poor <82637225+kshitijk4poor@users.noreply.github.com> Date: Fri, 10 Jul 2026 18:59:38 +0530 Subject: [PATCH] test(web): cover model-facing dict URL dispatch --- tests/tools/test_web_tools_dict_urls.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/tools/test_web_tools_dict_urls.py b/tests/tools/test_web_tools_dict_urls.py index 026376426ba..93fb69924eb 100644 --- a/tests/tools/test_web_tools_dict_urls.py +++ b/tests/tools/test_web_tools_dict_urls.py @@ -94,3 +94,17 @@ async def test_web_extract_reports_invalid_items_without_dispatching_them(extrac "Invalid URL item at index 3: expected a URL string or an object " "with a string 'url' or 'href' field", ] + + +def test_web_extract_registry_dispatch_accepts_search_result_objects( + extract_provider, +): + """The model-facing registry path preserves object URLs through dispatch.""" + raw = web_tools.registry.dispatch("web_extract", { + "urls": [{"url": "https://example.net/from-registry", "title": "R"}], + }) + assert isinstance(raw, str) + result = json.loads(raw) + + assert extract_provider.received_urls == ["https://example.net/from-registry"] + assert result["results"][0]["url"] == "https://example.net/from-registry"