diff --git a/packages/opencode/src/session/prompt.ts b/packages/opencode/src/session/prompt.ts index 2c799b1100f7..5e361c170d1f 100644 --- a/packages/opencode/src/session/prompt.ts +++ b/packages/opencode/src/session/prompt.ts @@ -1,6 +1,7 @@ import path from "path" import os from "os" import z from "zod" +import { zodToJsonSchema } from "zod-to-json-schema" import { SessionID, MessageID, PartID } from "./schema" import { MessageV2 } from "./message-v2" import { Log } from "../util/log" @@ -436,7 +437,7 @@ NOTE: At any point in time through this workflow you should feel free to ask the { modelID: ModelID.make(input.model.api.id), providerID: input.model.providerID }, input.agent, )) { - const schema = ProviderTransform.schema(input.model, z.toJSONSchema(item.parameters)) + const schema = ProviderTransform.schema(input.model, zodToJsonSchema(item.parameters) as Record) tools[item.id] = tool({ id: item.id as any, description: item.description,