From b29e7bd7c1eda12b29e3c536cf756002340bc2bb Mon Sep 17 00:00:00 2001 From: Zachary Lyon Date: Thu, 17 Sep 2026 15:31:28 -0700 Subject: [PATCH] chore(proxy): satisfy ratcheted BLE001/LIT002 budgets from main in tinyfish handler Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01Pxz11TQKYvCXvKawNUa2g4 --- .../tinyfish_passthrough_logging_handler.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/litellm/proxy/pass_through_endpoints/llm_provider_handlers/tinyfish_passthrough_logging_handler.py b/litellm/proxy/pass_through_endpoints/llm_provider_handlers/tinyfish_passthrough_logging_handler.py index 915ef042bf0..a6c3cb669a6 100644 --- a/litellm/proxy/pass_through_endpoints/llm_provider_handlers/tinyfish_passthrough_logging_handler.py +++ b/litellm/proxy/pass_through_endpoints/llm_provider_handlers/tinyfish_passthrough_logging_handler.py @@ -163,7 +163,7 @@ class TinyFishPassthroughLoggingHandler: end_time=end_time, kwargs=kwargs, ).as_handler_result() - except Exception as e: + except Exception as e: # noqa: BLE001 # billing/logging must never break the relayed request verbose_proxy_logger.exception("Error in TinyFish passthrough logging handler: %s", e) fallback_payload: Final[PassThroughEndpointLoggingTypedDict] = { "result": StandardPassThroughResponseObject(response=result), @@ -256,7 +256,7 @@ class TinyFishPassthroughLoggingHandler: cache_hit=cache_hit, **payload.kwargs, ) - except Exception as e: + except Exception as e: # noqa: BLE001 # billing/logging must never break the relayed request verbose_proxy_logger.exception("[Non blocking logging error] TinyFish run-async billing failed: %s", e) @staticmethod @@ -325,7 +325,7 @@ class TinyFishPassthroughLoggingHandler: return None payload: Final[object] = response.json() # any-ok: httpx Response.json() -> Any return _parse_run(payload) - except Exception as e: + except Exception as e: # noqa: BLE001 # billing/logging must never break the relayed request verbose_proxy_logger.warning("[Non blocking logging error] TinyFish run fetch failed: %s", e) return None @@ -354,7 +354,7 @@ class TinyFishPassthroughLoggingHandler: end_time=end_time, kwargs=_EMPTY_KWARGS, ).as_handler_result() - except Exception as e: + except Exception as e: # noqa: BLE001 # billing/logging must never break the relayed request verbose_proxy_logger.exception("Error in TinyFish SSE passthrough logging handler: %s", e) fallback_payload: Final[PassThroughEndpointLoggingTypedDict] = { "result": StandardPassThroughResponseObject(response=""), @@ -383,7 +383,7 @@ class TinyFishPassthroughLoggingHandler: # the poller paths pass no request kwargs, so SLO attribution (key hash, team, tags) needs the stored params "litellm_params": kwargs.get("litellm_params") or logging_obj.model_call_details.get("litellm_params") - or {}, + or {}, # mutable-ok: the logging pipeline requires a plain kwargs dict } logging_obj.model_call_details.update( model=TINYFISH_MODEL_NAME,