From 6eca0ef72c068779814324a8ccecacf23ed2ce54 Mon Sep 17 00:00:00 2001 From: yucheng-berriai Date: Tue, 23 Jun 2026 18:00:50 -0700 Subject: [PATCH] fix(types): widen _emit_deferred_llm_call time params to int | None to_ns() returns int | None and the SpanEmitter.emit accepts int | None for start/end times, but _emit_deferred_llm_call declared them as int, producing 4 reportArgumentType errors the basedpyright delta gate flagged. Widen the params to match. --- litellm/integrations/otel/logger.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/integrations/otel/logger.py b/litellm/integrations/otel/logger.py index 82e4789d86b..0a4402f2027 100644 --- a/litellm/integrations/otel/logger.py +++ b/litellm/integrations/otel/logger.py @@ -362,8 +362,8 @@ class OpenTelemetryV2(CustomLogger): self, payload: "StandardLoggingPayload", destinations: "tuple[OtelDestination, ...]", - start_time_ns: int, - end_time_ns: int, + start_time_ns: int | None, + end_time_ns: int | None, ) -> Span | None: """Emit an LLM-call span outside the ``pre_call`` boundary.