agentgui 1.0.327 → 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 +19 -1
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
|
|