Commit Graph

134 Commits

Author SHA1 Message Date
IGNY8 VPS (Salman)
9ca048fb9d Phase 3 - credts, usage, plans app pages #Migrations 2026-01-06 21:28:13 +00:00
IGNY8 VPS (Salman)
dc7a459ebb django admin Groups reorg, Frontend udpates for site settings, #Migration runs 2026-01-05 01:21:52 +00:00
IGNY8 VPS (Salman)
c4de8994dd image gen mess 2026-01-03 22:31:30 +00:00
IGNY8 VPS (Salman)
f518e1751b IMage genartion service and models revamp - #Migration Runs 2026-01-03 20:08:16 +00:00
IGNY8 VPS (Salman)
a1016ec1c2 wokring models and image genration model and admin apges 2026-01-03 17:28:18 +00:00
IGNY8 VPS (Salman)
1632ee62b6 imp part 4 2025-12-30 13:14:21 +00:00
IGNY8 VPS (Salman)
51950c7ce1 imp part 3 2025-12-30 10:28:24 +00:00
IGNY8 VPS (Salman)
2af7bb725f master plan implemenattion 2025-12-30 08:51:31 +00:00
IGNY8 VPS (Salman)
53fdebf733 automation and ai and some planning and fixes adn docs reorg 2025-12-29 01:41:36 +00:00
IGNY8 VPS (Salman)
0605f650b1 notifciations issues fixed final 2025-12-28 00:52:14 +00:00
IGNY8 VPS (Salman)
a1ec3100fd Phase 1: Progress modal text, SiteSerializer fields, Notification store, SiteCard checklist
- Improved progress modal messages in ai/engine.py (Section 4)
- Added keywords_count and has_integration to SiteSerializer (Section 6)
- Added notificationStore.ts for frontend notifications (Section 8)
- Added NotificationDropdownNew component (Section 8)
- Added SiteSetupChecklist to SiteCard in compact mode (Section 6)
- Updated api.ts Site interface with new fields
2025-12-27 17:40:28 +00:00
IGNY8 VPS (Salman)
b0c14ccc32 content view template final version 2025-12-25 04:06:19 +00:00
IGNY8 VPS (Salman)
826ad89a3e Remove aws-admin pattern completely - use account + GlobalIntegrationSettings
ARCHITECTURE FIX:
- aws-admin IntegrationSettings will NEVER exist (it's a legacy pattern)
- Only user's own account IntegrationSettings can exist (if they override defaults)
- Otherwise GlobalIntegrationSettings is used directly
- API keys are ALWAYS from GlobalIntegrationSettings (accounts cannot override API keys)

REMOVED:
- All aws-admin Account lookups
- All aws-admin IntegrationSettings fallback attempts
- Confusing nested try/except chains

CORRECT FLOW NOW:
1. Try account's IntegrationSettings for config overrides
2. Use GlobalIntegrationSettings for missing values and ALL API keys
3. No intermediate aws-admin lookups
2025-12-25 02:11:21 +00:00
IGNY8 VPS (Salman)
504d0174f7 Fix image generation: escape JSON in prompt template + GlobalIntegrationSettings fallback
ROOT CAUSES IDENTIFIED:
1. GlobalAIPrompt template had unescaped JSON braces that broke Python's .format()
   - Python treats {...} as placeholders, causing KeyError when rendering
   - Escaped JSON braces to {{...}} while preserving {title}, {content}, {max_images}

2. Image functions hardcoded aws-admin IntegrationSettings which didn't exist
   - Functions failed when aws-admin account had no IntegrationSettings
   - Added GlobalIntegrationSettings fallback for all missing values

CHANGES:
- Fixed GlobalAIPrompt.image_prompt_extraction template in database (escaped JSON)
- Updated generate_image_prompts._get_max_in_article_images() with fallback
- Updated generate_images.prepare_data() with fallback for all image settings
- Updated tasks.process_image_generation_queue() with fallback for config + API keys

TESTED: Template rendering now works, GlobalIntegrationSettings.max_in_article_images=4
2025-12-25 02:09:29 +00:00
IGNY8 VPS (Salman)
5299fd82eb Revert image prompt changes - investigate original issue 2025-12-25 01:59:23 +00:00
IGNY8 VPS (Salman)
abeede5f04 image prompt issues 2025-12-25 01:17:41 +00:00
IGNY8 VPS (Salman)
64e76f5436 fixed final with new model config and tokens 2025-12-24 15:33:17 +00:00
IGNY8 VPS (Salman)
02d4f1fa46 AI MODELS & final updates - feat: Implement AI Model Configuration with dynamic pricing and REST API
- Added AIModelConfig model to manage AI model configurations in the database.
- Created serializers and views for AI model configurations, enabling read-only access via REST API.
- Implemented filtering capabilities for model type, provider, and default status in the API.
- Seeded initial data for text and image models, including pricing and capabilities.
- Updated Django Admin interface for managing AI models with enhanced features and bulk actions.
- Added validation methods for model and image size checks.
- Comprehensive migration created to establish the AIModelConfig model and seed initial data.
- Documented implementation and validation results in summary and report files.
2025-12-24 13:37:36 +00:00
IGNY8 VPS (Salman)
0a12123c85 gloabl api key issue, credit service issue, credit cost basedon tokens all fixed 2025-12-24 00:23:23 +00:00
IGNY8 VPS (Salman)
7a1e952a57 feat: Add Global Module Settings and Caption to Images
- Introduced GlobalModuleSettings model for platform-wide module enable/disable settings.
- Added 'caption' field to Images model to store image captions.
- Updated GenerateImagePromptsFunction to handle new caption structure in prompts.
- Enhanced AIPromptViewSet to return global prompt types and validate active prompts.
- Modified serializers and views to accommodate new caption field and global settings.
- Updated frontend components to display captions and filter prompts based on active types.
- Created migrations for GlobalModuleSettings and added caption field to Images.
2025-12-20 21:34:59 +00:00
IGNY8 VPS (Salman)
9e8ff4fbb1 globals 2025-12-20 19:49:57 +00:00
IGNY8 VPS (Salman)
3283a83b42 feat(migrations): Rename indexes and update global integration settings fields for improved clarity and functionality
feat(admin): Add API monitoring, debug console, and system health templates for enhanced admin interface

docs: Add AI system cleanup summary and audit report detailing architecture, token management, and recommendations

docs: Introduce credits and tokens system guide outlining configuration, data flow, and monitoring strategies
2025-12-20 12:55:05 +00:00
IGNY8 VPS (Salman)
ab0d6469d4 bulk actions & some next audits docs 2025-12-20 02:46:00 +00:00
IGNY8 VPS (Salman)
c17b22e927 credits adn tokens final correct setup 2025-12-20 00:36:23 +00:00
IGNY8 VPS (Salman)
71fe687681 image max count 2025-12-17 13:06:42 +00:00
IGNY8 VPS (Salman)
1993d45f32 12 2025-12-17 12:54:12 +00:00
IGNY8 VPS (Salman)
8c1d933647 max iamges 2025-12-17 12:35:43 +00:00
IGNY8 VPS (Salman)
62e55389f9 Add support for GPT-5.1 and GPT-5.2: update token limits and pricing 2025-12-17 11:11:11 +00:00
IGNY8 VPS (Salman)
e43f8553b6 ai repsosne timeout increased to 180s 2025-12-17 08:12:10 +00:00
IGNY8 VPS (Salman)
7ad06c6227 Refactor keyword handling: Replace 'intent' with 'country' across backend and frontend
- Updated AutomationService to include estimated_word_count.
- Increased stage_1_batch_size from 20 to 50 in AutomationViewSet.
- Changed Keywords model to replace 'intent' property with 'country'.
- Adjusted ClusteringService to allow a maximum of 50 keywords for clustering.
- Modified admin and management commands to remove 'intent' and use 'country' instead.
- Updated serializers to reflect the change from 'intent' to 'country'.
- Adjusted views and filters to use 'country' instead of 'intent'.
- Updated frontend forms, filters, and pages to replace 'intent' with 'country'.
- Added migration to remove 'intent' field and add 'country' field to SeedKeyword model.
2025-12-17 07:37:36 +00:00
IGNY8 VPS (Salman)
9656643f0f fixes of ai toke limit standrd 8192 2025-12-17 00:36:18 +00:00
IGNY8 VPS (Salman)
8f97666522 testign promtps 2025-12-17 00:09:07 +00:00
IGNY8 VPS (Salman)
aa48a55504 sideabar fixed in dhjanog 2025-12-14 23:43:10 +00:00
IGNY8 VPS (Salman)
a6fab8784d lamost fully fixed umfold template 2025-12-14 17:30:10 +00:00
IGNY8 VPS (Salman)
aba2c7da01 image genreation normal user permission fix 2025-12-10 14:52:31 +00:00
IGNY8 VPS (Salman)
7a35981038 feat(multi-tenancy): implement critical fixes for orphaned users and permissions
- Simplified HasTenantAccess permission logic to ensure every authenticated user has an account.
- Added fallback to system account for OpenAI settings in AI configuration.
- Allowed any authenticated user to check task progress in IntegrationSettingsViewSet.
- Created a script to identify and fix orphaned users without accounts.
- Updated error response handling in business endpoints for clarity.
2025-12-10 09:51:06 +00:00
IGNY8 VPS (Salman)
65fea95d33 Refactor API permissions and throttling: Updated default permission classes to enforce authentication and tenant access. Introduced new permission for system accounts and developers. Enhanced throttling rates for various operations to reduce false 429 errors. Improved API key loading logic to prioritize account-specific settings, with fallbacks to system accounts and Django settings. Updated integration views and sidebar to reflect new permission structure. 2025-12-07 17:23:42 +00:00
IGNY8 VPS (Salman)
40dfe20ead fina autoamtiona adn billing and credits 2025-12-04 15:54:15 +00:00
IGNY8 VPS (Salman)
39df00e5ae 8 Phases refactor 2025-12-03 16:08:02 +00:00
IGNY8 VPS (Salman)
aa8b8a9756 more fixes 2025-12-03 10:29:13 +00:00
IGNY8 VPS (Salman)
c9f082cb12 old automation cleanup adn status feilds of planner udpate 2025-12-03 05:13:53 +00:00
IGNY8 VPS (Salman)
aab6a07c07 sdads 2025-12-01 05:56:14 +00:00
IGNY8 VPS (Salman)
6439fc5a3a s 2025-12-01 05:29:18 +00:00
IGNY8 VPS (Salman)
6f449c32c1 taxonomy fix 2025-12-01 05:13:53 +00:00
IGNY8 VPS (Salman)
4237c203b4 112 2025-11-29 08:59:31 +00:00
IGNY8 VPS (Salman)
0839455418 fine tuning 2025-11-28 12:25:45 +00:00
IGNY8 VPS (Salman)
9b9352b9d2 AI functins complete 2025-11-26 20:55:03 +00:00
IGNY8 VPS (Salman)
94a8aee0e2 ai fixes 2025-11-26 19:14:30 +00:00
IGNY8 VPS (Salman)
f88aae78b1 refactor-migration again 2025-11-26 15:12:14 +00:00
IGNY8 VPS (Salman)
403432770b ai fix 2025-11-26 12:53:10 +00:00