feat(api): Phase 15.1 Langfuse LLMOps 整合 + 模型升級

## 新功能
- Langfuse 自建部署 (192.168.0.110:3100)
- langfuse_client.py - LLM 呼叫追蹤包裝
- OpenClaw 整合 Langfuse trace

## 模型升級 (統帥批准)
- 生產預設: llama3.2:3b → qwen2.5:7b-instruct
- 摘要任務: llama3.2:3b (速度優先)

## 配置更新
- requirements.txt: +langfuse>=2.0.0
- config.py: +LANGFUSE_* 設定
- models.json: 更新 Ollama 模型配置
- K8s: Secret + ConfigMap 更新

## 審查通過
- 模組化檢查 
- 核心測試 31/31 

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
OG T
2026-03-26 00:32:19 +08:00
parent 31fabe8d61
commit 1ac8965a7a
11 changed files with 727 additions and 31 deletions

View File

@@ -3,7 +3,7 @@
"name": "OpenClaw AI Router Configuration",
"version": "1.0.0",
"description": "AI 模型路由與備援設定 (ADR-006)",
"updated_at": "2026-03-21",
"updated_at": "2026-03-26",
"default_provider": "ollama",
"fallback_order": ["ollama", "gemini", "claude"],
@@ -16,9 +16,9 @@
"endpoint": "http://192.168.0.188:11434",
"api_path": "/api/generate",
"models": {
"default": "llama3.2:3b",
"rca": "llama3.2:3b",
"summary": "llama3.2:1b"
"default": "qwen2.5:7b-instruct",
"rca": "qwen2.5:7b-instruct",
"summary": "llama3.2:3b"
},
"options": {
"temperature": 0.1,