MCPcopy Index your code
hub / github.com/anomalyco/opencode / generate

Function generate

packages/core/src/plugin/variant.ts:30–39  ·  view source on GitHub ↗
(model: ModelV2Info)

Source from the content-addressed store, hash-verified

28})
29
30export function generate(model: ModelV2Info): ModelV2Info["variants"] {
31 if (model.api.type !== "aisdk" || model.api.package !== "@ai-sdk/openai-compatible") return []
32 const ids = `${model.id} ${model.api.id}`.toLowerCase()
33 if (!["glm-5.2", "glm-5-2", "glm-5p2"].some((name) => ids.includes(name))) return []
34 return ["high", "max"].map((id) => ({
35 id,
36 headers: {},
37 body: { reasoning_effort: id },
38 }))
39}

Callers 1

variant.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected