MCPcopy Create free account
hub / github.com/Alorse/copilot-to-api / getModels

Method getModels

copilot-client.js:92–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

90 }
91
92 async getModels() {
93 await this.ensureValidToken();
94
95 const options = {
96 hostname: 'api.githubcopilot.com',
97 port: 443,
98 path: '/models',
99 method: 'GET',
100 headers: {
101 'authorization': `Bearer ${this.copilotToken}`,
102 'Copilot-Integration-Id': 'vscode-chat'
103 }
104 };
105
106 const response = await this.makeRequest(options);
107 return response;
108 }
109
110 async chatCompletion(messages, options = {}) {
111 await this.ensureValidToken();

Callers 1

mainFunction · 0.95

Calls 2

ensureValidTokenMethod · 0.95
makeRequestMethod · 0.95

Tested by

no test coverage detected