refactor(agent): own model selection on each agent
This commit is contained in:
1 parent
639602e63a
commit
a9c006f9c3
237 files changed
+1051
-1734
No files matched your search
@@ -173,7 +173,7 @@ export class SessionCommandController {
|
||||
? {}
|
||||
: { reasoningEffort: resolved.reasoningEffort }),
|
||||
}
|
||||
this.ctx.agentModel.select(agent, selected)
|
||||
agent.model.select(selected)
|
||||
void this.ctx.agentDefaultModel.saveSelection(selected).catch((error: unknown) => {
|
||||
this.ctx.logger.warn(
|
||||
`session-controller: model selection changed for the Session but the default was not saved: ${String(error)}`,
|
||||
@@ -323,7 +323,7 @@ export class SessionCommandController {
|
||||
const admit = async (): Promise<SessionPromptValue> => {
|
||||
try {
|
||||
if (hasImage) {
|
||||
const current = this.ctx.agentModel.resolveForNextStep(agent)
|
||||
const current = agent.model.current()
|
||||
if (current !== undefined) {
|
||||
const model = await this.ctx.llm.resolveModelInfo(current.provider, current.model)
|
||||
if (model.inputModalities !== undefined && !model.inputModalities.includes('image')) {
|
||||
|
||||
Reference in new issue
Block a user