diff --git a/backend/routers/prompts.py b/backend/routers/prompts.py index 8a9992a..5571324 100644 --- a/backend/routers/prompts.py +++ b/backend/routers/prompts.py @@ -30,9 +30,9 @@ from placeholder_resolver import ( OPENROUTER_KEY = os.getenv("OPENROUTER_API_KEY") OPENROUTER_MODEL = os.getenv("OPENROUTER_MODEL", "anthropic/claude-sonnet-4") -router = APIRouter(prefix=”/api/prompts”, tags=[“prompts”]) +router = APIRouter(prefix="/api/prompts", tags=["prompts"]) -# Metadaten-Schlüssel in workflow aggregate_results (nicht als „einziger” Nutzer-Output) +# Metadaten-Schlüssel in workflow aggregate_results (nicht als „einziger“ Nutzer-Output) _WORKFLOW_AGG_META_KEYS = frozenset({ "combined_analysis", "all_signals", @@ -1547,17 +1547,6 @@ async def execute_unified_prompt_stream( ) conn.commit() - # Client (EventSource) wartet auf dieses Event; ohne Payload schließt der Stream - # und der Browser feuert onerror → „Connection to server lost“. - try: - sse_payload = json.loads(json.dumps(result, default=str)) - except (TypeError, ValueError): - sse_payload = {"type": result.get("type", "unknown"), "error": "result_not_serializable"} - await event_queue.put({ - "type": "execution_complete", - "result": sse_payload, - }) - except Exception as e: # Queue error event await event_queue.put({