diff --git a/src/mapper.ts b/src/mapper.ts index 6450670..2fcfcdb 100644 --- a/src/mapper.ts +++ b/src/mapper.ts @@ -118,6 +118,7 @@ export async function mapRequest(body: RequestBody) { return { geminiReq: { + model: body.model, contents, generationConfig, stream: body.stream, diff --git a/src/server.ts b/src/server.ts index adad12f..c55eaa4 100644 --- a/src/server.ts +++ b/src/server.ts @@ -24,7 +24,7 @@ if (VERBOSE) { consola.info('Verbose logging enabled'); } -consola.info('Google CLI OpenAI proxy'); +consola.info('Google CLI OpenAI API'); // ================================================================== // HTTP Server Helpers @@ -101,6 +101,12 @@ ensureOAuthCredentials() return; } + if (pathname === '/') { + res.writeHead(200, { 'Content-Type': 'text/plain' }); + res.end('Google CLI OpenAI API server is running......'); + return; + } + if (!isAuthorized(req, res)) { return; }