From ad97dc0d3b7d8375c2d63d13d0f70a45d98fff2a Mon Sep 17 00:00:00 2001 From: ajaysi Date: Tue, 7 Apr 2026 06:56:32 +0530 Subject: [PATCH] Fix: Include podcast-enabled routers in podcast-only mode In podcast-only demo mode, core routers were being skipped entirely, which caused the voice clone endpoint (/onboarding/assets/create-voice-clone) to return 404. Now podcast-enabled routers from CORE_ROUTER_REGISTRY are included even in podcast-only mode. --- backend/app.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/backend/app.py b/backend/app.py index 1d9e96c9..669e1bef 100644 --- a/backend/app.py +++ b/backend/app.py @@ -421,9 +421,18 @@ async def onboarding_status(): # Include routers using modular utilities if PODCAST_ONLY_DEMO_MODE: + # In podcast-only mode, include only podcast-enabled routers from core registry + from alwrity_utils.router_manager import CORE_ROUTER_REGISTRY + podcast_routers = [r for r in CORE_ROUTER_REGISTRY if "podcast" in r.get("features", set())] + for entry in podcast_routers: + try: + router = router_manager._load_router_from_registry(entry) + router_manager.include_router_safely(router, entry["name"], entry.get("include_kwargs")) + except Exception as e: + logger.warning(f"{entry['name']} router not mounted: {e}") router_group_status["modular_core"] = { - "mounted": False, - "reason": "Skipped in podcast-only demo mode", + "mounted": True, + "reason": "Podcast routers only in podcast-only mode", } router_group_status["modular_optional"] = { "mounted": False,