Provider-Abstraktion: Agents unterstützen jetzt OpenAI + Anthropic

Backend:
- ChatEndpoint: Globaler OpenAI-Fallback entfernt, Key-Check pro Provider
- TelegramService/CronjobService: Provider-Weiche statt hardcoded Anthropic
- AnthropicService: Preparer/Review/Finalizer sind Provider-aware
- OpenAiService: Neue ChatNonStreaming()-Methode für agentic loop
- ToolService: send_to_session lädt Key des Ziel-Agents
- SubAgentContext: Provider-Feld hinzugefügt
- ChatService: BuildSubAgentContext setzt Provider

Frontend:
- Key-Switch-Modal: 'Kein Key'-Option zum Entfernen der Zuweisung
- ApiKeysEndpoint: keyId='none' löscht Key-Zuweisung
This commit is contained in:
Meleki committed 2026-03-14 22:59:33 +01:00
1 parent 1effc6d00f
commit 02f5fe2faf
11 files changed
+422 -69

No files matched your search

+2
View File
@@ -96,6 +96,7 @@ builder.Services.AddSingleton<TelegramService>(sp =>
sp.GetRequiredService<IHttpClientFactory>(),
dbService, chatService,
sp.GetRequiredService<AnthropicService>(),
sp.GetRequiredService<OpenAiService>(),
serverSettings));
// Krea Image Generation
@@ -132,6 +133,7 @@ app.Use(async (context, next) =>
toolService.SetHttpClientFactory(app.Services.GetRequiredService<IHttpClientFactory>());
app.Services.GetRequiredService<AnthropicService>().SetTelegramService(app.Services.GetRequiredService<TelegramService>());
app.Services.GetRequiredService<AnthropicService>().SetOpenAiService(app.Services.GetRequiredService<OpenAiService>());
await app.Services.GetRequiredService<OpenAiService>().LoadModelsAsync();
app.UseWebSockets();