Commit Graph

240 Commits

Author SHA1 Message Date
ajaysi
bcf62017aa Merge remote-tracking branch 'origin/codex/review-flat-file-context-system-implementation' 2026-04-19 15:57:25 +05:30
ajaysi
e704aa7d87 Podcast Maker: Fix progress modals, research JSON, header stepper, voice/podcastMode chips 2026-04-19 13:16:59 +05:30
ي
79f26c815b feat: add static triage and structural reader with tests 2026-04-10 21:03:39 +05:30
ي
e2726805f3 test: add VFS regression tests for retrieval and collaboration 2026-04-08 18:20:07 +05:30
ajaysi
e59c77b221 feat: Improve podcast maker UX and fix bugs
Frontend:
- Add progress modals with educational content for analysis and voice cloning
- Improve tab navigation in AnalysisPanel (combine Titles, Hook, CTA into one tab)
- Fix tab styling to make inactive tabs visible
- Fix avatar 'Make Presentable' not updating preview (blob URL handling)
- Improve mobile responsiveness for avatar tabs
- Clean up verbose console logging (AnalysisPanel, demoMode, RobustCamera)
- Add sequential progress messages instead of cycling

Backend:
- Fix 'Depends object has no attribute get' error in auth and image editing
- Use get_session_for_user instead of get_db outside FastAPI DI context
- Reduce WARNING logs to DEBUG in audio handler
- Add proper emphasis boolean handling in script generation
- Add missing fields to PodcastScene and PodcastSceneLine models
- Fix voice cloning cost estimate display issue
2026-04-07 16:28:11 +05:30
ajaysi
813f9acc34 Fix: Improve error handling for image editing when API keys are missing
- Fix database session handling in main_image_editing.py to use proper generator handling
- Add graceful handling of validation errors in podcast-only mode
- Add better error messages when WAVESPEED_API_KEY or HF_TOKEN is missing
- Add specific HTTP 503 error for configuration issues
- Add ALWRITY_SKIP_IMAGE_EDITING_VALIDATION env var to bypass validation in dev
2026-04-07 11:57:35 +05:30
ajaysi
0e3a611e57 Fix video preflight: use importlib.metadata instead of deprecated pkg_resources 2026-04-06 14:37:50 +05:30
ajaysi
aa2317c359 fix(backend): lazy-load PersonaAnalysisService in podcast mode, preserve PORT from Render 2026-04-05 15:28:49 +05:30
ajaysi
dcb7d28e03 fix: handle existing indexes in podcast-only mode, skip startup health 2026-04-04 11:31:30 +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
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
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
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
004506cf9a fix: Add missing strict_provider_mode variable definition 2026-03-31 07:34:14 +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
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
ي
4e0f176842 Add strict Stripe checkout guard via env flag 2026-03-30 07:51:45 +05:30
ajaysi
557f700f68 fix: Resolve APIProvider enum mismatch causing dashboard errors
- Fix import path in subscriptions.py (pricing_service location)
- Add values_callable to APIUsageLog.provider enum column
- Normalize provider values to lowercase in usage trends helpers
- Add migration script for existing databases
2026-03-29 12:50:50 +05:30
ajaysi
d6ad903e3d feat: Improve image generation prompts with visual data extraction
- Add dedicated image_generation module with statistical extraction
- Support 16 industry domains with visual concept detection
- Add model-specific guidance for Ideogram, FLUX, GLM, Qwen, MAI
- Extract statistics, rankings, comparisons, and trends automatically
- Refactor backend/api/images.py to use new module
2026-03-29 10:16:40 +05:30
ajaysi
f503a24b3b feat: Add Auto-Dubbing feature for Podcast Maker
This commit adds the Auto-Dubbing feature for Podcast Maker with support
for translating podcast audio to different languages with optional voice
cloning to preserve the original speaker's voice.

New Features:
- Translation Service (common module): DeepL integration for low-cost
  translation, WaveSpeed integration for high-quality translation
- Audio Dubbing Service: STT -> Translate -> TTS pipeline with
  voice cloning support
- 9 new API endpoints for dubbing and voice cloning
- Support for 34+ languages
- Cost estimation utilities
- Comprehensive documentation

Files Added:
- services/translation/ (5 files): Translation service module
- services/dubbing/: Audio dubbing service
- api/podcast/handlers/dubbing.py: API endpoints
- docs/AUTO_DUBBING.md: Feature documentation
- CHANGELOG.md: Change log

Files Modified:
- api/podcast/models.py: Added dubbing request/response models
- api/podcast/router.py: Added dubbing routes
- services/__init__.py: Export translation and dubbing services
- scene_animation.py: Fixed missing Path import
2026-03-24 15:45:51 +05:30
ajaysi
51bc76345f Add new analytics modules from PR #436
- backend/services/analytics/opportunity_scorer.py: Functions for scoring and ranking
  opportunities from search queries (high_impression_low_ctr_queries,
  rising_queries, declining_pages, score_and_rank_opportunities,
  categorize_opportunities)
