From bb197706638cbfdfb2ca050ec4317f364e3d2993 Mon Sep 17 00:00:00 2001 From: Anibal Angulo Date: Sun, 22 Feb 2026 15:40:59 +0000 Subject: [PATCH] Update MCP defaults --- main.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 09ec35f..d7a7619 100644 --- a/main.py +++ b/main.py @@ -244,7 +244,10 @@ class GoogleCloudVectorSearch: json=payload, headers=headers, ) as response: - response.raise_for_status() + if not response.ok: + body = await response.text() + msg = f"findNeighbors returned {response.status}: {body}" + raise RuntimeError(msg) data = await response.json() neighbors = data.get("nearestNeighbors", [{}])[0].get("neighbors", []) @@ -281,6 +284,8 @@ class GoogleCloudVectorSearch: class Settings(BaseSettings): """Server configuration populated from environment variables.""" + model_config = {"env_file": ".env"} + project_id: str location: str bucket: str @@ -288,7 +293,7 @@ class Settings(BaseSettings): deployed_index_id: str endpoint_name: str endpoint_domain: str - embedding_model: str = "text-embedding-005" + embedding_model: str = "gemini-embedding-001" search_limit: int = 10 @@ -359,6 +364,7 @@ async def knowledge_search( contents=query, config=genai_types.EmbedContentConfig( task_type="RETRIEVAL_QUERY", + ), ) embedding = response.embeddings[0].values