227
228
if (method === 'GET' && pathname === '/v1/models') {
230
>
// CAPI's model shape. VS Code already owns CAPI model discovery and
231
>
// supplies the selected model when starting a turn, so an empty remote
232
>
// catalog keeps Codex's bundled model metadata while avoiding a noisy
233
>
// refresh failure on every proxy-backed runtime start.
234
>
res.writeHead(200, { 'Content-Type': 'application/json' });
235
>
res.end(JSON.stringify({ models: [] }));
236
>
return;
237
>
}
238
239
// Codex sends `/v1/responses`, `//responses` (when base_url ends in `/`),