diff --git a/src/config/config.py b/src/config/config.py index 645a9f179..868739436 100644 --- a/src/config/config.py +++ b/src/config/config.py @@ -376,6 +376,12 @@ class APIAdapterConfig(ConfigBase): self.api_providers_dict = {provider.name: provider for provider in self.api_providers} self.models_dict = {model.name: model for model in self.models} + + for model in self.models: + if not model.model_identifier: + raise ValueError(f"模型 '{model.name}' 的 model_identifier 不能为空") + if not model.api_provider or model.api_provider not in self.api_providers_dict: + raise ValueError(f"模型 '{model.name}' 的 api_provider '{model.api_provider}' 不存在") def get_model_info(self, model_name: str) -> ModelInfo: """根据模型名称获取模型信息""" diff --git a/template/model_config_template.toml b/template/model_config_template.toml index 62a2b3a44..e99f039d3 100644 --- a/template/model_config_template.toml +++ b/template/model_config_template.toml @@ -46,13 +46,6 @@ api_provider = "SiliconFlow" price_in = 2.0 price_out = 8.0 -[[models]] -model_identifier = "Pro/deepseek-ai/DeepSeek-R1" -name = "siliconflow-deepseek-r1" -api_provider = "SiliconFlow" -price_in = 4.0 -price_out = 16.0 - [[models]] model_identifier = "Pro/deepseek-ai/DeepSeek-R1-Distill-Qwen-32B" name = "deepseek-r1-distill-qwen-32b"