mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-23 12:54:42 +00:00
fix(task): limit small models to explore agents
This commit is contained in:
parent
6ba2bbc91c
commit
ed96212712
2 changed files with 3 additions and 3 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue