refactor(provider): remove async facade exports (#22320)

This commit is contained in:
Kit Langton
2026-04-13 12:40:00 -04:00
committed by GitHub
parent 5bc2d2498d
commit 663e798e76
10 changed files with 261 additions and 199 deletions

View File

@@ -125,7 +125,14 @@ function parseToolParams(input?: string) {
async function createToolContext(agent: Agent.Info) {
const session = await Session.create({ title: `Debug tool run (${agent.name})` })
const messageID = MessageID.ascending()
const model = agent.model ?? (await Provider.defaultModel())
const model =
agent.model ??
(await AppRuntime.runPromise(
Effect.gen(function* () {
const provider = yield* Provider.Service
return yield* provider.defaultModel()
}),
))
const now = Date.now()
const message: MessageV2.Assistant = {
id: messageID,