fix: show only fallback model when failover is active

This commit is contained in:
Eyejoker
2026-04-01 05:04:04 +09:00
parent 5a109e3717
commit f4410be779

View File

@@ -604,11 +604,12 @@ function buildModelConfigSection(): string {
// 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}`);
if (isFallback) {
const fallbackModel = process.env.CODEX_MODEL || 'codex';
lines.push(` **${role.label}** — codex \`${fallbackModel}\` (fallback)`);
} else {
lines.push(` **${role.label}** — ${type} \`${model}\``);
}
}
// MoA status