Merge pull request #4153 from MoerAI/fix/fallback-model-string-guard

fix(shared,delegate-task,claude-code-agent-loader): guard model parsers against non-string input (fixes #4145)
This commit is contained in:
YeonGyu-Kim
2026-05-20 23:40:33 +09:00
committed by GitHub
5 changed files with 75 additions and 0 deletions
@@ -11,6 +11,7 @@ const CLAUDE_CODE_ALIAS_MAP = new Map<string, string>([
function mapClaudeModelString(model: string | undefined): string | undefined {
if (!model) return undefined
if (typeof model !== "string") return undefined
const trimmed = model.trim()
if (trimmed.length === 0) return undefined