Commit Graph

894 Commits

Author SHA1 Message Date
ajaysi
22c31e6c77 fix: default PORT to 10000 for Render 2026-04-04 12:02:09 +05:30
ajaysi
249a1962d4 fix: add REACT_APP_API_URL to vercel.json for production 2026-04-04 11:53:57 +05:30
ajaysi
dcb7d28e03 fix: handle existing indexes in podcast-only mode, skip startup health 2026-04-04 11:31:30 +05:30
ajaysi
26e1f08ebb debug: add logging to trace REACT_APP_ENABLED_FEATURES 2026-04-04 11:15:40 +05:30
ajaysi
fcf00cd20d fix: add REACT_APP_ENABLED_FEATURES to vercel.json 2026-04-04 08:24:21 +05:30
ajaysi
b8ffda1cbb fix: detect cloud by PORT env, not RENDER 2026-04-04 08:06:25 +05:30
ajaysi
6d5ae8d2fa fix: set ALWRITY_ENABLED_FEATURES=podcast in Procfile 2026-04-04 07:34:10 +05:30
ajaysi
c5e2fc3514 fix: require REACT_APP_API_URL in production, throw clear error if missing 2026-04-04 07:08:34 +05:30
ajaysi
a3e4f5231a fix: unify API URL config to use REACT_APP_API_URL 2026-04-04 06:54:23 +05:30
ajaysi
a8c80c5b75 fix: add missing App components for Vercel deployment 2026-04-03 18:32:22 +05:30
ajaysi
027638dfb9 fix: use legacy-peer-deps in Vercel build 2026-04-03 18:18:54 +05:30
ajaysi
4fbbe9c8b4 fix: Render PORT binding and Recharts TypeScript errors 2026-04-03 13:02:59 +05:30
ajaysi
3f2d9104d9 fix: ensure HOST defaults to 0.0.0.0 and add debug logging for PORT 2026-04-03 08:23:36 +05:30
ajaysi
d34dc651b1 Revert "chore: add dependency update workflow and fix urllib3 version"
This reverts commit 0d2d9b220e.
2026-04-03 07:50:27 +05:30
ajaysi
0d2d9b220e chore: add dependency update workflow and fix urllib3 version 2026-04-03 07:08:29 +05:30
ajaysi
92ac410707 fix: additional podcast service updates 2026-04-03 07:00:14 +05:30
ajaysi
63bb937796 feat: podcast demo mode with ALWRITY_ENABLED_FEATURES support
- Add ALWRITY_ENABLED_FEATURES env var for feature gating
- Podcast-only mode: skip LLM bootstrap, scheduler, persona services
- Enhance video generation prompt with scene context, analysis, narration
- Add voice cloning support via custom_voice_id in WaveSpeed
- Add text-to-speech for research results (browser speechSynthesis)
- Fix render queue to sync images from script phase
- Add WaveSpeed LLM pricing (gpt-oss-120b)
- Fix podcast bible generation error handling
- Refactor RouterManager for feature-based router loading
2026-04-03 06:59:59 +05:30
ajaysi
c52b1eabc9 Remove hardcoded huggingface provider from all podcast handlers
- script.py: set preferred_provider=None to respect GPT_PROVIDER
- research.py: set preferred_provider=None to respect GPT_PROVIDER
- Now all podcast handlers use GPT_PROVIDER env var
2026-04-01 06:55:31 +05:30
ajaysi
746a5eeeb9 Fix LLM provider selection in podcast handlers
- Remove hardcoded preferred_provider=huggingface in podcast handlers
- Set preferred_provider=None to respect GPT_PROVIDER env var
- Change default model from Qwen to gpt-oss-120b:cerebras (the model user had access to)
- WaveSpeed will now use gpt-oss-120b model instead of Qwen
2026-04-01 06:54:37 +05:30
ajaysi
d06ab77e60 Improve podcast avatar display and info banner
- Avatar images now use full available width (max 280px, responsive)
- Auto-collapse info banner after 8 seconds
- Add 'Show tips' link to expand collapsed info
- Fix image sizing to use contain instead of cover for better visibility
2026-03-31 20:13:24 +05:30
ajaysi
f737b24b49 Require podcast avatar before enabling Analyze & Continue button
- canSubmit now checks for avatar presence (uploaded, brand, or generated)
- Checks avatarFile, avatarUrl, avatarPreview, brandAvatarFromDb, brandAvatarBlobUrl
- Updated tooltip to reflect new requirement
2026-03-31 19:53:09 +05:30
ajaysi
4c206293b1 Fix error handling in main_text_generation.py
- Add HTTPException re-raise before generic Exception handler
- Use static error message instead of str(e) which was out of scope
- Fixes 'e is not associated with a value' error
2026-03-31 19:38:54 +05:30
ajaysi
35fd700b22 Propagate LLM errors in podcast handlers to frontend
- analysis.py: enhance_podcast_idea now re-raises HTTPException (429)
- analysis.py: analyze_podcast_idea already re-raises HTTPException
- research.py: re-raise HTTPException instead of silent fallback
- script.py: re-raise HTTPException instead of generic 500

