Override Logic Mismatches: Fixed critical Enum-to-String type mismatch in
apply_trend_override
that was silencing the "Safety Valve" logic.
Data Pipeline Failures: Injected robust error handling and type checking in
market_analyst.py
to identify why RegimeDetector receives invalid data (causing "UNKNOWN" regimes).
Gemini 404 Errors: Removed invalid/deprecated model names causing 404s
- **Configurable Embeddings Truncation**: Added `EMBEDDING_TRUNCATION_LIMIT` env var (default 1000) to prevent `413 Payload Too Large` errors with local models.