fix(admin): show the rate that needs fixing in the single-model view too

The listing already renders a stored non-finite rate as text rather than
letting the encoder report it as `null`, indistinguishable from a rate the row
never carried. The single-model view is the other view of that same row — the
one an operator opens from the listing to repair it — and still answered
`null`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011cKHVF5LA7TR5QuYi6ErLM
This commit is contained in:
Jeroen Ubbink
2026-08-25 20:28:16 +02:00
co-authored by Claude Opus 5
parent 6e5a388ee4
commit 86be12f4be
+7 -3
View File
@@ -682,9 +682,13 @@ async def get_provider_model(provider_id: str, model_id: str) -> dict[str, objec
raise HTTPException(
status_code=404, detail="Model not found for this provider"
)
return _row_to_model(
row, apply_provider_fee=False, provider_fee=provider.provider_fee
).dict() # type: ignore
# Same duty as the listing this view is opened from: a stored rate that
# is not a usable number must be shown as it is, not encoded as `null`.
return json_compliant( # type: ignore[return-value]
_row_to_model(
row, apply_provider_fee=False, provider_fee=provider.provider_fee
).dict()
)
@admin_router.delete(