Integration Flowise with Langfuse, model and token are not in Langfuse #5250
Replies: 2 comments
|
I think none of the Analyse Chatflow modules are working in the new Agentflow v2. I have tried Langfuse, Lunary, and LangWatch |
|
@mdtelvivait The important clue is that your response already contains: "usageMetadata": {
"input_tokens": 149,
"output_tokens": 24,
"total_tokens": 173
},
"responseMetadata": {
"model_name": "gpt-4o-2024-08-06"
}So OpenAI is returning both the model name and token usage, and Flowise is exposing them in the execution output. That suggests the problem is not with the LLM provider. Instead, it points to the observability integration between Agentflow V2 and Langfuse. The fact that another user reports seeing the same behavior with Langfuse, Lunary, and LangWatch also makes me suspect this isn't specific to Langfuse, but rather that the Analyze Chatflow/observability modules are not yet fully wired into Agentflow V2. From what I could find:
A few things I'd verify:
Given the evidence, I'd lean toward this being an Agentflow V2 implementation gap or regression, rather than a Langfuse configuration issue, since:
If other users can reproduce this with Agentflow V2 while Chatflows work correctly, it would probably be worth opening a GitHub Issue so the maintainers can confirm whether this is an expected limitation or a bug. If this solves your problem, feel free to mark it as the accepted answer so others can find it easily. |
Uh oh!
There was an error while loading. Please reload this page.
Hi, i'm asking for help cause i don't know what else i can do
I'm using Flowise 3.0.5 (selfhosted) and agentflowsV2
I have connected my agent to Langfuse (cloud)
Traces are correctly being ingested by Langfuse. I can see sessions, traces, observations...but i don't get any information regarding models or tokens
There not so much i can do at langfuse side, and i don't know what whould i do in Flowise side in order to Langfuse to ingest information regarding models and tokens
Json i get from Flowise when invoqued is shown above
I can see there is information regarding models and tokens
{
"text": "Los datos que mencioné son de 2022, según el Instituto Nacional de Estadística (INE) de España.",
"question": "¿De que año son esos datos?",
"chatId": "234243579284759287531",
"chatMessageId": "d79acc9e-5b58-4869-8b20-9ed3a7209761",
"executionId": "e07e1046-3128-44cd-90da-61458b1aa0b6",
"agentFlowExecutedData": [
{
"nodeId": "startAgentflow_0",
"nodeLabel": "Start",
"data": {
"id": "startAgentflow_0",
"name": "startAgentflow",
"input": {
"question": "¿De que año son esos datos?"
},
"output": {
"question": "¿De que año son esos datos?"
},
"state": {}
},
"previousNodeIds": [],
"status": "FINISHED"
},
{
"nodeId": "agentAgentflow_0",
"nodeLabel": "Agente",
"data": {
"id": "agentAgentflow_0",
"name": "agentAgentflow",
"input": {
"messages": [
{
"role": "system",
"content": "Si el usuario se despide devuelve solo la cadena "AGENTE"\n\nResponde a lo que te pregunten"
},
{
"role": "user",
"content": "¿Cuantos habitantes tiene la provincia de León?"
},
{
"role": "assistant",
"content": "Según los datos del Instituto Nacional de Estadística (INE) de España, la provincia de León tenía aproximadamente 451,706 habitantes en 2022. Ten en cuenta que estas cifras pueden cambiar con el tiempo a medida que se actualizan los censos."
},
{
"role": "user",
"content": "¿De que año son esos datos?"
}
],
"agentModel": "chatOpenAI",
"agentEnableMemory": true,
"agentMemoryType": "allMessages",
"agentReturnResponseAs": "userMessage",
"agentModelConfig": {
"cache": "",
"modelName": "gpt-4o",
"temperature": 0.9,
"streaming": true,
"maxTokens": "",
"topP": "",
"frequencyPenalty": "",
"presencePenalty": "",
"timeout": "",
"strictToolCalling": "",
"stopSequence": "",
"basepath": "",
"proxyUrl": "",
"baseOptions": "",
"allowImageUploads": "",
"reasoning": "",
"agentModel": "chatOpenAI"
}
},
"output": {
"content": "Los datos que mencioné son de 2022, según el Instituto Nacional de Estadística (INE) de España.",
"timeMetadata": {
"start": 1758707837215,
"end": 1758707838402,
"delta": 1187
},
"calledTools": [],
"usageMetadata": {
"input_tokens": 149,
"output_tokens": 24,
"total_tokens": 173,
"input_token_details": {
"audio": 0,
"cache_read": 0
},
"output_token_details": {
"audio": 0,
"reasoning": 0
},
"tool_call_tokens": 0
},
"responseMetadata": {
"prompt": 0,
"completion": 0,
"usage": {
"prompt_tokens": 149,
"completion_tokens": 24,
"total_tokens": 173,
"prompt_tokens_details": {
"cached_tokens": 0,
"audio_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 0,
"audio_tokens": 0,
"accepted_prediction_tokens": 0,
"rejected_prediction_tokens": 0
}
},
"finish_reason": "stop",
"system_fingerprint": "fp_cbf1785567",
"model_name": "gpt-4o-2024-08-06",
"service_tier": "default"
}
},
"state": {},
"chatHistory": [
{
"role": "user",
"content": "¿De que año son esos datos?"
},
{
"role": "user",
"content": "Los datos que mencioné son de 2022, según el Instituto Nacional de Estadística (INE) de España.",
"name": "agente"
}
]
},
"previousNodeIds": [
"startAgentflow_0"
],
"status": "FINISHED"
}
],
"sessionId": "234243579284759287531"
}
Thanks in advance
Alfredo
All reactions