mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 17:30:23 +08:00
refactor: 简化模型权限检查,移除 resolved_model_name 参数
- 从 check_model_allowed 和 check_model_allowed_with_mappings 移除 resolved_model_name 参数 - 优化匹配逻辑:先精确匹配 model_name,再检查 candidate_models 交集,最后进行映射匹配 - 更新 CacheAwareScheduler 中的相关调用,传入 provider_model_names 作为 candidate_models - 同步更新测试用例
This commit is contained in:
@@ -270,7 +270,6 @@ def _get_available_model_ids_for_format(db: Session, api_formats: list[str]) ->
|
||||
is_allowed, _ = check_model_allowed_with_mappings(
|
||||
model_name=model_id,
|
||||
allowed_models=allowed_models,
|
||||
resolved_model_name=model.provider_model_name,
|
||||
model_mappings=model_mappings,
|
||||
)
|
||||
if is_allowed:
|
||||
|
||||
Reference in New Issue
Block a user