feat(eu-umbau): Umschalter fuer den KI-Weg in der Oberflaeche

Im Anlege- und Bearbeiten-Dialog einer Lage laesst sich jetzt waehlen, ob sie
ueber den heutigen Weg (Anthropic) oder den EU-Weg (Bedrock Frankfurt + staan)
laeuft; Standard bleibt die Vorgabe der Organisation. Dazu ai_backend in den
Schemas und den Lagen-Endpunkten (Create, Update, Ausgabe), Leerstring setzt
bewusst auf Standard zurueck. In der Lagen-Kopfzeile zeigt ein Kennzeichen
'EU' an, dass die Verarbeitung europaeisch laeuft.

UI-Sync: bewusst NUR online. Der Lokal-Fork hat kein Bedrock-Backend, dort
waere das Feld funktionslos (wie X-Zugaenge und Studio-Gating).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Dieser Commit ist enthalten in:
claude-dev
2026-07-30 21:25:59 +00:00
Ursprung b32c54b22c
Commit 8f5c0e9e5d
5 geänderte Dateien mit 48 neuen und 3 gelöschten Zeilen

Datei anzeigen

@@ -22,6 +22,7 @@ router = APIRouter(prefix="/api/incidents", tags=["incidents"])
INCIDENT_UPDATE_COLUMNS = {
"title", "description", "type", "status", "refresh_mode",
"refresh_interval", "refresh_start_time", "retention_days", "international_sources", "include_telegram", "include_x", "visibility",
"ai_backend",
}
@@ -89,7 +90,7 @@ async def list_incidents(
query = (
"SELECT id, title, description, type, status, refresh_mode, refresh_interval, "
"refresh_start_time, retention_days, visibility, "
"international_sources, include_telegram, include_x, created_by, created_at, updated_at, "
"international_sources, include_telegram, include_x, ai_backend, created_by, created_at, updated_at, "
"CASE WHEN summary IS NOT NULL AND summary != '' THEN 1 ELSE 0 END AS has_summary "
"FROM incidents WHERE tenant_id = ? AND (visibility = 'public' OR created_by = ?)"
)
@@ -121,8 +122,8 @@ async def create_incident(
cursor = await db.execute(
"""INSERT INTO incidents (title, description, type, refresh_mode, refresh_interval,
refresh_start_time, retention_days, international_sources, include_telegram, include_x, visibility,
tenant_id, created_by, created_at, updated_at)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)""",
ai_backend, tenant_id, created_by, created_at, updated_at)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)""",
(
data.title,
data.description,
@@ -135,6 +136,7 @@ async def create_incident(
1 if data.include_telegram else 0,
1 if data.include_x else 0,
data.visibility,
data.ai_backend or None,
tenant_id,
current_user["id"],
now,
@@ -385,6 +387,9 @@ async def update_incident(
continue
if field in ("international_sources", "include_telegram", "include_x"):
updates[field] = 1 if value else 0
elif field == "ai_backend":
# Leerstring = "Vorgabe der Organisation", wird als NULL gespeichert.
updates[field] = value or None
else:
updates[field] = value