(modelIds: string[])
| 1472 | } |
| 1473 | |
| 1474 | function createGetModelsResponse(modelIds: string[]) { |
| 1475 | // Obviously the following might not match any given model. We could track the original responses from /models, |
| 1476 | // but that risks invalidating the caches too frequently and making this unmaintainable. If this approximation |
| 1477 | // turns out to be insufficient, we can tweak the logic here based on known model IDs. |
| 1478 | return { |
| 1479 | data: modelIds.map((id) => ({ |
| 1480 | id, |
| 1481 | name: id, |
| 1482 | capabilities: { |
| 1483 | supports: { vision: true }, |
| 1484 | limits: { max_context_window_tokens: 128000 }, |
| 1485 | }, |
| 1486 | })), |
| 1487 | }; |
| 1488 | } |
| 1489 | |
| 1490 | async function writeFileIfDifferent(filePath: string, contents: string) { |
| 1491 | if (existsSync(filePath)) { |
no outgoing calls
no test coverage detected
searching dependent graphs…