OoO
67509a4e42
fix(post-3.5c): Hermes 降級 logger 等級從 error → warning
...
Item #5:
- services/hermes_analyst_service.py:122 降級到規則引擎是預期 fallback
路徑(不是錯誤),改用 logger.warning 與同檔 :175 一致
調查範圍(已查 grep "logger.error" + "降級|hermes|fallback"):
- services/nemoton_dispatcher_service.py:486 NIM content 解析失敗 → 真錯誤,保留 error
- services/nemoton_dispatcher_service.py:564 fallback 派發單筆失敗 → 真錯誤,保留 error
- routes/openclaw_bot_routes.py:4168 無 logger.error,候選位置無此 pattern(已查,無異狀)
2026-04-28 12:15:59 +08:00
OoO
60a7917634
fix(post-3.5c): 修正 hermes_analyst_service docstring 模型名稱誤導
...
餘震 B:
- services/hermes_analyst_service.py:7 註解寫 qwen2.5:7b-instruct
但實際 line 30 HERMES_MODEL = "hermes3:latest"
- 同步修正 host 描述為「HERMES_URL(預設 192.168.0.111:11434)」
2026-04-28 12:15:59 +08:00
OoO
5340475570
fix(post-3.5c): hermes timeout 雙標統一 + 補 keep_alive
...
餘震 A — 昨天 Hermes timeout 真因(incident 核心):
- services/hermes_analyst_service.py:158 硬編碼 timeout=10,與 :406 用
HERMES_TIMEOUT=120 雙標;payload 也沒帶 keep_alive,被別模型擠下後
冷啟動 30+s 必中 timeout
- HERMES_TIMEOUT 從檔內常數提升至 config.py 集中管理(ADR-008)
- 兩個 payload (intent/batch) 都補 keep_alive=24h(ADR-012)
- intent 路徑 timeout 從 10s 改用 HERMES_TIMEOUT;keep_alive 確保熱駐留時
實測仍 < 10s,不會撐到 120s 上限
檔案:
- config.py: 新增 HERMES_TIMEOUT 常數
- services/hermes_analyst_service.py: 移除檔內 HERMES_TIMEOUT、新增
HERMES_KEEP_ALIVE、補 payload keep_alive、line 158 timeout 統一
2026-04-28 12:15:59 +08:00
OoO
bc7113bc86
fix: ElephantAlpha crash, AiderHeal Ollama host, MCP integration for Hermes/NemoTron, and MCP hallucination
CD Pipeline / deploy (push) Successful in 1m18s
2026-04-28 12:11:33 +08:00
ogt
b9fe98f591
refactor: centralize config — HERMES_URL, SSH params, validate_critical_config()
...
- config.py: add HERMES_URL (default 192.168.0.111:11434), SSH jump params, validate_critical_config()
- services/hermes_analyst_service.py: remove hardcoded HERMES_URL, import from config
- app.py: call validate_critical_config() on startup, log warnings for optional missing vars
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-27 21:27:47 +08:00
ogt
b4d208d34a
fix: replace raise with warning in nemotron/hermes + fix hardcoded host in footprint
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-27 19:46:04 +08:00
ogt
c8ceec1f5f
fix: expand rule engine keywords to catch brand/strategy/investment queries
...
CD Pipeline / deploy (push) Successful in 1m53s
'品牌','廠商','加碼','投資','策略','建議','市場','機會','成長',
'預測','比較','推薦','最佳' now trigger complex routing → Gemini
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-26 20:23:12 +08:00
ogt
388260666e
perf: reduce Hermes timeout 25s→10s — Gemini handles main response
...
CD Pipeline / deploy (push) Successful in 1m16s
Hermes on 111 GPU takes 17s+ due to concurrent load.
Intent classification is just routing hint; Gemini/NVIDIA NIM does
actual heavy analysis. 10s timeout → quick rule engine fallback → faster UX.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-25 11:09:24 +08:00
ogt
9d0e083504
fix: increase Hermes timeout 20s→25s (measured 17s from container to 111)
...
CD Pipeline / deploy (push) Successful in 1m22s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-25 11:06:15 +08:00
ogt
c299abba5d
fix: restore Hermes to 111+hermes3 + add NVIDIA NIM auto-fallback for OpenClaw
...
CD Pipeline / deploy (push) Successful in 3m0s
Hermes was wrongly redirected to 188 (CPU-only, 60s+ timeout).
111 has hermes3:latest with GPU acceleration (~10s response).
OpenClaw now auto-detects:
1. Gemini (primary, when GEMINI_API_KEY set)
2. NVIDIA NIM nemotron-ultra (auto-fallback, NVIDIA_API_KEY already set)
3. Friendly error only when both are unavailable
This implements the user-requested auto-failover pattern: always try
primary first, silently fall back, restore automatically when primary recovers.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-25 10:31:00 +08:00
ogt
e9e0ddf54f
fix: json.dumps dict before psycopg2 insert + remove fatal raise in save_context
...
CD Pipeline / deploy (push) Successful in 1m22s
save_context/_save_action_plan passed raw Python dicts as SQL bind params,
causing psycopg2.ProgrammingError that propagated via raise and crashed the
entire AI pipeline, forcing every natural language message to keyword fallback.
Also increase Hermes intent timeout 15s→30s for qwen2.5 cold-start latency.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-25 10:12:20 +08:00
ogt
d5c0feab5e
fix: Telegram bot 全功能修復 — 16個await按鈕/AI對話/模型遷移/DB schema
...
CD Pipeline / deploy (push) Successful in 1m35s
## Telegram Bot 功能修復
- 補全 16 個 await: 按鈕的 handler(日期選擇/目標設定/促銷追蹤等),
新增 _handle_await_callback + _process_await_input 完整狀態機
- cmd: 按鈕加入 ⏳ 即時回饋 + try/except 防 BadRequest
- handle_callback 加頂層 try/except 錯誤兜底
- 補 momo:cmd:suggestion + momo:menu:main callback handler
- 修復 _enhanced_keyword_matching context NameError
## AI 模型遷移(hermes3@111 → qwen2.5@188)
- hermes_analyst_service: URL 192.168.0.111→188, hermes3→qwen2.5:7b-instruct
- code_review_pipeline: 改用 HERMES_URL/HERMES_MODEL 常數
- elephant_alpha_orchestrator / nemoton_dispatcher: registry/footprint 同步
- aider_heal_executor: OLLAMA_API_BASE fallback 改 188
- ai_routes: footprint display 字串改 qwen2.5:7b-instruct
## ElephantAlpha 404 修復
- elephant_service: openrouter→NVIDIA NIM, nvidia/llama-3.1-nemotron-ultra-253b-v1
- ai_provider: 模型 ID 同步更新
## TELEGRAM_CHAT_ID 環境變數修正
- cicd_routes + aider_heal_executor: 優先讀 TELEGRAM_CHAT_IDS[0],
fallback TELEGRAM_CHAT_ID,修復通知靜默失敗
## AI 對話 logging 改善
- telegram_ai_integration: Hermes 降級改 WARNING,OpenClaw 失敗加 exc_info
- hermes_analyst_service: 連線失敗 log 加 host/model context
## DB Schema 修復
- migrations/019: action_plans 補齊全欄位,DROP NOT NULL action_type
- autoheal_models: ActionPlan ORM 同步為超集 schema
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-25 03:30:14 +08:00
ogt
5ef4151fa5
[V10.4-C] 三 AI NLP 鏈修復:Hermes/NemoTron/OpenClaw 全線串通
...
修復 P9-2 確認的自然語言對話完全失效問題:
- services/ai_orchestrator.py:
4 處裸字串 SQL 全部包裝 text(),修復 SQLAlchemy 2.x ArgumentError
- services/hermes_analyst_service.py:
新增 handle_l1() async 方法(Ollama hermes3 意圖分析 + rule-based fallback)
asyncio.get_event_loop() → get_running_loop()(Py3.12+ 相容)
- services/nemoton_dispatcher_service.py:
新增 handle_l2() async 方法(純 Python routing,不消耗 NIM 配額)
- services/openclaw_strategist_service.py:
新增 generate_strategy_response()(Gemini 2.0 Flash,無 key 時優雅降級)
- telegram_ai_integration.py:
整合 OpenClaw 為第三層(complexity >= 0.7 或 dispatch_to == "openclaw")
_format_*_response 全改為繁體中文
asyncio.get_event_loop() → get_running_loop()
_extract_date_range "to" → "至"
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-25 01:43:20 +08:00
ogt
1b4f3a7bbe
feat: EwoooC 初始化 — 完整專案推版至 Gitea
...
CD Pipeline / deploy (push) Failing after 59s
- 建立 Gitea Actions CD pipeline (.gitea/workflows/cd.yaml)
- 部署模式: rsync Python 檔案至 188 → docker restart (volume mount)
- Dockerfile/requirements 變動時自動重建 Docker image
- 部署通知: Telegram (開始/成功/失敗)
- 健康檢查: https://mo.wooo.work/health (最多 5 次重試)
- 同步最新 CLAUDE.md / ADR-008 / memory (2026-04-19)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-19 01:21:13 +08:00