| 16 | }) |
| 17 | |
| 18 | const model = (providerID: ProviderV2.ID, id: string, variants?: Directory.ModelVariants): Provider.Model => ({ |
| 19 | id: ModelV2.ID.make(id), |
| 20 | providerID, |
| 21 | api: { |
| 22 | id, |
| 23 | url: "https://example.com", |
| 24 | npm: "@ai-sdk/openai-compatible", |
| 25 | }, |
| 26 | name: id, |
| 27 | family: "test", |
| 28 | capabilities: { |
| 29 | temperature: true, |
| 30 | reasoning: Boolean(variants), |
| 31 | attachment: false, |
| 32 | toolcall: true, |
| 33 | input: { text: true, audio: false, image: false, video: false, pdf: false }, |
| 34 | output: { text: true, audio: false, image: false, video: false, pdf: false }, |
| 35 | interleaved: false, |
| 36 | }, |
| 37 | cost: { |
| 38 | input: 0, |
| 39 | output: 0, |
| 40 | cache: { read: 0, write: 0 }, |
| 41 | }, |
| 42 | limit: { |
| 43 | context: 128000, |
| 44 | output: 4096, |
| 45 | }, |
| 46 | status: "active", |
| 47 | options: {}, |
| 48 | headers: {}, |
| 49 | release_date: "2026-01-01", |
| 50 | ...(variants ? { variants } : {}), |
| 51 | }) |
| 52 | |
| 53 | const snapshot = (directory: string) => { |
| 54 | const providerID = ProviderV2.ID.make(`provider-${directory}`) |