From 6cc8fd55da2f888f40938fe96f7ed2dad120f803 Mon Sep 17 00:00:00 2001 From: Mark Backman Date: Wed, 12 Nov 2025 11:53:03 -0500 Subject: [PATCH] Remove fallback conditions for LLM tracing --- src/pipecat/utils/tracing/service_decorators.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/pipecat/utils/tracing/service_decorators.py b/src/pipecat/utils/tracing/service_decorators.py index 3c743c1a6..c1c4d661f 100644 --- a/src/pipecat/utils/tracing/service_decorators.py +++ b/src/pipecat/utils/tracing/service_decorators.py @@ -399,11 +399,6 @@ def traced_llm(func: Optional[Callable] = None, *, name: Optional[str] = None) - if hasattr(self, "get_llm_adapter"): adapter = self.get_llm_adapter() messages = adapter.get_messages_for_logging(context) - elif hasattr(context, "get_messages"): - # Fallback for unknown context types - messages = context.get_messages() - elif hasattr(context, "messages"): - messages = context.messages # Serialize messages if available if messages: @@ -424,9 +419,6 @@ def traced_llm(func: Optional[Callable] = None, *, name: Optional[str] = None) - if hasattr(self, "get_llm_adapter") and hasattr(context, "tools"): adapter = self.get_llm_adapter() tools = adapter.from_standard_tools(context.tools) - elif hasattr(context, "tools"): - # Fallback for unknown context types - tools = context.tools # Serialize and count tools if available # Check if tools is not None and not NOT_GIVEN (using attribute check as fallback)