From b92a5d5b0eb821d33b090b4e0938b4cc16941ec1 Mon Sep 17 00:00:00 2001 From: Anibal Angulo Date: Sun, 22 Feb 2026 16:34:24 +0000 Subject: [PATCH] Move config validation to top-level --- main.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main.py b/main.py index 6c8fde6..d445db8 100644 --- a/main.py +++ b/main.py @@ -310,8 +310,6 @@ class AppContext: @asynccontextmanager async def lifespan(_server: FastMCP) -> AsyncIterator[AppContext]: """Create and configure the vector-search client for the server lifetime.""" - cfg = Settings.model_validate({}) - vs = GoogleCloudVectorSearch( project_id=cfg.project_id, location=cfg.location, @@ -349,6 +347,7 @@ def _parse_args() -> argparse.Namespace: _args = _parse_args() +cfg = Settings.model_validate({}) mcp = FastMCP( "knowledge-search",