"Vibe-Trading: Your Personal Trading Agent"
Python ai-agentalgorithmic-tradingbacktestingfintechllmmcpmulti-agentpythonquantitative-financetrading
fix(ci): lazy-import the endpoint guard, pin mcp 1.30 for Windows desktop
Haozhe Wu973303ddf1e8
diff --git a/agent/src/providers/llm.py b/agent/src/providers/llm.pyindex c08c9ca66..9f44e4553 100644--- a/agent/src/providers/llm.py+++ b/agent/src/providers/llm.py@@ -18,7 +18,6 @@ from urllib.parse import urlsplitfrom pydantic import PrivateAttrfrom src.config.accessor import get_env_config, reset_env_config-from src.providers.endpoint_guard import build_public_only_clients, proxy_appliesfrom src.providers.session_context import current_llm_session_idfrom src.providers.capabilities import (ProviderCapabilities,@@ -1778,6 +1777,10 @@ def build_llm(*, model_name: Optional[str] = None, callbacks: Any = None) -> Any_validate_explicit_headers(headers, source=f"{caps.name} provider configuration")kwargs["default_headers"] = headersdisable_proxy = get_env_config().llm.vibe_trading_disable_http_proxy+ if provider == "custom":+ # Imported here: the guard needs httpx/httpcore/anyio, and the+ # background-tool lifecycle checks import this module without them.+ from src.providers.endpoint_guard import build_public_only_clients, proxy_appliesif provider == "custom" and (disable_proxy or not proxy_applies(creds["base_url"])):# A saved custom endpoint is re-checked on every connection, so a# host that re-resolves to a private address later is refused.diff --git a/agent/tests/test_background_tools.py b/agent/tests/test_background_tools.pyindex e08aafcf9..af598c403 100644--- a/agent/tests/test_background_tools.py+++ b/agent/tests/test_background_tools.py@@ -14,6 +14,7 @@ from unittest.mock import MagicMockimport pytestfrom src.tools import background_tools+from tests.module_os_helpers import patch_module_osfrom src.tools.background_tools import BackgroundManager@@ -372,7 +373,7 @@ def test_timeout_stays_timeout_when_the_final_group_signal_is_refused(real_killpg(pid, sig)monkeypatch.setattr(background_tools, "_COMMAND_TIMEOUT_SECONDS", 0.5)- monkeypatch.setattr(background_tools.os, "killpg", killpg)+ patch_module_os(monkeypatch, background_tools, killpg=killpg)manager = BackgroundManager()task = _execute(manager, "slow", f"{shlex.quote(sys.executable)} -c 'import time; time.sleep(5)'")diff --git a/desktop/electron/requirements-windows-lock.txt b/desktop/electron/requirements-windows-lock.txtindex bbea6a58d..d5d2ce854 100644--- a/desktop/electron/requirements-windows-lock.txt+++ b/desktop/electron/requirements-windows-lock.txt@@ -1891,9 +1891,9 @@ matplotlib==3.11.1 \--hash=sha256:e4b9ac2f1f607ecda2af90a5232beee2af7582fce1cc30c4b6a1b012dc21ee99 \--hash=sha256:f2912f647f3fbe1ccf085f91e213936f9101bead81a5e670565b1f1b3712f4fb# via -r agent/requirements.txt-mcp==1.28.1 \- --hash=sha256:2726bca5e7193f61c5dde8b12500a6de2d9acf6d1a1c0be9e8c2e706437991df \- --hash=sha256:d51e36a5f5644faea4f85ea649bfffa6bc6c26770d42798ad6a3de3d2ba69683+mcp==1.30.0 \+ --hash=sha256:445414625fce5c295faa505bb11bacece661ab6f4028d57c935db57820b7a3e4 \+ --hash=sha256:666edb5009503e1047c9d60346a756f94b261f05cc2625f23d41c728ffc484d0# via fastmcp-slimmdurl==0.1.2 \--hash=sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8 \