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>
- 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>
- 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>
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>
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>