Feat: Rollen-Empfehlung - bestes installiertes Modell je Rolle (Auto-Pick)

Analog zum Auto-ctx-Button: das Rollen-Zuweisungs-Modal empfiehlt jetzt, welches
INSTALLIERTE Modell am besten auf die Rolle passt - capability-getrieben (Vision/Coder/
Tools/MoE aus services.caps) + setup-bewusster Fit (services.budget, gleiche Mathematik
wie Install-Automatik & Auto-ctx).

- services/roles.py: recommend_for_role() rankt installierte Modelle (Eignung + Fit + Tempo
  + Wissen); harte Anforderungen (Vision braucht Vision, Hirn braucht Tools) schliessen aus.
- GET /api/roles/{role}/recommend
- Cockpit-Modal: »Auto: <Modell>«-Button im Header, »Empfohlen«-Badge, Sortierung nach Score,
  pro Zeile Fit + Begruendung (~t/s); ungeeignete gedimmt mit Klartext-Grund.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hitonabi
2026-06-27 14:37:37 +02:00
parent 1e011714dd
commit 763e634dfd
8 changed files with 281 additions and 108 deletions
+19
View File
@@ -73,6 +73,25 @@ export interface Fit {
tps: number
}
export interface RoleRecModel {
name: string
current_role: string | null
params_b: number
quant: string
fit: Fit
suitable: boolean
incomplete: boolean
score: number
reason: string
recommended: boolean
}
export interface RoleRecResp {
role: string
recommended: string | null
models: RoleRecModel[]
}
export interface FitResp {
params_b: number
fit: Fit