| 182 | } |
| 183 | |
| 184 | function 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 | |
| 211 | function parseRoutersJSON(raw: string | undefined): RouterEntry[] { |
| 212 | if (!raw) return [] |