MCPcopy Create free account
hub / github.com/anomalyco/opencode / makeHookInput

Function makeHookInput

packages/opencode/test/plugin/cloudflare.test.ts:16–36  ·  view source on GitHub ↗
(overrides: { providerID?: string; apiId?: string; reasoning?: boolean })

Source from the content-addressed store, hash-verified

14}
15
16function 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
38function makeHookOutput() {
39 return { temperature: 0, topP: 1, topK: 0, maxOutputTokens: 32_000 as number | undefined, options: {} }

Callers 1

cloudflare.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected