Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.
Python agentagent-osaiai-agentsai-partnerchatopsclaudeclaude-codecodexdevtoolsdiscord-botlark-botllmlocal-firstlong-term-memoryopencodeslack-botvibe-codingvibeywechat
fix(ui): load the test client only when a test builds one (#2922)
Call Whiteaa3b34447cf1
diff --git a/tests/test_ui_server_reload.py b/tests/test_ui_server_reload.pyindex 2090c649b..98a44d639 100644--- a/tests/test_ui_server_reload.py+++ b/tests/test_ui_server_reload.py@@ -2,6 +2,11 @@ from __future__ import annotationsimport threading+# These tests monkeypatch ``threading.Thread`` before building their first test+# client. The app loads Starlette's client lazily, and its request portal comes+# from ``anyio.from_thread``, which binds ``threading.Thread`` at import; load it+# here, before any patch, so anyio keeps the real thread class.+import fastapi.testclient # noqa: F401from config.v2_config import (AgentsConfig,PlatformsConfig,diff --git a/vibe/ui_compat.py b/vibe/ui_compat.pyindex cde3f4ef8..9cc12dde3 100644--- a/vibe/ui_compat.py+++ b/vibe/ui_compat.py@@ -13,7 +13,6 @@ from urllib.parse import urlsplitfrom fastapi import FastAPI, Request as FastAPIRequestfrom fastapi.responses import FileResponse, JSONResponse, RedirectResponse, Response as StarletteResponse-from fastapi.testclient import TestClientfrom starlette.concurrency import run_in_threadpoolfrom starlette.exceptions import HTTPExceptionfrom starlette.datastructures import Headers, QueryParams, URL@@ -279,6 +278,11 @@ class CompatTestResponse:class CompatTestClient:def __init__(self, app: "CompatApp") -> None:+ # Imported here, not at module load: Starlette deprecates its httpx-based+ # TestClient with a warning on import, and every service and CLI process+ # imports this module while only tests construct a client.+ from fastapi.testclient import TestClient+self._client = TestClient(app)self._lock = threading.Lock()