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

Method getModels

server.js:98–114  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

server.jsFile · 0.45

Calls 2

ensureValidTokenMethod · 0.95
makeRequestMethod · 0.95

Tested by

no test coverage detected