The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test: registry zero-credential resolution may return a keyless-capable provider
Teknium08b7fad3a546
diff --git a/tests/plugins/web/test_web_search_provider_plugins.py b/tests/plugins/web/test_web_search_provider_plugins.pyindex 2314ca8a6d1..a24b303a5ef 100644--- a/tests/plugins/web/test_web_search_provider_plugins.py+++ b/tests/plugins/web/test_web_search_provider_plugins.py@@ -278,20 +278,21 @@ class TestRegistryResolution:def test_no_config_no_credentials_returns_none(self,) -> None:- """No backend configured AND no available providers → typically None.-- ``ddgs`` is the no-credential fallback; if its ``ddgs`` Python- package is installed in the test env, ddgs will be picked.- Otherwise the resolver returns None. Either outcome is correct.+ """No backend configured AND no credentials → keyless tier or ddgs.++ Resolution order with zero credentials: ddgs if its Python package+ is importable, else the keyless free tier (Parallel/Exa public+ endpoints — resolves with ``is_available() == False`` but+ ``is_keyless_available() == True``), else None (keyless tier+ disabled). All three outcomes are correct; a provider that is+ neither keyed nor keyless-capable means an env var leaked in."""_ensure_plugins_loaded()from agent.web_search_registry import _resolveresult = _resolve(None, capability="search")if result is not None:- # The only no-credential provider is ddgs; anything else- # means an env var leaked in.- assert result.is_available() is True+ assert result.is_available() or result.is_keyless_available()# ---------------------------------------------------------------------------