mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 09:20:22 +08:00
feat: 模型列表 API 支持格式转换兼容性过滤
- 新增 get_compatible_provider_formats 函数,基于端点 format_acceptance_config 过滤兼容的 Provider - 模型列表查询根据客户端格式和全局转换开关返回可用模型 - 缓存 key 增加 client_format 维度,避免不同格式的缓存混用 - GlobalModel 解析支持 provider_model_mappings 和 model_mappings 匹配 - 修复格式兼容性检查中 config 类型校验缺失问题
This commit is contained in:
@@ -70,6 +70,8 @@ def is_format_compatible(
|
||||
return False, False, "端点未配置格式转换"
|
||||
|
||||
config = endpoint_format_acceptance_config
|
||||
if not isinstance(config, dict):
|
||||
return False, False, "端点格式配置无效"
|
||||
if not config.get("enabled", False):
|
||||
return False, False, "端点格式转换未启用"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user