- backend/services/gsc_service.py: GSC (Google Search Console) service
2026-03-22 11:36:38 +05:30
ajaysi
b28dc4b5f6 Add startup health module and readiness endpoint from PR #434
- Add services/startup_health.py with health check functions:
  - get_startup_status(): Returns current startup status
  - readiness_under_auth_context(): Validates tenant DB under auth context
  - run_startup_health_routine(): Runs all startup health checks
- Add /health/readiness endpoint for tenant DB validation
- Update startup_event() to use run_startup_health_routine()
- Add raise to startup_event to fail fast on errors
2026-03-22 11:33:20 +05:30
ajaysi
e8f282b7a9 Enhance main_text_generation with APIKeyManager and improved provider routing
- Import APIKeyManager for provider key checking
- Use APIKeyManager.get_api_key() instead of get_api_key() function
- Add wavespeed provider to available_providers check
- Add detailed provider preflight logging with flow_type tag
- Improve fallback logic when preferred provider is unavailable

These improvements come from PRs #423-#431 while maintaining the modular textgen_utils structure.
2026-03-22 11:23:38 +05:30
ajaysi
a26fa84263 Extract useful LLM provider improvements from PRs #423-#429
huggingface_provider.py:
- Add retry logic with _should_retry_hf_error and _is_non_retryable_hf_error
- Update default models from :groq to :cerebras (HF_FALLBACK_MODELS)
- Add fallback_models parameter to huggingface_text_response
- Add get_available_models with updated model list

main_text_generation.py:
- Add GPT_PROVIDER and TEXTGEN_AI_MODELS env var support
- Add preferred_provider and flow_type parameters to llm_text_gen
- Add HF_MODEL_MAPPING for short model name resolution
- Add flow_type logging tag for better observability

sif_agents.py:
- Add LOW_COST_SHARED_REMOTE_MODELS for SIF agents
- Update SharedLLMWrapper to use preferred_hf_models and flow_type

These changes preserve the modular textgen_utils structure while incorporating
the useful routing and retry logic improvements from the pending PRs.
2026-03-22 11:16:48 +05:30
ajaysi
16be2b21f4 Fix user data endpoints to require authenticated user ID
- Add get_current_user authentication to all user data endpoints
- Pass authenticated user_id from auth context to service methods
- Add proper HTTPException handling for missing data
- Fix user_id type from int to str in service methods
- Ensure endpoints only return data for authenticated user
2026-03-22 11:02:35 +05:30
ajaysi
d557bd4918 Fix merge conflicts and resolve circular import issues
- Resolve conflict markers in logging_config.py, main.py, app.py
- Fix circular imports in story_writer services (image/audio/video generation)
  by using lazy imports for get_story_media_write_dir
- Restore clean versions of:
  - sif_agents.py
  - tenant_provider_config.py
  - personalization_service.py
  - huggingface_provider.py
  - main_text_generation.py
  - logger_utils.py
- Use setup_clean_logging() consistently across app.py and main.py
- Restore verbose_mode handling in start_alwrity_backend.py
2026-03-22 10:45:05 +05:30
ajaysi
c429c90860 "Merge_PR_421_structured_routing_logs_with_clean_modular_architecture" 2026-03-12 17:19:44 +05:30
ajaysi
27700ce272 "Add_structured_routing_logs_to_modular_text_generation" 2026-03-12 17:15:11 +05:30
ajaysi
482a600e14 "Add_structured_routing_logs_to_text_generation_modular" 2026-03-12 17:12:15 +05:30
ajaysi
e85c7d442e "Replace_main_text_generation.py_with_clean_modular_version" 2026-03-12 17:09:19 +05:30
ajaysi
1829f47893 "Extract_text_generation_utilities_into_modular_structure" 2026-03-12 16:59:45 +05:30
ajaysi
54396b8268 Merge_PR_420_add_tenant_aware_provider_config_resolver_across_llm_facades 2026-03-12 16:44:41 +05:30
ajaysi
f36cd8eea9 "Recreate_huggingface_provider_clean_functional_version" 2026-03-12 16:40:53 +05:30
ajaysi
1d68db8151 Merge_PR_437_repair_huggingface_provider_and_restore_explicit_retry_fallback 2026-03-12 16:36:37 +05:30
ي
968900858c Repair huggingface provider and restore explicit retry/fallback behavior 2026-03-12 16:29:50 +05:30
ajaysi
4d90a80b9c Merge_PR_419_refine_hf_provider_retries_and_client_reuse 2026-03-12 16:22:48 +05:30
ajaysi
acf526e7e1 Merge_PR_418_refine_hf_fallback_policy_and_sif_low_cost_routing 2026-03-12 16:19:19 +05:30
ajaysi
679c0e8c89 Merge_PR_417_centralized_text_routing_policy 2026-03-12 16:08:40 +05:30
ajaysi
8d421a158f Merge_PR_416_fix_textgen_ai_models_mapping 2026-03-12 16:05:47 +05:30
ajaysi
acc5e1f72c Merge_PR_415_enforce_runtime_only_workspace_creation 2026-03-12 16:01:23 +05:30
ajaysi
f1ee8fce50 Merge_PR_414_standardize_tenant_db_directory 2026-03-12 15:55:00 +05:30
ajaysi
e7171df5db Merge branch 'pr-413' 2026-03-12 15:46:43 +05:30