This commit is contained in:
Shroominic
2025-10-18 13:29:37 +08:00
parent eda1f8dadf
commit 229702a983
+9 -2
View File
@@ -199,12 +199,19 @@ def _model_to_row_payload(model: Model) -> dict[str, str | int | None]:
# Create adjusted pricing with fees applied
adjusted_pricing = model.pricing.dict()
for key in ['prompt', 'completion', 'request', 'image', 'web_search', 'internal_reasoning']:
for key in [
"prompt",
"completion",
"request",
"image",
"web_search",
"internal_reasoning",
]:
if key in adjusted_pricing:
adjusted_pricing[key] = adjusted_pricing[key] * total_fee_multiplier
# Also adjust max costs if present
for key in ['max_prompt_cost', 'max_completion_cost', 'max_cost']:
for key in ["max_prompt_cost", "max_completion_cost", "max_cost"]:
if key in adjusted_pricing:
adjusted_pricing[key] = adjusted_pricing[key] * total_fee_multiplier