Ensures 429 errors with usage_info reach frontend for modal display
2026-03-31 19:32:23 +05:30
ajaysi
49e0ee8e9e Consolidate on ALWRITY_ENABLED_FEATURES - remove all legacy support
Backend:
- Remove all legacy env var fallbacks (ALWRITY_FEATURE_PROFILE, ALWRITY_ROUTER_PROFILE, etc)
- Remove get_active_profile() from start_alwrity_backend.py
- Remove _env_flag_enabled() from app.py
- Use ALWRITY_ENABLED_FEATURES as single source of truth

Frontend:
- demoMode.ts now uses only REACT_APP_ENABLED_FEATURES
- Removed all legacy fallback keys (app_mode, demo_mode, podcast_only_demo_mode)

Usage:
  ALWRITY_ENABLED_FEATURES=podcast     # Podcast only
  ALWRITY_ENABLED_FEATURES=all        # All features (default)
2026-03-31 18:51:30 +05:30
ajaysi
edd92ec85b Deprecate legacy feature flags, use ALWRITY_ENABLED_FEATURES only
- Remove fallback to ALWRITY_FEATURE_PROFILE, ALWRITY_ROUTER_PROFILE
- Primary env var is now ALWRITY_ENABLED_FEATURES (backend)
- Primary env var is REACT_APP_ENABLED_FEATURES (frontend)
- Add deprecation comments to all get_enabled_features() functions
- Update demoMode.ts with clear deprecation notes

Usage:
  ALWRITY_ENABLED_FEATURES=podcast      # Podcast only
  ALWRITY_ENABLED_FEATURES=all          # All features (default)
2026-03-31 18:45:52 +05:30
ajaysi
cd06c6aaa8 Consolidate feature flags to ALWRITY_ENABLED_FEATURES
Backend:
- Add get_enabled_features() returning set from ALWRITY_ENABLED_FEATURES
- Update router registry to use 'features' instead of 'profiles'
- Support feature names: podcast, blog-writer, youtube, story-writer, etc
- Update bootstrap gating to use enabled features
- Update PODCAST_ONLY_DEMO_MODE to check new flag first
- Add backwards compatibility with legacy env vars

Frontend:
- Update demoMode.ts to use REACT_APP_ENABLED_FEATURES
- Add getEnabledFeatures() and isFeatureEnabled() utilities

Usage:
  ALWRITY_ENABLED_FEATURES=all          # All features (default)
  ALWRITY_ENABLED_FEATURES=podcast      # Podcast only
  ALWRITY_ENABLED_FEATURES=podcast,core # Podcast + core features
2026-03-31 18:40:54 +05:30
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