This commit is contained in:
9qeklajc
2025-11-04 23:29:07 +01:00
parent ded82cd729
commit 88fbefbd18
2 changed files with 2 additions and 5 deletions
-2
View File
@@ -577,7 +577,6 @@ async def _cleanup_enabled_models_once() -> None:
for db_model in db_models:
# Find corresponding upstream model
print(db_model.id)
upstream_model = None
for upstream in upstreams:
upstream_model = upstream.get_cached_model_by_id(db_model.id)
@@ -628,7 +627,6 @@ def _pricing_matches(
for key in keys_to_compare:
db_val = float(db_pricing.get(key, 0.0)) * 1000000
upstream_val = float(upstream_pricing.get(key, 0.0)) * 1000000
print(db_val - upstream_val)
if abs(db_val - upstream_val) > tolerance:
return False
+2 -3
View File
@@ -3,7 +3,7 @@ from typing import Any
from fastapi import APIRouter, Depends, HTTPException, Request
from fastapi.responses import Response, StreamingResponse
from sqlmodel import select
from sqlmodel import select
from .algorithm import create_model_mappings
from .auth import pay_for_request, revert_pay_for_request, validate_bearer_key
@@ -83,7 +83,7 @@ async def refresh_model_maps() -> None:
# Gather database overrides and disabled models
async with create_session() as session:
result = await session.exec(select(ModelRow).where(ModelRow.enabled == True))
result = await session.exec(select(ModelRow).where(ModelRow.enabled))
override_rows = result.all()
provider_result = await session.exec(select(UpstreamProviderRow))
@@ -104,7 +104,6 @@ async def refresh_model_maps() -> None:
select(ModelRow.id).where(~ModelRow.enabled)
)
disabled_model_ids = {row for row in disabled_result.all()}
print(disabled_model_ids)
_model_instances, _provider_map, _unique_models = create_model_mappings(
upstreams=_upstreams,