| 14 | } |
| 15 | |
| 16 | function makeHookInput(overrides: { providerID?: string; apiId?: string; reasoning?: boolean }) { |
| 17 | return { |
| 18 | sessionID: "s", |
| 19 | agent: "a", |
| 20 | provider: {} as never, |
| 21 | message: {} as never, |
| 22 | model: { |
| 23 | providerID: overrides.providerID ?? "cloudflare-ai-gateway", |
| 24 | api: { id: overrides.apiId ?? "openai/gpt-5.2-codex", url: "", npm: "ai-gateway-provider" }, |
| 25 | capabilities: { |
| 26 | reasoning: overrides.reasoning ?? true, |
| 27 | temperature: false, |
| 28 | attachment: true, |
| 29 | toolcall: true, |
| 30 | input: { text: true, audio: false, image: false, video: false, pdf: false }, |
| 31 | output: { text: true, audio: false, image: false, video: false, pdf: false }, |
| 32 | interleaved: false, |
| 33 | }, |
| 34 | } as never, |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | function makeHookOutput() { |
| 39 | return { temperature: 0, topP: 1, topK: 0, maxOutputTokens: 32_000 as number | undefined, options: {} } |