Replace the Google Gemini lock-in with a unified chat client usable with any
OpenAI-compatible /v1 endpoint (OpenAI, OpenRouter, DeepSeek, Moonshot, Qwen,
Ollama, Gemini-via-compat...). Switch provider purely via AI_BASE_URL/AI_MODEL.
- ai/llm_client.py (new): lazy openai SDK, per-candidate 429/503/timeout
failover across AI_MODEL_FAILOVER, robust JSON extraction, reasoning-budget
retry, image analysis via base64 data URI, singleton get_llm_client()
- settings.py: GeminiSettings -> LLMSettings (api_key/base_url/model/failover/
vision_model), keeps GEMINI_API_KEY fallback so existing .env keeps working
- news_analyzer.py: analyze_with_gemini -> analyze_with_llm (same output keys);
FinBERT now loads in a daemon warm-up thread with lexicon fallback - the
transformers first import was blocking the asyncio main loop 15-45s
(importlib.metadata full package scan); HF_ENDPOINT hf-mirror setdefault
- telegram_bot.py: news digest + AI-vision chart analysis via the LLM client
- requirements: google-genai -> openai>=1.0; docs/.env.example/README updated
for the new provider-agnostic setup; dashboard meta updated
Co-Authored-By: Claude Code <noreply@anthropic.com>
- Implemented scripts/train_ai.py for institutional XGBoost training on MT5 historical candles
- Integrated 46 multi-indicator features, TimeSeriesSplit validation, and feature importance drivers
- Added --train-only and improved --train in main.py
- Enabled MT5 AutoTrading configuration ([Experts] AllowLiveTrading=1)
- Added send_pending_order and cancel_order to MT5Connector (BUY_LIMIT, SELL_LIMIT, BUY_STOP, SELL_STOP)
- Added automatic 12-hour periodic model retraining job in BotScheduler and TradingBot
- Updated Telegram Command Center with MT5 standalone fallback and pending order telemetry
- Placed live test BUY market trade and scheduled BUY_LIMIT order on XAUUSD
- Implemented TradeLearner with post-mortem mistake diagnostics and defensive rule formulation
- Added Mistake Memory Guard to screen prospective signals against past loss patterns and traps
- Dynamic Multi-Armed Bandit strategy multipliers (Scalping, Day, Swing) and adaptive confluence weighting
- Integrated with TradeExecutor, Bot position synchronization, and SignalAggregator
- Real-time Self-Learning HUD in modern glassmorphic web dashboard (/api/learning)
- Added /learning command and interactive callback button to Telegram Command Center
- Added TradeLesson and AdaptiveWeight persistence models in SQLite WAL database
- Updated documentation and README