Commit Graph

868 Commits

Author SHA1 Message Date
ajaysi
9f0298725a Return 429 with usage_info when all LLM providers fail
- Returns HTTP 429 (usage limit) instead of 503 for provider failures
- Includes usage_info with error_type, operation_type, and suggestion
- Frontend SubscriptionContext can now display the modal
2026-03-31 18:30:47 +05:30
ajaysi
971b4362c5 Enhance logging for provider selection and error handling
- Log gpt_provider and model in preflight info
- Return structured HTTP 503 with actionable error details
- Include available_providers, requested_provider, and suggestion
- Help users understand what went wrong and how to fix it
2026-03-31 18:29:54 +05:30
ajaysi
5ad0f13482 Improve error messages when all LLM providers fail
- Return 503 with structured error details instead of generic RuntimeError
- Include available_providers and requested_provider in error
- Add actionable suggestions for users
- Check if no providers configured and return specific error
2026-03-31 18:29:22 +05:30
ajaysi
7f626d47b4 Respect GPT_PROVIDER env var for text generation
- Add GPT_PROVIDER wavespeed/openai support in main_text_generation.py
- wavespeed_text_response now called when GPT_PROVIDER=wavespeed
- Fallback to tenant config when no GPT_PROVIDER set
- Add wavespeed provider mapping in provider_enum
- Fix generate_image() call to use options dict in podcast analysis
2026-03-31 18:20:56 +05:30
ajaysi
92bcd27004 Fix generate_image() call in podcast analysis handler
Use options dict instead of direct width/height params to match
the generate_image() function signature in main_image_generation.py
2026-03-31 18:16:19 +05:30
ajaysi
bf6cdf1109 Add startup summary for active profile, routers, and bootstraps
- Add BootstrapResult dataclass for structured bootstrap results
- bootstrap_linguistic_models() and bootstrap_local_llm_models() return BootstrapResult
- Set ALWRITY_ACTIVE_PROFILE env var at startup and print active profile
- Set ALWRITY_BOOTSTRAP_SUMMARY with JSON summary of bootstrap results
- Print bootstrap summary at startup
- Track skipped_routers in RouterManager with reasons
- Add log_startup_summary() to log enabled/skipped/failed routers
- Call log_startup_summary() in app.py after router inclusion
2026-03-31 15:23:41 +05:30
ajaysi
08e51f76fa Profile-aware bootstrap gating in start_alwrity_backend.py
- Add LINGUISTIC_REQUIRED_FEATURES set for profile-based gating
- Add get_active_profile() helper to read from ALWRITY_ACTIVE_PROFILE, ALWRITY_PROFILE, ALWRITY_FEATURE_PROFILE
- Add get_loaded_features() to read from ALWRITY_LOADED_FEATURES
- Add should_bootstrap_linguistic_models() - runs for all/default or when loaded features intersect linguistic-required
- Add should_bootstrap_local_llm_models() - skip for podcast/youtube/planning profiles
- Gate bootstrap steps at module load time
2026-03-31 15:18:03 +05:30
ajaysi
dee4387b0b Add feature-profile endpoint and env-driven optional router profiles
- Add ALWRITY_FEATURE_PROFILE env var (precedence over ALWRITY_ROUTER_PROFILE)
- Add OPTIONAL_MODULE_MATRIX defining 'all' and 'default' profiles
- Add get_feature_profile_status() to RouterManager
- Add GET /api/feature-profile/status endpoint in main.py and app.py
- Returns active profile and enabled optional modules
2026-03-31 15:15:50 +05:30
ajaysi
c7013a71df Refactor RouterManager to registry-driven loading with profile gates
- Add CORE_ROUTER_REGISTRY and OPTIONAL_ROUTER_REGISTRY for declarative router config
- Add profile gating via ALWRITY_ROUTER_PROFILE / ALWRITY_FEATURE_TO_ENABLE
- Only include routers whose profiles match active profile (podcast profile includes subscription, podcast)
- Use dynamic import_module for lazy loading
- Support include_kwargs for routers needing special args (youtube, research_config)
- Simplify include_core_routers and include_optional_routers to use registry

Reduces router_manager.py from 272 to ~156 lines.
2026-03-31 15:09:53 +05:30
ajaysi
5ac1b9439d Add profile-driven feature runtime utilities
- Add feature_registry.py with FeatureGroup definitions for core, podcast, youtube, content_planning
- Add feature_profiles.py to parse ALWRITY_FEATURE_TO_ENABLE env var
- Add feature_runtime.py with is_enabled(), get_enabled_routers() helpers
- Fix syntax error in __init__.py (duplicate OnboardingManager)

