mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
refactor: Use default centralized Flash & Pro models everywhere (#994)
This commit is contained in:
@@ -24,6 +24,7 @@ import { GEMINI_CONFIG_DIR as GEMINI_DIR } from '../tools/memoryTool.js';
|
||||
import { FileDiscoveryService } from '../services/fileDiscoveryService.js';
|
||||
import { GitService } from '../services/gitService.js';
|
||||
import { initializeTelemetry } from '../telemetry/index.js';
|
||||
import { DEFAULT_GEMINI_EMBEDDING_MODEL } from './models.js';
|
||||
|
||||
export enum ApprovalMode {
|
||||
DEFAULT = 'default',
|
||||
@@ -55,7 +56,7 @@ export class MCPServerConfig {
|
||||
export interface ConfigParameters {
|
||||
sessionId: string;
|
||||
contentGeneratorConfig: ContentGeneratorConfig;
|
||||
embeddingModel: string;
|
||||
embeddingModel?: string;
|
||||
sandbox?: boolean | string;
|
||||
targetDir: string;
|
||||
debugMode: boolean;
|
||||
@@ -121,7 +122,8 @@ export class Config {
|
||||
constructor(params: ConfigParameters) {
|
||||
this.sessionId = params.sessionId;
|
||||
this.contentGeneratorConfig = params.contentGeneratorConfig;
|
||||
this.embeddingModel = params.embeddingModel;
|
||||
this.embeddingModel =
|
||||
params.embeddingModel ?? DEFAULT_GEMINI_EMBEDDING_MODEL;
|
||||
this.sandbox = params.sandbox;
|
||||
this.targetDir = path.resolve(params.targetDir);
|
||||
this.debugMode = params.debugMode;
|
||||
|
||||
9
packages/core/src/config/models.ts
Normal file
9
packages/core/src/config/models.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2025 Google LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
export const DEFAULT_GEMINI_MODEL = 'gemini-2.5-pro-preview-06-05';
|
||||
export const DEFAULT_GEMINI_FLASH_MODEL = 'gemini-2.5-flash-preview-05-20';
|
||||
export const DEFAULT_GEMINI_EMBEDDING_MODEL = 'gemini-embedding-001';
|
||||
Reference in New Issue
Block a user