File tree Expand file tree Collapse file tree 2 files changed +2
-10
lines changed
packages/core/src/services/model Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -350,15 +350,8 @@ export class ModelManager implements IModelManager {
350350 if ( ! config . baseURL ) {
351351 errors . push ( 'Missing base URL (baseURL)' ) ;
352352 }
353- if ( ! Array . isArray ( config . models ) ) {
354- errors . push ( 'Model list (models) must be an array' ) ;
355- } else if ( config . models . length === 0 ) {
356- errors . push ( 'Model list (models) cannot be empty' ) ;
357- }
358353 if ( ! config . defaultModel ) {
359354 errors . push ( 'Missing default model (defaultModel)' ) ;
360- } else if ( ! config . models ?. includes ( config . defaultModel ) ) {
361- errors . push ( 'Default model must be in the model list' ) ;
362355 }
363356
364357 // Validate llmParams structure
@@ -515,7 +508,6 @@ export class ModelManager implements IModelManager {
515508 typeof item . key === 'string' && // 导入数据必须包含key
516509 typeof item . name === 'string' &&
517510 typeof item . baseURL === 'string' &&
518- Array . isArray ( item . models ) &&
519511 typeof item . defaultModel === 'string' &&
520512 typeof item . enabled === 'boolean' &&
521513 typeof item . provider === 'string' ;
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ export interface ModelConfig {
1010 baseURL : string ;
1111 /** API密钥 */
1212 apiKey ?: string ;
13- /** 支持的模型列表 */
14- models : string [ ] ;
13+ /** 支持的模型列表 (可选,不直接使用) */
14+ models ? : string [ ] ;
1515 /** 默认模型 */
1616 defaultModel : string ;
1717 /** 是否启用 */
You can’t perform that action at this time.
0 commit comments