feat: Add Civitai model version retrieval for Checkpoints and update error handling in download managers

This commit is contained in:
Will Miao
2025-04-13 20:36:19 +08:00
parent 8854334ab5
commit 9822f2c614
6 changed files with 84 additions and 9 deletions

View File

@@ -172,7 +172,11 @@ class CivitaiClient:
if response.status != 200:
return None
data = await response.json()
return data.get('modelVersions', [])
# Also return model type along with versions
return {
'modelVersions': data.get('modelVersions', []),
'type': data.get('type', '')
}
except Exception as e:
logger.error(f"Error fetching model versions: {e}")
return None