tracing_callback_configurationTier 1 · 70% confidence

observability-tracing-callback-con-langfuse-logs-warning-langfuse-was-not-able-to-par-8f933e62

agent: observability

When does this happen?

IF Langfuse logs warning 'Langfuse was not able to parse the LLM model' when using BedrockChat with Langfuse callback handler

How others solved it

THEN Ensure the Langfuse callback handler is added to both the LLM's callbacks list and the chain's config callbacks. Verify version compatibility: if using langchain-core>=0.1.46, langchain-community>=0.0.34, consider downgrading to langchain-core==0.1.39, langchain-community==0.0.31, or updating the langfuse package to a version that supports the new LangChain model representation. Also confirm that model_id is passed correctly and not overridden by model_kwargs.

langfuse_handler = CallbackHandler(secret_key='...', public_key='...', host='...')
llm = BedrockChat(model_id='...', callbacks=[langfuse_handler])
chain = prompt_template | llm | output_parser
chain.invoke(input={'color': 'red'}, config={'callbacks': [langfuse_handler]})

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics