feat(B-LLM): Zentraler LLM Client — llm_complete() + llm_embed() + Migration + Tests + Doku
Check Cross-Plugin Imports / check (push) Has been cancelled

B-LLM: llm_client.py um generische llm_complete() und llm_embed() erweitert
- Provider-Auswahl, API-Key-Auflösung, Error-Handling, Cost-Tracking
- Retry mit Exponential-Backoff für transient errors
- Timeout konfigurierbar
- Helper: get_api_credentials(), build_model(), _classify_error()

B-LLM-MIG: Alle 8 direkten litellm.acompletion() Calls auf llm_complete() umgestellt
- agent_runner.py, query_understanding.py (2x), ai_proactive (3x), ai_assistant (2x)
- 0 verbleibende direkte litellm.acompletion() Calls außerhalb llm_client.py

B-LLM-TEST: 39 Tests in test_llm_client.py — alle grün
- Mock mode, error handling, embed, helpers, backward compat

B-LLM-DOC: Plugin-Dev-Guide Kapitel 7 (LLM Integration) hinzugefügt
This commit is contained in:
Agent Zero
2026-08-13 16:22:05 +02:00
parent 3d8210637e
commit e3ca3b3d28
12 changed files with 1230 additions and 234 deletions
+5 -5
View File
@@ -10,7 +10,7 @@
| Phase | Status | Start | Ende | Tasks Done | Tasks Total |
|-------|-------|-------|------|------------|-------------|
| A — Stabilität verifizieren | `done` | 2026-08-13 | 2026-08-13 | 5 | 5 |
| B — System-Konsolidierung | `not_started` | — | — | 0 | ~50 |
| B — System-Konsolidierung | `in_progress` | 2026-08-13 | — | 0 | ~50 |
| C — Core UI | `not_started` | — | — | 0 | ~18 |
| C.5 — Import/Export | `not_started` | — | — | 0 | 8 |
| D — Undo/Restore | `not_started` | — | — | 0 | ~12 |
@@ -43,10 +43,10 @@
| Task | Status | Forgejo Issue | Verifiziert |
|------|-------|---------------|------------|
| B-LLM | `not_started` | — | — |
| B-LLM-MIG | `not_started` | — | — |
| B-LLM-TEST | `not_started` | — | — |
| B-LLM-DOC | `not_started` | — | — |
| B-LLM | `done` | — | ✅ llm_complete() + llm_embed() + get_api_credentials() + build_model() + _classify_error() + Cost-Tracking + Retry + Timeouts |
| B-LLM-MIG | `done` | — | ✅ Alle 8 direkten litellm.acompletion() Calls auf llm_complete() umgestellt. 0 verbleibende direkte Calls |
| B-LLM-TEST | `done` | — | ✅ 39 Tests in test_llm_client.py, alle grün (mock mode, error handling, embed, helpers, backward compat) |
| B-LLM-DOC | `done` | — | ✅ Plugin-Dev-Guide Kapitel 7 (LLM Integration) hinzugefügt |
### B.2 Zentraler Redis Pool