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

Function cfModel

packages/opencode/test/provider/cf-ai-gateway-e2e.test.ts:59–79  ·  view source on GitHub ↗
(apiId: string, releaseDate = "2026-03-05")

Source from the content-addressed store, hash-verified

57})
58
59const cfModel = (apiId: string, releaseDate = "2026-03-05"): Provider.Model => ({
60 id: ModelV2.ID.make(`cloudflare-ai-gateway/${apiId}`),
61 providerID: ProviderV2.ID.make("cloudflare-ai-gateway"),
62 name: apiId,
63 api: { id: apiId, url: "https://gateway.ai.cloudflare.com/v1/compat", npm: "ai-gateway-provider" },
64 capabilities: {
65 reasoning: true,
66 temperature: false,
67 attachment: true,
68 toolcall: true,
69 input: { text: true, audio: false, image: true, video: false, pdf: true },
70 output: { text: true, audio: false, image: false, video: false, pdf: false },
71 interleaved: false,
72 },
73 cost: { input: 1, output: 1, cache: { read: 0, write: 0 } },
74 limit: { context: 1_000_000, output: 128_000 },
75 status: "active",
76 options: {},
77 headers: {},
78 release_date: releaseDate,
79})
80
81// ai-gateway-provider sends an array of step descriptors; each entry's `query`
82// is the body forwarded to the upstream provider.

Callers 1

Calls 1

makeMethod · 0.45

Tested by

no test coverage detected