feat: 更新模型列表并添加模型未找到警告

在gemini-core.js中添加gemini-2.5-pro-preview-06-05模型
在qwen-core.js中移除未使用的QWEN_LOCK_FILENAME常量并添加模型未找到时的警告日志
This commit is contained in:
hex2077 2025-10-05 15:10:52 +08:00
parent b9d77090c9
commit 10c6f34b21
2 changed files with 2 additions and 2 deletions

View file

@ -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'];
const GEMINI_MODELS = ['gemini-2.5-flash', 'gemini-2.5-flash-lite', 'gemini-2.5-pro' , 'gemini-2.5-pro-preview-06-05'];
function toGeminiApiResponse(codeAssistResponse) {
if (!codeAssistResponse) return null;

View file

@ -10,7 +10,6 @@ import { randomUUID } from 'node:crypto';
// --- Constants ---
const QWEN_DIR = '.qwen';
const QWEN_CREDENTIAL_FILENAME = 'oauth_creds.json';
const QWEN_LOCK_FILENAME = 'oauth_creds.lock';
const QWEN_MODEL_LIST = [
{ id: 'qwen3-coder-plus', name: 'Qwen3 Coder Plus' },
{ id: 'qwen3-coder-flash', name: 'Qwen3 Coder Flash' },
@ -447,6 +446,7 @@ export class QwenApiService {
// Check if model in body is in QWEN_MODEL_LIST, if not, use the first model's id
if (processedBody.model && !QWEN_MODEL_LIST.some(model => model.id === processedBody.model)) {
console.warn(`[QwenApiService] Model '${processedBody.model}' not found. Using default model: '${QWEN_MODEL_LIST[0].id}'`);
processedBody.model = QWEN_MODEL_LIST[0].id;
}