fix: command model selection (#2448)
Some checks are pending
deploy / deploy (push) Waiting to run

This commit is contained in:
Aiden Cline 2025-09-05 20:54:39 -05:00 committed by GitHub
parent dc99005e65
commit bffe547417
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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,
})