KI: Modellauswahl als Dropdown + Abgleich mit Produktionsstand

Einstellungen -> KI: statt freiem Modellnamen ein Dropdown mit den
Chat-Modellen, die der hinterlegte OpenAI-Schluessel nutzen darf.

- Backend: listAiModels() fragt OpenAI GET /v1/models, filtert auf
  Chat-Modelle (gpt-*, o*, chatgpt-*; ohne Embedding/Audio/Bild/Instruct
  usw.), neueste zuerst, 10 min im Speicher (Schluesselwechsel laedt neu)
- Neuer Endpunkt GET /api/ai/models (admin)
- Frontend: aktives Modell bleibt waehlbar, auch wenn nicht mehr gelistet;
  Rueckfall auf Textfeld, wenn die Liste nicht abrufbar ist
- Doku: 05-ki (Modellauswahl mit Ablaufdiagramm), 10-api, 08-anleitung

Zieht ausserdem den bereits live laufenden, bisher nicht eingecheckten
Stand nach (perinco-Kontaktabgleich/MergeDialog, Projektmargen,
Whisper-Anpassungen u. a.). Repo entspricht damit icrm.icon-experts.de.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
schakal00783
2026-09-23 10:26:30 +02:00
co-authored by Claude Opus 5.5
parent 3f25355a6d
commit cbac02a96a
40 changed files with 1476 additions and 80 deletions
+2 -2
View File
@@ -12,7 +12,7 @@ import { HistoryFeed } from '../history/HistoryFeed';
import { TRISTATE_LABELS } from '../contacts/contactUi';
import { useToast } from '../Toast';
import { useNavigation } from '../../lib/navigation';
import { useOptions } from '../../lib/options';
import { useOptions, sortByLabel } from '../../lib/options';
import { useAuth } from '../../lib/auth';
interface CompanyModalProps {
@@ -264,7 +264,7 @@ export const CompanyModal: React.FC<CompanyModalProps> = ({
verschwinden. */}
{(industryOptions.includes(form.industry) || !form.industry
? industryOptions
: [form.industry, ...industryOptions]
: sortByLabel([form.industry, ...industryOptions])
).map((industry) => (
<option key={industry} value={industry}>
{industry}