from pydantic import Field from pydantic_settings import BaseSettings, SettingsConfigDict class DeepSeekVolcengineConfig(BaseSettings): """DeepSeek 火山引擎 Ark API 配置""" api_key: str = Field( default="ark-0d5dd17a-35a1-48dc-817a-f2f69c743acb-701ce", description="火山引擎 Ark API Key", ) base_url: str = Field( default="https://ark.cn-beijing.volces.com/api/v3", description="火山引擎 Ark API 地址", ) pro_model: str = Field( default="ep-20260625202225-w4vkd", description="DeepSeek V4-Pro (火山引擎)" ) reasoner_model: str = Field( default="ep-20260625202225-w4vkd", description="DeepSeek 推理模型 (火山引擎)" ) chat_model: str = Field( default="ep-20260625202225-w4vkd", description="DeepSeek 对话模型 (火山引擎)" ) model_config = SettingsConfigDict( env_prefix="DEEPSEEK_VOLCENGINE_", env_file=".env", case_sensitive=False, extra="ignore", ) def get_model_map(self) -> dict: """获取模型映射字典,兼容旧代码""" return { "DeepSeek-R1": self.reasoner_model, "DeepSeek-V3": self.chat_model, }