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

Function routerModel

packages/opencode/src/plugin/digitalocean.ts:184–209  ·  view source on GitHub ↗
(router: RouterEntry, providerID: string)

Source from the content-addressed store, hash-verified

182}
183
184function routerModel(router: RouterEntry, providerID: string): Model {
185 const id = `router:${router.name}`
186 return {
187 id,
188 providerID,
189 name: router.name,
190 family: "digitalocean-inference-routers",
191 api: { id, url: DO_INFERENCE_BASE, npm: "@ai-sdk/openai-compatible" },
192 status: "active",
193 headers: {},
194 options: {},
195 cost: { input: 0, output: 0, cache: { read: 0, write: 0 } },
196 limit: { context: 128_000, output: 8_192 },
197 capabilities: {
198 temperature: true,
199 reasoning: false,
200 attachment: false,
201 toolcall: true,
202 input: { text: true, audio: false, image: false, video: false, pdf: false },
203 output: { text: true, audio: false, image: false, video: false, pdf: false },
204 interleaved: false,
205 },
206 release_date: "",
207 variants: {},
208 }
209}
210
211function parseRoutersJSON(raw: string | undefined): RouterEntry[] {
212 if (!raw) return []

Callers 1

modelsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected