feat(routes): add model versions status endpoint and enhance metadata retrieval

This commit is contained in:
Will Miao
2025-09-17 22:06:59 +08:00
parent 933e2fc01d
commit ded17c1479
4 changed files with 118 additions and 5 deletions

View File

@@ -122,7 +122,8 @@ class CivitaiClient:
# Also return model type along with versions
return {
'modelVersions': result.get('modelVersions', []),
'type': result.get('type', '')
'type': result.get('type', ''),
'name': result.get('name', '')
}
return None
except Exception as e:

View File

@@ -224,6 +224,7 @@ class SQLiteModelMetadataProvider(ModelMetadataProvider):
model_data = json.loads(model_row['data'])
model_type = model_row['type']
model_name = model_row['name']
# Get all versions for this model
versions_query = """
@@ -260,7 +261,8 @@ class SQLiteModelMetadataProvider(ModelMetadataProvider):
return {
'modelVersions': model_versions,
'type': model_type
'type': model_type,
'name': model_name
}
async def get_model_version(self, model_id: int = None, version_id: int = None) -> Optional[Dict]: