From ae9f6158d195bbc55d3706e3d99f688910b9589b Mon Sep 17 00:00:00 2001 From: mouyong Date: Mon, 4 Aug 2025 22:37:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20gemini=20=E6=B5=81=E5=BC=8F=E5=93=8D?= =?UTF-8?q?=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routes/geminiRoutes.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/routes/geminiRoutes.js b/src/routes/geminiRoutes.js index f3dd598f..36051b3d 100644 --- a/src/routes/geminiRoutes.js +++ b/src/routes/geminiRoutes.js @@ -560,20 +560,19 @@ async function handleStreamGenerateContent(req, res) { } } -// v1internal 和 v1beta 端点注册 +// 注册所有路由端点 +// v1internal 版本的端点 router.post('/v1internal\\:loadCodeAssist', authenticateApiKey, handleLoadCodeAssist); -router.post('/v1beta\\:loadCodeAssist', authenticateApiKey, handleLoadCodeAssist); - router.post('/v1internal\\:onboardUser', authenticateApiKey, handleOnboardUser); -router.post('/v1beta\\:onboardUser', authenticateApiKey, handleOnboardUser); - router.post('/v1internal\\:countTokens', authenticateApiKey, handleCountTokens); -router.post('/v1beta\\:countTokens', authenticateApiKey, handleCountTokens); - router.post('/v1internal\\:generateContent', authenticateApiKey, handleGenerateContent); -router.post('/v1beta\\:generateContent', authenticateApiKey, handleGenerateContent); - router.post('/v1internal\\:streamGenerateContent', authenticateApiKey, handleStreamGenerateContent); + +// v1beta 版本的端点 +router.post('/v1beta\\:loadCodeAssist', authenticateApiKey, handleLoadCodeAssist); +router.post('/v1beta\\:onboardUser', authenticateApiKey, handleOnboardUser); +router.post('/v1beta\\:countTokens', authenticateApiKey, handleCountTokens); +router.post('/v1beta\\:generateContent', authenticateApiKey, handleGenerateContent); router.post('/v1beta\\:streamGenerateContent', authenticateApiKey, handleStreamGenerateContent); module.exports = router; \ No newline at end of file