fix(sdk): honor Codex model overrides in init progress

This commit is contained in:
Tom Boucher
2026-05-10 17:40:11 -04:00
committed by GitHub
parent 19295f5ab6
commit 52337a8861
5 changed files with 118 additions and 6 deletions

View File

@@ -43,7 +43,7 @@ import type { QueryHandler } from './utils.js';
async function getModelAlias(agentType: string, projectDir: string): Promise<string> {
const result = await resolveModel([agentType], projectDir);
const data = result.data as Record<string, unknown>;
return (data.model as string) || 'sonnet';
return typeof data.model === 'string' ? data.model : 'sonnet';
}
/**