From 9742a1ae7ac5f1c1c183c87ea0a2c395767946f4 Mon Sep 17 00:00:00 2001 From: worldmozara Date: Sat, 17 Oct 2026 17:06:56 +0800 Subject: [PATCH] core/config: default the local search to DeepSeek only --- src/plyngent/config/models.py | 15 ++++++++------- tests/test_config/test_routing.py | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/plyngent/config/models.py b/src/plyngent/config/models.py index cec9669..e7a1eec 100644 --- a/src/plyngent/config/models.py +++ b/src/plyngent/config/models.py @@ -392,10 +392,10 @@ def _default_deepseek_models() -> dict[str, ModelConfig]: def _default_deepseek_search_sources() -> list[SearchSource]: """Sources for the local ``web_search`` tool, in fallback order. - DeepSeek's own index (the platform Search API) first, Bing's RSS as the - backstop when a search fails or finds nothing. + DeepSeek's own index (the platform Search API) is the default. Bing's RSS is + a brittle, SEO-heavy backstop: list ``"bing"`` explicitly to opt in. """ - return ["deepseek", "bing"] + return ["deepseek"] class DeepseekProvider(ProviderConfig, tag="deepseek"): @@ -411,10 +411,11 @@ class DeepseekProvider(ProviderConfig, tag="deepseek"): disables the hosted one). DeepSeek hosts a search only on the Anthropic surface; every other convention gets a local ``web_search`` tool instead (see ``config.routing.local_web_search``). ``search_sources`` names what - that local tool searches with, in fallback order — ``["deepseek", "bing"]`` - by default (the platform Search API, then Bing's RSS), ``[]`` to not offer - it. The two settings are independent: turning hosted tools off on the - Anthropic convention leaves the local Search API tool in place. + that local tool searches with, in fallback order — ``["deepseek"]`` by + default (the platform Search API), ``[]`` to not offer it. ``"bing"`` adds + Bing's RSS as an opt-in backstop. The two settings are independent: turning + hosted tools off on the Anthropic convention leaves the local Search API tool + in place. ``extras`` keeps arbitrary provider keys; the legacy ``extras.convention`` key is parsed but ignored (prefer the typed ``convention`` field). diff --git a/tests/test_config/test_routing.py b/tests/test_config/test_routing.py index 81a5bd9..e1ca52a 100644 --- a/tests/test_config/test_routing.py +++ b/tests/test_config/test_routing.py @@ -61,7 +61,7 @@ def test_without_search_sources_there_is_no_local_tool() -> None: # for a search (the hosted path on the Anthropic convention is unaffected). assert _effective(convention="responses", sources=[]).search_sources == [] assert local_web_search(_effective(convention="responses", sources=[])) is False - assert _effective(convention="responses").search_sources == ["deepseek", "bing"] + assert _effective(convention="responses").search_sources == ["deepseek"] def test_api_base_url_drops_the_convention_and_version_paths() -> None: