mirror of
https://github.com/usestrix/strix.git
synced 2026-09-07 08:25:56 +00:00
fix: Strip custom_llm_provider before cost lookup for proxied models
This commit is contained in:
parent
d2a48e7a6f
commit
bbc7cf41a8
1 changed files with 2 additions and 0 deletions
|
|
@ -259,6 +259,8 @@ class LLM:
|
|||
if direct_cost is not None:
|
||||
return float(direct_cost)
|
||||
try:
|
||||
if hasattr(response, "_hidden_params"):
|
||||
response._hidden_params.pop("custom_llm_provider", None)
|
||||
return completion_cost(response, model=self.config.canonical_model) or 0.0
|
||||
except Exception: # noqa: BLE001
|
||||
return 0.0
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue