Implement runtime check for EdgeDTO version support in health service
All checks were successful
Deploy mindnet to llm-node / deploy (push) Successful in 4s

- Added a verification step in the health endpoint to check if the service supports 'explicit:callout' for EdgeDTO, providing clearer diagnostics.
- Updated the health response to include messages based on the EdgeDTO version support status, enhancing user awareness of potential issues.
- Adjusted the test query endpoint to reflect the correct path for improved functionality.
This commit is contained in:
Lars 2026-01-12 15:34:56 +01:00
parent b8cb8bb89b
commit 36490425c5

View File

@ -27,6 +27,17 @@ try:
print(f" -> Version: {health_data.get('version')}") print(f" -> Version: {health_data.get('version')}")
print(f" -> Prefix: {health_data.get('prefix')}") print(f" -> Prefix: {health_data.get('prefix')}")
print(f" -> Qdrant: {health_data.get('qdrant')}") print(f" -> Qdrant: {health_data.get('qdrant')}")
# WP-24c v4.5.10: Prüfe EdgeDTO-Version im laufenden Service
edge_dto_supports = health_data.get('edge_dto_supports_callout')
if edge_dto_supports is not None:
if edge_dto_supports:
print(f" ✅ Service unterstützt 'explicit:callout' (zur Laufzeit verifiziert)")
else:
print(f" ❌ Service unterstützt NICHT 'explicit:callout' (alte Version im Speicher!)")
print(f" -> Aktion erforderlich: Cache leeren und Service neu starten")
else:
print(f" ⚠️ Health-Check meldet keine EdgeDTO-Version (alte API-Version?)")
else: else:
print(f" ⚠️ Service antwortet mit Status {response.status_code}") print(f" ⚠️ Service antwortet mit Status {response.status_code}")
print(f" -> Response: {response.text[:200]}") print(f" -> Response: {response.text[:200]}")
@ -40,14 +51,15 @@ except Exception as e:
# 2. Test: Versuche eine Test-Query mit explicit:callout Edge # 2. Test: Versuche eine Test-Query mit explicit:callout Edge
print("\n2. Test: Retrieval mit explicit:callout Edge:") print("\n2. Test: Retrieval mit explicit:callout Edge:")
print(" -> Sende Test-Query an /api/chat...") print(" -> Sende Test-Query an /chat/...")
try: try:
test_query = { test_query = {
"message": "Test query für EdgeDTO-Verifikation", "message": "Test query für EdgeDTO-Verifikation",
"explain": False "explain": False
} }
# WP-24c: Router ist mit prefix="/chat" eingebunden, Endpoint ist "/"
response = requests.post( response = requests.post(
"http://localhost:8001/api/chat", "http://localhost:8001/chat/",
json=test_query, json=test_query,
timeout=30 timeout=30
) )