diff --git a/backend/main.py b/backend/main.py index 5b5cd47..3ebd1fa 100644 --- a/backend/main.py +++ b/backend/main.py @@ -341,7 +341,7 @@ MEDIA_DIR = os.getenv("MEDIA_DIR", "/data/media") os.makedirs(MEDIA_DIR, exist_ok=True) app.mount("/media", StaticFiles(directory=MEDIA_DIR), name="media") -APP_VER = "825" # muss mit APP_VER in app.js übereinstimmen +APP_VER = "826" # muss mit APP_VER in app.js übereinstimmen @app.get("/.well-known/assetlinks.json") async def assetlinks(): diff --git a/backend/routes/ki.py b/backend/routes/ki.py index de82240..6521b90 100644 --- a/backend/routes/ki.py +++ b/backend/routes/ki.py @@ -276,11 +276,11 @@ async def ki_rasse_erkennung( # Rate-Limit prüfen remaining_before = _check_rasse_limit(user["id"]) - # Anthropic-Client holen (nutzt cached Instanz aus ki.py) - if not ki_module.ANTHROPIC_KEY: + # Anthropic-Key zur Laufzeit prüfen (nicht nur beim Modulstart) + import os as _os + api_key = _os.getenv("ANTHROPIC_KEY") or ki_module.ANTHROPIC_KEY + if not api_key: raise HTTPException(503, "KI-Bildanalyse ist momentan nicht verfügbar.") - - api_key = ki_module.ANTHROPIC_KEY base64_data = base64.standard_b64encode(content).decode("utf-8") prompt_text = """Analysiere dieses Bild und erkenne die Hunderasse(n). diff --git a/backend/static/index.html b/backend/static/index.html index 9238e01..cf2117f 100644 --- a/backend/static/index.html +++ b/backend/static/index.html @@ -101,9 +101,9 @@ - - - + + + @@ -583,10 +583,10 @@ - - - - + + + + diff --git a/backend/static/js/app.js b/backend/static/js/app.js index d739017..db6b183 100644 --- a/backend/static/js/app.js +++ b/backend/static/js/app.js @@ -3,7 +3,7 @@ Router, State-Management, Navigation, Initialisierung. ============================================================ */ -const APP_VER = '825'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '826'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const APP_VERSION = '1.5.0'; // ← semantische Version, wird bei make release gesetzt const IS_STAGING = location.hostname === 'staging.banyaro.app'; // Cache-Bust-Parameter nach Update-Reload sofort entfernen diff --git a/backend/static/sw.js b/backend/static/sw.js index ad67af4..5901c29 100644 --- a/backend/static/sw.js +++ b/backend/static/sw.js @@ -3,7 +3,7 @@ Offline-Cache + Push Notifications + Tile-Cache ============================================================ */ -const CACHE_VERSION = 'by-v825'; +const CACHE_VERSION = 'by-v826'; const CACHE_STATIC = `${CACHE_VERSION}-static`; const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten const CACHE_API = 'ban-yaro-api-v1'; // API-Response-Cache