From 262f11921393954e9ad6d0f1b752c6ab6b528734 Mon Sep 17 00:00:00 2001 From: hex2077 Date: Sat, 11 Oct 2025 00:14:28 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=96=B0=E7=9A=84=20?= =?UTF-8?q?Gemini=20=E6=A8=A1=E5=9E=8B=E5=88=B0=E6=94=AF=E6=8C=81=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/convert.js | 2 +- src/gemini/gemini-core.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/convert.js b/src/convert.js index 101306e..3e31d50 100644 --- a/src/convert.js +++ b/src/convert.js @@ -7,7 +7,7 @@ import { MODEL_PROTOCOL_PREFIX, getProtocolPrefix } from './common.js'; // 定义默认常量 const DEFAULT_MAX_TOKENS = 8192; -const DEFAULT_GEMINI_MAX_TOKENS = 65536; +const DEFAULT_GEMINI_MAX_TOKENS = 65535; const DEFAULT_TEMPERATURE = 1; const DEFAULT_TOP_P = 0.95; diff --git a/src/gemini/gemini-core.js b/src/gemini/gemini-core.js index 870b1f4..af31a8b 100644 --- a/src/gemini/gemini-core.js +++ b/src/gemini/gemini-core.js @@ -14,7 +14,7 @@ const CODE_ASSIST_ENDPOINT = 'https://cloudcode-pa.googleapis.com'; const CODE_ASSIST_API_VERSION = 'v1internal'; const OAUTH_CLIENT_ID = '681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercontent.com'; const OAUTH_CLIENT_SECRET = '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'; -const GEMINI_MODELS = ['gemini-2.5-flash', 'gemini-2.5-flash-lite', 'gemini-2.5-pro' , 'gemini-2.5-pro-preview-06-05']; +const GEMINI_MODELS = ['gemini-2.5-flash', 'gemini-2.5-flash-lite', 'gemini-2.5-pro' , 'gemini-2.5-pro-preview-06-05', 'gemini-2.5-flash-preview-09-2025']; const ANTI_TRUNCATION_MODELS = GEMINI_MODELS.map(model => `anti-${model}`); function is_anti_truncation_model(model) {