docs(ai): 記錄 ElephantAlpha NIM fallback

This commit is contained in:
OoO
2026-04-30 09:35:04 +08:00
parent 91ad98e621
commit 75d7fdd68f
5 changed files with 11 additions and 1 deletions

View File

@@ -23,6 +23,7 @@
- 2026-04-30 `gunicorn.conf.py` 不是 app container bind mount曾導致手動 restart 後回吃 image 內舊設定;`momo-app` 已補 `./gunicorn.conf.py:/app/gunicorn.conf.py:ro`
- 2026-04-30 `/metrics``realtime_sales_monthly` 改用 raw `SELECT COUNT(*)`,避免 ORM 欄位與線上表 schema drift 時每次 Prometheus scrape 都產生 warning。
- 2026-04-30 CD Rebuild 模式曾先停三應用容器再 no-cache build造成 build 時間全變成 502已改為 build 成功後才短暫 stop/rm/recreate。
- 2026-04-30 production `NVIDIA_API_KEY` 可列出 Ultra 253B 但呼叫 `nvidia/llama-3.1-nemotron-ultra-253b-v1` 會 404ElephantAlpha 預設改用 `nvidia/llama-3.3-nemotron-super-49b-v1.5` 並加入 fallback models。
## 已落地範圍
@@ -58,6 +59,7 @@
- 2026-04-30 CD Gunicorn mount hardening新增 `tests/test_docker_compose_runtime_mounts.py`
- 2026-04-30 Metrics schema drift 降噪:`tests/test_ai_automation_metrics.py` 覆蓋 raw sales count query。
- 2026-04-30 CD rebuild cutover hardening`tests/test_cd_health_check.py` 覆蓋 build-before-stop 順序。
- 2026-04-30 ElephantAlpha NIM fallback hardening新增 `tests/test_elephant_service.py`
- 2026-04-29 L2 安全記憶批次:`24 passed`
- collect-only`48 tests collected`
- `git diff --check` 已通過。

View File

@@ -36,6 +36,7 @@
- **CD Gunicorn 掛載強化**: `momo-app``./gunicorn.conf.py:/app/gunicorn.conf.py:ro`,避免容器 restart 後回吃 image 內舊 gunicorn 設定。
- **Metrics schema drift 降噪**: `/metrics``realtime_sales_monthly` 總筆數改用 raw `COUNT(*)`,避免 ORM 欄位 drift 造成 Prometheus scrape warning。
- **CD Rebuild 切換強化**: rebuild 模式改成先 build 成功、再短暫 stop/rm/recreate 三應用容器,避免 no-cache build 長時間 502。
- **ElephantAlpha NIM fallback 強化**: production 帳號呼叫 Ultra 253B 會 404預設改用可呼叫的 Nemotron Super 49B v1.5,並加入 70B / 8B fallback。
### 2026-04-28~29Phase 3e 重構大戰 + daily_sales cache 隱形 bug 根除
- **app.py 縮減 -10.8%**: 7,386 → 6,590 行11 commits 全綠零 502。