diff --git a/docker-compose-cpu.yml b/docker-compose-cpu.yml index 6bda8fe1..b04be7b9 100644 --- a/docker-compose-cpu.yml +++ b/docker-compose-cpu.yml @@ -101,6 +101,7 @@ services: ports: - "7860:7860" environment: + - LANGFLOW_DEACTIVATE_TRACING=true - OPENAI_API_KEY=${OPENAI_API_KEY} - LANGFLOW_LOAD_FLOWS_PATH=/app/flows - LANGFLOW_SECRET_KEY=${LANGFLOW_SECRET_KEY} diff --git a/docker-compose.yml b/docker-compose.yml index 50ee0f41..f61e81a5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -101,6 +101,7 @@ services: ports: - "7860:7860" environment: + - LANGFLOW_DEACTIVATE_TRACING=true - OPENAI_API_KEY=${OPENAI_API_KEY} - LANGFLOW_LOAD_FLOWS_PATH=/app/flows - LANGFLOW_SECRET_KEY=${LANGFLOW_SECRET_KEY} diff --git a/frontend/components/docling-health-banner.tsx b/frontend/components/docling-health-banner.tsx index b15a009c..940e24cb 100644 --- a/frontend/components/docling-health-banner.tsx +++ b/frontend/components/docling-health-banner.tsx @@ -96,7 +96,10 @@ export function useDoclingHealth() { const { data: health, isLoading, isError } = useDoclingHealthQuery(); const isHealthy = health?.status === "healthy" && !isError; - const isUnhealthy = health?.status === "unhealthy" || isError; + // Only consider unhealthy if backend is up but docling is down + // Don't show banner if backend is unavailable + const isUnhealthy = health?.status === "unhealthy"; + const isBackendUnavailable = health?.status === "backend-unavailable" || isError; return { health, @@ -104,6 +107,7 @@ export function useDoclingHealth() { isError, isHealthy, isUnhealthy, + isBackendUnavailable, }; } diff --git a/frontend/src/app/api/queries/useDoclingHealthQuery.ts b/frontend/src/app/api/queries/useDoclingHealthQuery.ts index 8db560d0..e0f8ab0f 100644 --- a/frontend/src/app/api/queries/useDoclingHealthQuery.ts +++ b/frontend/src/app/api/queries/useDoclingHealthQuery.ts @@ -5,7 +5,7 @@ import { } from "@tanstack/react-query"; export interface DoclingHealthResponse { - status: "healthy" | "unhealthy"; + status: "healthy" | "unhealthy" | "backend-unavailable"; message?: string; } @@ -26,15 +26,23 @@ export const useDoclingHealthQuery = ( if (response.ok) { return { status: "healthy" }; + } else if (response.status === 503) { + // Backend is up but docling is down (backend returns 503 for docling issues) + return { + status: "unhealthy", + message: `Health check failed with status: ${response.status}`, + }; } else { + // Other backend errors - treat as docling unhealthy return { status: "unhealthy", message: `Health check failed with status: ${response.status}`, }; } } catch (error) { + // Network error - backend is likely down, don't show docling banner return { - status: "unhealthy", + status: "backend-unavailable", message: error instanceof Error ? error.message : "Connection failed", }; }