Issue:
When using Vapi's built-in Langfuse integration, tool call messages are logged with camelCase field names instead of snake_case, making them incompatible with the OpenAI API format.
Current behavior:
  • Messages logged as:
    toolCalls
    ,
    toolCallId
  • OpenAI API expects:
    tool_calls
    ,
    tool_call_id
Impact:
Langfuse Playground cannot replay conversations containing tool calls because it receives a 400 error:
"Invalid parameter: messages with role 'tool' must be a response to a preceding message with 'tool_calls'."
Steps to reproduce:
  1. Enable Langfuse integration in Vapi (Settings → Integrations)
  2. Create an assistant that uses function/tool calls
  3. Make a call that triggers a tool
  4. View the trace in Langfuse
  5. Select a Generation after the tool call
  6. Click "Playground" button
  7. Click "Submit"
  8. Observe 400 error
Expected behavior:
Tool call messages should use snake_case (
tool_calls
,
tool_call_id
) to match OpenAI API spec, allowing Playground to function correctly.