fix(core): record selected catalog model identity on assistant steps (#34911)

This commit is contained in:
Kit Langton 2026-07-02 16:09:33 -04:00 committed by GitHub
commit cff2345c12
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 106 additions and 21 deletions

View file

@ -42,17 +42,17 @@ const make = (dependencies: Dependencies) => {
if (!firstUser) return
const agent = yield* dependencies.agents.get(AgentV2.ID.make("title"))
if (!agent) return
const model = yield* (agent.model
const resolved = yield* (agent.model
? dependencies.models.resolve({ ...session, model: agent.model })
: dependencies.models.resolve(session)
).pipe(Effect.catch(() => Effect.succeed(undefined)))
if (!model) return
if (!resolved) return
const chunks: string[] = []
let failed = false
const streamed = yield* dependencies.llm
.stream(
LLM.request({
model,
model: resolved.model,
system: agent.system,
messages: [Message.user(firstUser.text)],
tools: [],