diff --git a/langfuse/langchain/CallbackHandler.py b/langfuse/langchain/CallbackHandler.py index 20bfa2534..b4c27c3bc 100644 --- a/langfuse/langchain/CallbackHandler.py +++ b/langfuse/langchain/CallbackHandler.py @@ -218,6 +218,7 @@ def on_retriever_error( level="ERROR", status_message=str(error), input=kwargs.get("inputs"), + cost_details={"total": 0}, ).end() except Exception as e: @@ -527,6 +528,7 @@ def on_chain_error( ), status_message=str(error) if level else None, input=kwargs.get("inputs"), + cost_details={"total": 0}, ).end() except Exception as e: @@ -733,6 +735,7 @@ def on_tool_error( status_message=str(error), level="ERROR", input=kwargs.get("inputs"), + cost_details={"total": 0}, ).end() except Exception as e: @@ -913,6 +916,7 @@ def on_llm_error( status_message=str(error), level="ERROR", input=kwargs.get("inputs"), + cost_details={"total": 0}, ).end() except Exception as e: