From d60432b1e0d54275fd2620b691a78ed7e4961667 Mon Sep 17 00:00:00 2001 From: Eric Hare Date: Tue, 2 Dec 2025 13:26:35 -0800 Subject: [PATCH] Update provider_validation.py --- src/api/provider_validation.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/api/provider_validation.py b/src/api/provider_validation.py index cb3d571a..ed919277 100644 --- a/src/api/provider_validation.py +++ b/src/api/provider_validation.py @@ -365,18 +365,16 @@ async def _test_watsonx_embedding( # Ollama validation functions async def _test_ollama_lightweight_health(endpoint: str) -> None: - """Test Ollama availability with lightweight /api/tags endpoint. + """Test Ollama availability with lightweight status check. - This endpoint is very fast and doesn't block on active requests, - making it ideal for health checks when Ollama might be busy. + Only checks if the endpoint returns a 200 status without fetching data. """ try: ollama_url = transform_localhost_url(endpoint) - url = f"{ollama_url}/api/tags" async with httpx.AsyncClient() as client: response = await client.get( - url, + ollama_url, timeout=10.0, # Short timeout for lightweight check )