fix: command model selection (#2448)

This commit is contained in:
Aiden Cline
2025-09-05 20:54:39 -05:00
committed by GitHub
parent dc99005e65
commit bffe547417

View File

@@ -1297,18 +1297,26 @@ export namespace Session {
}),
)
const model = await (async () => {
if (command.model) {
return Provider.parseModel(command.model)
}
if (command.agent) {
const agent = await Agent.get(command.agent)
if (agent.model) {
return agent.model
}
}
if (input.model) {
return Provider.parseModel(input.model)
}
return undefined
})()
return prompt({
sessionID: input.sessionID,
messageID: input.messageID,
model: (() => {
if (input.model) {
return Provider.parseModel(input.model)
}
if (command.model) {
return Provider.parseModel(command.model)
}
return undefined
})(),
model,
agent,
parts,
})