Commit graph

6 commits

Author SHA1 Message Date
Vadym Samoilenko
44a4fb7e06 Revert Google model to gemini-3.1-pro-preview
The error was from gemini-2.0-flash-exp (old docker-compose default),
not from gemini-3.1-pro-preview which is valid and working.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 15:53:12 +00:00
Vadym Samoilenko
3d6adb2dcc Fix import empty sheet bug, update Google model, improve error messages
- BriefReviewPage: call loadSheet() after importDeliverables so store
  is refreshed before navigation — fixes 0 items on Sheet page
- Google model: gemini-3.1-pro-preview → gemini-2.5-pro-preview-03-25
  (old model name was invalid, caused API errors)
- docker-compose default: gemini-2.0-flash-exp → gemini-2.5-pro-preview-03-25

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 15:52:22 +00:00
Vadym Samoilenko
d71a044a3c Fix model config alignment and improve error messaging
- Replace sys.exit(1) with ValueError in _validate_models() — prevents killing the worker process on invalid model keys
- ModelConfiguration now reads defaults from core.config instead of hardcoding model keys
- Fix .env: google-gemini20 → google-gemini31 (align with MODEL_MAPPINGS)
- Improve "No data extracted" error message to explain the document must be a marketing brief

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 15:33:54 +00:00
Vadym Samoilenko
ba9af5f93c fix: align env var names between docker-compose and Python config
Two key mismatches caused silent failures in production:

1. core/config.py LLAMACLOUD_API_KEY: was reading LLAMACLOUD_API_KEY but
   docker-compose passes LLAMA_CLOUD_API_KEY (official SDK name).
   Now reads LLAMA_CLOUD_API_KEY with LLAMACLOUD_API_KEY as fallback.

2. core/config.py GOOGLE_API_KEY: was reading GOOGLE_API_KEY but .env /
   docker-compose use GEMINI_API_KEY. Now reads GEMINI_API_KEY first.

3. docker-compose.yml: add MSAL_* aliases for AZURE_* vars so
   server/config_runtime.py picks them up explicitly (not just via defaults).

4. docker-compose.yml: pass SESSION_SECRET from .env to container.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 15:09:45 +00:00
Vadym Samoilenko
fc430cc10a fix: add local document extraction fallback when LLAMACLOUD_API_KEY is absent
When LLAMACLOUD_API_KEY is empty the LlamaParse client constructed a Bearer
token with an empty secret, causing Python's HTTP stack to raise
"Illegal header value b'Bearer '" and fail every upload job.

Changes:
- _extract_document_content_local(): new method using PyMuPDF (PDF),
  python-pptx (PPTX), python-docx (DOCX), openpyxl (XLSX) — all already
  in requirements.txt
- _extract_document_content(): skip LlamaParser entirely if key is not set;
  on LlamaParser exception, fall back to local extraction instead of raising

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 15:08:23 +00:00
Vadym Samoilenko
72c50b2c92 Initial commit — AC Tool unified application
Merges ac-helper (PHP Activation Calendar) and brief-extractor (Python AI)
into a single Docker app with React/TypeScript frontend.

Features:
- Brief upload → AI extraction → review → Activation Calendar import
- Handsontable v17 spreadsheet with dependent dropdowns (148 categories)
- AI natural language commands via Gemini (YOLO mode, voice input)
- Azure AD MSAL SPA PKCE authentication, user roles (user/admin)
- CSV Activation Calendar export
- Real-time WebSocket job progress
- Admin: user management, dropdown Excel upload
- Multi-stage Dockerfile, docker-compose, nginx proxy instructions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 13:24:46 +00:00