feat: show fallback model in status dashboard

When global failover is active, claude-code roles now display
the fallback model inline: `claude-opus-4-6 (fallback → codex)`
This commit is contained in:
Eyejoker
2026-04-01 05:03:29 +09:00
parent 6e81bdc215
commit 5a109e3717

View File

@@ -591,6 +591,7 @@ function buildModelConfigSection(): string {
}, },
]; ];
const failover = getGlobalFailoverInfo();
const lines = ['🤖 *모델 구성*']; const lines = ['🤖 *모델 구성*'];
for (const role of roleConfigs) { for (const role of roleConfigs) {
if (!role.agentType && role.label === 'Arbiter') continue; if (!role.agentType && role.label === 'Arbiter') continue;
@@ -600,7 +601,14 @@ function buildModelConfigSection(): string {
? process.env.CODEX_MODEL || 'codex' ? process.env.CODEX_MODEL || 'codex'
: process.env.CLAUDE_MODEL || 'claude'; : process.env.CLAUDE_MODEL || 'claude';
const model = role.model || defaultModel; const model = role.model || defaultModel;
lines.push(` **${role.label}** — ${type} \`${model}\``);
// Show fallback status for claude-code roles when global failover is active
const isFallback = failover.active && type === 'claude-code';
const fallbackModel = process.env.CODEX_MODEL || 'codex';
const modelDisplay = isFallback
? `\`${model}\` (fallback → \`${fallbackModel}\`)`
: `\`${model}\``;
lines.push(` **${role.label}** — ${type} ${modelDisplay}`);
} }
// MoA status // MoA status
@@ -612,8 +620,6 @@ function buildModelConfigSection(): string {
lines.push(` **MoA** — ${refs}`); lines.push(` **MoA** — ${refs}`);
} }
// Global failover
const failover = getGlobalFailoverInfo();
if (failover.active) { if (failover.active) {
lines.push(` ⚠️ **Failover 활성** — ${failover.reason || '알 수 없음'}`); lines.push(` ⚠️ **Failover 활성** — ${failover.reason || '알 수 없음'}`);
} }