Enables feature toggles via ALWRITY_FEATURE_TO_ENABLE environment variable.
2026-03-31 15:04:05 +05:30
ajaysi
bf980ab89b fix: In demo mode, redirect to podcast-maker when no subscription data 2026-03-31 14:43:23 +05:30
ajaysi
45aefd0590 fix: Remove Navigate return from useEffect, use early return instead 2026-03-31 14:33:05 +05:30
ajaysi
f53b53a543 fix: Fix TypeScript error in useEffect by moving checkout redirect outside 2026-03-31 14:32:04 +05:30
ajaysi
d28daca2e1 fix: Redirect to podcast-maker after Stripe checkout in demo mode
- Update PricingPage success_url to point to podcast-maker in demo mode
- Handle ?subscription=success query param in InitialRouteHandler
2026-03-31 14:30:55 +05:30
ajaysi
2c3fe33c75 fix: Add missing setAnnouncementSeverity parameter to announceError calls 2026-03-31 12:12:45 +05:30
ajaysi
dd1e398fa2 Merge PR #458: Adjust missing API-key logging in injection middleware 2026-03-31 12:11:37 +05:30
ajaysi
dfccf53d18 Merge PR #457: Fix onboarding loading gate for inactive subscriptions 2026-03-31 07:57:41 +05:30
ajaysi
9d04ffb63a fix: Add error handling and display for podcast workflow failures
- Improve error message handling for common API failures
- Add announcementSeverity state for error/success styling
- Display errors with red alert styling in podcast dashboard
2026-03-31 07:52:42 +05:30
ajaysi
004506cf9a fix: Add missing strict_provider_mode variable definition 2026-03-31 07:34:14 +05:30
ي
11966cf341 Adjust missing API-key logging in injection middleware 2026-03-31 07:33:42 +05:30
ي
a0efdb5001 Fix onboarding loading gate for inactive subscriptions 2026-03-31 07:33:17 +05:30
ajaysi
8b8730ae9f fix: Don't wait for onboarding data in demo mode, prevents infinite loading 2026-03-31 06:59:46 +05:30
ajaysi
66faff9051 fix: Add podcast-only demo mode frontend integration
- Skip onboarding in demo mode, redirect to podcast-maker
- Demo mode checks localStorage and env vars
- Remove mock subscription - use real subscription flow
2026-03-31 06:48:24 +05:30
ajaysi
f0b78f5cbe fix: Skip subscription check in demo mode, allow access with mock subscription 2026-03-30 16:32:18 +05:30
ajaysi
43c6ceab2f fix: Skip onboarding calls in podcast-only demo mode
- Add demoMode utility for consistent demo mode detection
- Skip onboarding API calls in OnboardingContext when in demo mode
- Redirect to /podcast-maker instead of /onboarding in demo mode
2026-03-30 09:38:48 +05:30
ajaysi
92bbe1d878 Merge PR #456: Add forced user_id lint check and demo router gating 2026-03-30 08:18:50 +05:30
ي
636989f75b Add forced user_id lint check and demo router gating 2026-03-30 08:13:48 +05:30
ajaysi
5706b85a4e Merge PR #455: Use tenant sessions for API key context and add startup key readiness check 2026-03-30 08:11:35 +05:30
ي
3a92c4af1a Use tenant sessions for API key context and add startup key readiness check 2026-03-30 08:09:28 +05:30
ajaysi
2a41e94c07 Merge PR #454: Use tenant-scoped dubbed audio paths with safe file resolution 2026-03-30 08:07:39 +05:30
ي
27c167ebe8 Use tenant-scoped dubbed audio paths with safe file resolution 2026-03-30 08:07:01 +05:30
ajaysi
e3ba7893ca Merge PR #453: Restrict podcast task status access by owner 2026-03-30 08:06:27 +05:30
ي
b54c2978c3 Restrict podcast task status access by owner 2026-03-30 08:05:44 +05:30
ajaysi
92cbd682a5 Merge PR #452: Add podcast billing verification sequence runner 2026-03-30 08:02:50 +05:30
ي
6555a722d3 Add podcast billing verification sequence runner 2026-03-30 08:01:57 +05:30
ajaysi
cbcb896d24 Merge PR #451: Fail demo startup when required API routes are missing 2026-03-30 07:56:43 +05:30
ي
ef7874dcdc Fail demo startup when required API routes are missing 2026-03-30 07:56:05 +05:30
ajaysi
e64aea484f Merge PR #450: Add strict Stripe checkout guard via env flag 2026-03-30 07:54:42 +05:30
ajaysi
8828e982f8 Merge PR #449: Feature-flag pricing tier availability for alpha/demo modes 2026-03-30 07:52:39 +05:30
ي
4e0f176842 Add strict Stripe checkout guard via env flag 2026-03-30 07:51:45 +05:30
ajaysi
bbb46ca9d1 fix: Add podcast-only demo mode readiness patches
- Patch pricing redirect to route to podcast-maker instead of onboarding
- Allow all plan tiers in demo mode (remove alpha restriction)
- Add Stripe mode warning in demo when key is missing
- Add startup router mount assertions for subscription and podcast
- Add smoke test script for demo mode validation
2026-03-30 07:50:58 +05:30
ي
d1ff406d03 Feature-flag pricing tier availability for alpha/demo modes 2026-03-30 07:49:56 +05:30
ajaysi
643e9ad2f3 Merge PR #448: Add mode-aware pricing redirect for podcast demo flow 2026-03-30 07:48:37 +05:30
ي
cadcb8077d Add mode-aware pricing redirect for podcast demo flow 2026-03-30 07:48:00 +05:30
ajaysi
2b11814fb8 Merge PR #447: Add podcast demo mode deployment flag guidance 2026-03-30 07:44:35 +05:30
ajaysi
5965e123b9 Merge PR #446: Add podcast-only demo mode visibility and router status 2026-03-30 07:43:46 +05:30
ي
b93a4d2a67 docs: add podcast demo mode deployment flag guidance 2026-03-30 07:41:46 +05:30
ajaysi
c652c0d149 Merge PR #445: Ensure subscription router is always mounted without duplicates 2026-03-30 07:39:33 +05:30
ي
d13cce7a46 Ensure subscription router is always mounted without duplicates 2026-03-30 07:38:19 +05:30
ajaysi
6596a0515a Merge PR #444: Guard onboarding manager behind podcast-only demo mode 2026-03-30 07:36:26 +05:30