debug: add logging for model support checking and refactor cache resolution priority

- 在 aware_scheduler.py 中添加调试日志,用于跟踪模型支持检查过程
- 重构 model_cache.py 的别名解析逻辑:调整优先级为 alias > provider_model_name > direct_match
- 优化缓存命中路径,将直接匹配逻辑移到别名匹配失败后执行
This commit is contained in:
fawney19
2025-12-15 18:52:34 +08:00
parent 84d4db0f8d
commit a7bfab1475
2 changed files with 84 additions and 65 deletions

View File

@@ -802,6 +802,11 @@ 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()