fix(task): limit small models to explore agents

This commit is contained in:
Shoubhit Dash
2026-04-29 17:13:29 +05:30
parent 6ba2bbc91c
commit ed96212712
2 changed files with 3 additions and 3 deletions

View File

@@ -101,7 +101,7 @@ export const TaskTool = Tool.define(
const msg = yield* Effect.sync(() => MessageV2.get({ sessionID: ctx.sessionID, messageID: ctx.messageID }))
if (msg.info.role !== "assistant") return yield* Effect.fail(new Error("Not an assistant message"))
const smallModel = next.model ? undefined : yield* provider.getSmallModel(msg.info.providerID)
const smallModel = !next.model && next.name === "explore" ? yield* provider.getSmallModel(msg.info.providerID) : undefined
const model = next.model ?? {
modelID: smallModel?.id ?? msg.info.modelID,
providerID: smallModel?.providerID ?? msg.info.providerID,

View File

@@ -276,7 +276,7 @@ describe("tool.task", () => {
),
)
it.live("execute defaults subagents to the provider small model", () =>
it.live("execute defaults explore agents to the provider small model", () =>
provideTmpdirInstance(
() =>
Effect.gen(function* () {
@@ -294,7 +294,7 @@ describe("tool.task", () => {
{
description: "inspect bug",
prompt: "look into the cache key path",
subagent_type: "general",
subagent_type: "explore",
},
{
sessionID: chat.id,