fixed a bug with top provider not being null but the variables inside were null

This commit is contained in:
redshift
2025-08-06 13:28:05 -03:00
parent d1aef23626
commit 17414065d1
+1 -1
View File
@@ -91,7 +91,7 @@ async def update_sats_pricing() -> None:
)
mspp = model.sats_pricing.prompt
mspc = model.sats_pricing.completion
if model.top_provider:
if (tp:= model.top_provider) and tp.context_length or tp.max_completion_tokens:
if (cl := model.top_provider.context_length) and (
mct := model.top_provider.max_completion_tokens
):