feat(models): 模型映射支持按提供商分组并自动关联

- 映射匹配结果按提供商分组显示,支持单个关联
- 保存映射规则时自动批量关联未关联的提供商
- 优化模型详情加载逻辑,并行获取最新数据
- 移除冗余的调度器日志输出
This commit is contained in:
fawney19
2026-01-15 02:11:44 +08:00
parent 84f46d5ea7
commit 4835ca13f5
5 changed files with 169 additions and 28 deletions

View File

@@ -390,6 +390,7 @@ def check_model_allowed_with_mappings(
# 获取 allowed_models 的集合
allowed_set = normalize_allowed_models(allowed_models)
if allowed_set is None:
# 不限制,已在 check_model_allowed 中返回 True
return True, None

View File

@@ -830,11 +830,6 @@ class CacheAwareScheduler:
# 查询该 Provider 是否有实现这个 GlobalModel
for model in provider.models:
if model.global_model_id == global_model.id and model.is_active:
logger.debug(
f"[_check_model_support_for_global_model] Provider={provider.name}, "
f"GlobalModel={global_model.name}, "
f"provider_model_name={model.provider_model_name}"
)
# 检查流式支持
if is_stream:
supports_streaming = model.get_effective_supports_streaming()