Merge branch 'main' into agent-prompt

This commit is contained in:
Mike Fortman 2025-11-04 12:55:54 -06:00 committed by GitHub
commit 3d92814476
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 17 additions and 3 deletions

View file

@ -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}

View file

@ -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}

View file

@ -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,
};
}

View file

@ -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",
};
}