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

+30
View File
@@ -152,6 +152,36 @@ async function _showKeySwitchModal() {
var list = document.createElement('div');
list.className = 'key-switch-list';
// "Kein Key"-Option als erste Zeile
var noneRow = document.createElement('div');
noneRow.className = 'key-switch-row';
if (!selectedKeyId) noneRow.classList.add('active');
var noneInfo = document.createElement('div');
noneInfo.className = 'key-switch-info';
var noneName = document.createElement('div');
noneName.className = 'key-switch-name';
noneName.textContent = 'Kein Key';
noneInfo.appendChild(noneName);
var noneMeta = document.createElement('div');
noneMeta.className = 'key-switch-meta';
noneMeta.textContent = 'Agent ohne API-Key nutzen';
noneInfo.appendChild(noneMeta);
noneRow.appendChild(noneInfo);
if (selectedKeyId) {
noneRow.classList.add('clickable');
noneRow.addEventListener('click', async function() {
noneRow.classList.add('loading-state');
try {
await apiSelectApiKey('none', getCurrentAgentId());
close();
await _initChatUsageBadge();
} catch(e) {
noneRow.classList.remove('loading-state');
}
});
}
list.appendChild(noneRow);
keys.forEach(function(key) {
var row = document.createElement('div');
row.className = 'key-switch-row';