Commit Graph

6 Commits

Author SHA1 Message Date
fawney19
a7bfab1475 debug: add logging for model support checking and refactor cache resolution priority
- 在 aware_scheduler.py 中添加调试日志,用于跟踪模型支持检查过程
- 重构 model_cache.py 的别名解析逻辑:调整优先级为 alias > provider_model_name > direct_match
- 优化缓存命中路径,将直接匹配逻辑移到别名匹配失败后执行
2025-12-15 18:52:34 +08:00
fawney19
903b182fdf fix(scheduler): correct whitelist validation logic
- Use 'is not None' instead of truthiness check for allowed_api_formats
- Use 'is not None' instead of truthiness check for allowed_models
- Use 'is not None' instead of truthiness check for allowed_providers
- Use 'is not None' check for allowed_endpoints to distinguish empty list from None
- Fixes issue where empty whitelist (empty list) was incorrectly treated as no restriction
2025-12-15 18:27:41 +08:00
fawney19
8f0a0cbdb1 refactor(scheduler): integrate model alias resolution
- Use ModelCacheService.resolve_global_model_by_name_or_alias() for model lookups
- Support both requested model name and resolved GlobalModel name in validation
- Track resolved_model_name for proper allow_models checking
- Improve model availability checks to handle alias resolution
- Fix transient/detached object handling in global_model merge
- Add more descriptive debug logs for alias resolution mismatches
- Clean up code formatting (line length, imports organization)
2025-12-15 18:13:35 +08:00
fawney19
7068aa9130 refactor(backend): optimize cache system and model/provider services 2025-12-15 14:30:21 +08:00
fawney19
abc41c7d3c feat: 添加缓存监控和使用量统计 API 端点 2025-12-11 17:47:59 +08:00
fawney19
f784106826 Initial commit 2025-12-10 20:52:44 +08:00