mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-16 15:43:13 +08:00
多协议 API Key 供应商(kimi/zhipu/deepseek/minimax/opencode_go)的默认端点 此前在 account.go 的 GetOpenAIBaseURL / defaultCNProtocolBaseURL / GetAnthropicProtocolBaseURL / GetOpenAIFormatBaseURL 中按平台 switch 重复了 四遍,Responses 能力与 OpenCode 内置分流表也各自散落。 新增 provider_profile.go 作为单一数据来源:每个供应商登记各接入模式的 Chat/Anthropic 默认基址、内置 protocol_rules 与原生 Responses 能力; 上述函数、SupportsNativeCNResponses、IsMultiProtocolAPIKeyProvider 与 defaultOpenCodeProtocolRules 改为查表。纯重构,行为不变:新增测试以旧 switch 逻辑为基准,逐一核对平台 × account_mode × 协议的全部组合。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>