mirror of
https://github.com/NCBM/plyngent.git
synced 2026-11-07 07:17:54 +08:00
core/config: default the local search to DeepSeek only
This commit is contained in:
@@ -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).
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user