added model list to proxy log in diagnostic server

This commit is contained in:
2026-03-12 01:55:23 +01:00
parent c255a85ffb
commit f0b4e586c0
2 changed files with 31 additions and 4 deletions
+21 -1
View File
@@ -102,7 +102,12 @@
<span class="status-label" id="proxy-status">Nicht getestet</span>
</div>
<div class="error-text" id="proxy-error"></div>
<button class="btn secondary" id="btn-proxy-test" onclick="testProxyBtn()">Proxy testen</button>
<div id="proxy-models" style="margin-top:6px;display:none">
<div style="font-size:11px;color:#8888AA;margin-bottom:3px">Verfuegbare Modelle:</div>
<div id="proxy-models-list" style="font-size:12px;line-height:1.6"></div>
<div style="font-size:10px;color:#555570;margin-top:4px" id="proxy-models-hint"></div>
</div>
<button class="btn secondary" id="btn-proxy-test" onclick="testProxyBtn()" style="margin-top:6px">Proxy testen</button>
</div>
</div>
@@ -275,6 +280,7 @@
} else {
addChat('error', msg.error, 'Claude Proxy Fehler');
}
if (msg.models && msg.models.length) showProxyModels(msg.models);
return;
}
if (msg.type === 'docker_logs') {
@@ -334,6 +340,7 @@
document.getElementById('proxy-status').textContent = STATUS_LABELS[proxy.status] || proxy.status;
document.getElementById('proxy-error').textContent = proxy.lastError || '';
document.getElementById('btn-proxy-test').disabled = proxy.status === 'testing';
if (proxy.models && proxy.models.length) showProxyModels(proxy.models);
// Buttons
document.getElementById('btn-gw').disabled = gw.status !== 'connected';
@@ -403,6 +410,19 @@
autoScroll[tab] = true;
}
function showProxyModels(models) {
const container = document.getElementById('proxy-models');
const list = document.getElementById('proxy-models-list');
const hint = document.getElementById('proxy-models-hint');
container.style.display = 'block';
list.innerHTML = models.map(m => {
const clean = m.replace('openai/', '');
return `<div style="display:inline-block;background:#1E1E2E;border:1px solid #333;border-radius:4px;padding:2px 8px;margin:2px;font-size:11px">${escapeHtml(m)}</div>`;
}).join('');
const cleanNames = models.map(m => m.replace('openai/', ''));
hint.textContent = `DEFAULT_MODEL fuer docker-compose.yml: ${cleanNames.join(' | ')}`;
}
function escapeHtml(str) {
return str.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
}