diff --git a/apps/rowboat/app/lib/agents.ts b/apps/rowboat/app/lib/agents.ts index fafcd588..54b5b416 100644 --- a/apps/rowboat/app/lib/agents.ts +++ b/apps/rowboat/app/lib/agents.ts @@ -1,5 +1,5 @@ // External dependencies -import { Agent, AgentInputItem, run, Tool } from "@openai/agents"; +import { Agent, AgentInputItem, run, RunRawModelStreamEvent, Tool } from "@openai/agents"; import { RECOMMENDED_PROMPT_PREFIX } from "@openai/agents-core/extensions"; import { aisdk } from "@openai/agents-extensions"; import { createOpenAI } from "@ai-sdk/openai"; @@ -78,6 +78,7 @@ interface AgentState { const openai = createOpenAI({ apiKey: PROVIDER_API_KEY, baseURL: PROVIDER_BASE_URL, + compatibility: "strict", }); const ZOutMessage = z.union([ @@ -734,7 +735,7 @@ function maybeInjectGiveUpControlInstructions( // Handle raw model stream events async function* handleRawModelStreamEvent( - event: any, + event: RunRawModelStreamEvent, agentConfig: Record>, agentName: string, turnMsgs: z.infer[], diff --git a/apps/rowboat/app/lib/copilot/copilot.ts b/apps/rowboat/app/lib/copilot/copilot.ts index 80984874..e729caf5 100644 --- a/apps/rowboat/app/lib/copilot/copilot.ts +++ b/apps/rowboat/app/lib/copilot/copilot.ts @@ -34,6 +34,7 @@ const SYSTEM_PROMPT = [ const openai = createOpenAI({ apiKey: PROVIDER_API_KEY, baseURL: PROVIDER_BASE_URL, + compatibility: "strict", }); const ZTextEvent = z.object({