Merge pull request #660 from supreme0597/fix/model-cache-import

Fix/model cache import
This commit is contained in:
Wenjie Zhang 2026-04-27 18:08:47 +08:00 committed by GitHub
commit ebf0ed9975
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -193,6 +193,8 @@ async def refresh_model_cache(
):
"""强制刷新模型缓存,从数据库重新加载所有供应商配置到 Redis。"""
await _refresh_model_cache()
from yuxi.services.model_cache import model_cache
return {"success": True, "message": "缓存已刷新", "model_count": len(model_cache.get_all_specs())}