fix(core): stop forcing toolChoice none on session.generate (#38557)

This commit is contained in:
Aiden Cline 2026-07-23 14:12:23 -05:00 committed by GitHub
commit 8cac010bac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 2 deletions

View file

@ -74,7 +74,6 @@ export const layer = Layer.effect(
system: contextEvent.system,
messages: contextEvent.messages,
tools: hookedTools,
toolChoice: "none",
}),
)
yield* Effect.logInfo("session generation usage diagnostic", { usage: response.usage })

View file

@ -301,7 +301,7 @@ it.effect("generates from fresh settled Session context without durable mutation
),
).toEqual(["Settled partial answer"])
expect(requests[0]?.tools).toMatchObject([{ name: "lookup", description: "Hooked lookup" }])
expect(requests[0]?.toolChoice).toMatchObject({ type: "none" })
expect(requests[0]?.toolChoice).toBeUndefined()
expect(yield* durableState(db, sessionID)).toEqual(before)
}),
)