fix: resolve SQLModel migrations for .exec() -> .execute().scalars() and API schema issues

This commit is contained in:
oib
2026-03-05 08:28:40 +01:00
parent bbbfbf8dde
commit 1f16a1c406
37 changed files with 243 additions and 238 deletions

View File

@@ -418,10 +418,10 @@ async def get_pricing(
) -> Dict[str, Any]:
"""Get enhanced pricing information for a model with dynamic pricing."""
# SQLite JSON doesn't support array contains, so fetch all and filter in Python
all_gpus = session.execute(select(GPURegistry)).all()
all_gpus = session.execute(select(GPURegistry)).scalars().all()
compatible = [
g for g in all_gpus
if any(model.lower() in cap.lower() for cap in (g.capabilities or []))
if model.lower() in g.model.lower()
]
if not compatible: