agentgui 1.0.326 → 1.0.328
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server.js +20 -2
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -349,12 +349,26 @@ const discoveredAgents = discoverAgents();
|
|
|
349
349
|
const modelCache = new Map();
|
|
350
350
|
|
|
351
351
|
const AGENT_MODEL_COMMANDS = {
|
|
352
|
-
'claude-code': 'claude models',
|
|
353
352
|
'gemini': 'gemini models',
|
|
354
353
|
'opencode': 'opencode models',
|
|
355
354
|
'kilo': 'kilo models',
|
|
356
355
|
};
|
|
357
356
|
|
|
357
|
+
const AGENT_FALLBACK_MODELS = {
|
|
358
|
+
'claude-code': [
|
|
359
|
+
{ id: '', label: 'Default' },
|
|
360
|
+
{ id: 'claude-opus-4-5', label: 'Claude Opus 4.5' },
|
|
361
|
+
{ id: 'claude-sonnet-4-5', label: 'Claude Sonnet 4.5' },
|
|
362
|
+
{ id: 'claude-haiku-4-5', label: 'Claude Haiku 4.5' },
|
|
363
|
+
{ id: 'claude-opus-4-5-20251001', label: 'Claude Opus 4.5 (2025-10-01)' },
|
|
364
|
+
{ id: 'claude-sonnet-4-5-20251001', label: 'Claude Sonnet 4.5 (2025-10-01)' },
|
|
365
|
+
{ id: 'claude-haiku-4-5-20251001', label: 'Claude Haiku 4.5 (2025-10-01)' },
|
|
366
|
+
{ id: 'claude-opus-4-6', label: 'Claude Opus 4.6' },
|
|
367
|
+
{ id: 'claude-sonnet-4-6', label: 'Claude Sonnet 4.6' },
|
|
368
|
+
{ id: 'claude-haiku-4-6', label: 'Claude Haiku 4.6' },
|
|
369
|
+
],
|
|
370
|
+
};
|
|
371
|
+
|
|
358
372
|
async function fetchClaudeModelsFromAPI() {
|
|
359
373
|
const apiKey = process.env.ANTHROPIC_API_KEY;
|
|
360
374
|
if (!apiKey) return null;
|
|
@@ -479,6 +493,10 @@ async function getModelsForAgent(agentId) {
|
|
|
479
493
|
} catch (_) {}
|
|
480
494
|
}
|
|
481
495
|
|
|
496
|
+
if (AGENT_FALLBACK_MODELS[agentId]) {
|
|
497
|
+
return AGENT_FALLBACK_MODELS[agentId];
|
|
498
|
+
}
|
|
499
|
+
|
|
482
500
|
return [];
|
|
483
501
|
}
|
|
484
502
|
|
|
@@ -2860,7 +2878,7 @@ function serveFile(filePath, res, req) {
|
|
|
2860
2878
|
const baseTag = `<script>window.__BASE_URL='${BASE_URL}';</script>`;
|
|
2861
2879
|
content = content.replace('<head>', '<head>\n ' + baseTag);
|
|
2862
2880
|
if (watch) {
|
|
2863
|
-
content += `\n<script>(function(){const ws=new WebSocket('ws://'+location.host+'${BASE_URL}/hot-reload');ws.onmessage=e=>{if(JSON.parse(e.data).type==='reload')location.reload()};})();</script>`;
|
|
2881
|
+
content += `\n<script>(function(){const ws=new WebSocket((location.protocol==='https:'?'wss://':'ws://')+location.host+'${BASE_URL}/hot-reload');ws.onmessage=e=>{if(JSON.parse(e.data).type==='reload')location.reload()};})();</script>`;
|
|
2864
2882
|
}
|
|
2865
2883
|
compressAndSend(req, res, 200, contentType, content);
|
|
2866
2884
|
});
|