From de3d6b999b1e7265ab0f9658096a581968177789 Mon Sep 17 00:00:00 2001 From: yucheng Date: Fri, 25 Sep 2026 17:27:21 +0000 Subject: [PATCH] fix(otel): put the mutable-ok suppression on the dict construction line the type-discipline gate reports Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- litellm/integrations/otel/mappers/langfuse.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/litellm/integrations/otel/mappers/langfuse.py b/litellm/integrations/otel/mappers/langfuse.py index a5857a7b856..96464e821d8 100644 --- a/litellm/integrations/otel/mappers/langfuse.py +++ b/litellm/integrations/otel/mappers/langfuse.py @@ -84,9 +84,7 @@ class LangfuseMapper: # JSON-payload attributes: each builder returns the serialized blob or None. _BLOB_ATTRS: dict[str, Callable[[LLMCallSpanData], AttrValue | None]] = { LANGFUSE_OBSERVATION_METADATA: lambda d: ( - safe_dumps( # mutable-ok: safe_dumps only serializes real dicts - dict(d.request_metadata) - ) + safe_dumps(dict(d.request_metadata)) # mutable-ok: safe_dumps only serializes real dicts if d.request_metadata else None ),