MCPcopy Index your code
hub / github.com/github/copilot-sdk / createGetModelsResponse

Function createGetModelsResponse

test/harness/replayingCapiProxy.ts:1474–1488  ·  view source on GitHub ↗
(modelIds: string[])

Source from the content-addressed store, hash-verified

1472}
1473
1474function 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
1490async function writeFileIfDifferent(filePath: string, contents: string) {
1491 if (existsSync(filePath)) {

Callers 1

performRequestMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…