From a3dc2ca4384e3baca14e1c2e56c851e97c0c3047 Mon Sep 17 00:00:00 2001 From: 0xallam Date: Fri, 20 Feb 2026 06:52:27 -0800 Subject: [PATCH] fix: Strip custom_llm_provider before cost lookup for proxied models --- strix/llm/llm.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/strix/llm/llm.py b/strix/llm/llm.py index c38bbe1d..50501aa7 100644 --- a/strix/llm/llm.py +++ b/strix/llm/llm.py @@ -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