Langfuse AI
AI-generatedSummary
Sends a user message and optional conversation history to an OpenAI or Anthropic model, optionally using a Langfuse prompt as the system instruction. Records the trace and generation in Langfuse and returns the model response, conversation messages, usage, and logging status.
Inputs
- Provider and Model — Choose OpenAI (default) or Anthropic and enter a model ID. The matching provider credentials and Langfuse credentials are required.
- User Message (required) — Message sent to the model.
- Prompt Name and System Message — Set a Langfuse prompt name to fetch it as the system instruction; when set, it takes precedence over System Message. If no prompt name is set, an optional System Message is used.
- Advanced fields — Enable Show Advanced Fields to supply prior messages as a JSON array of user/assistant role and content objects, prompt label (default production), prompt version, JSON prompt variables, temperature, max tokens, trace name, session ID, user ID, JSON tags, environment, and provider base URL. A prompt version overrides the label. Blank model settings use provider defaults; Anthropic uses a 1024-token default when Max Tokens is blank.
Output shape
One output item per input item, each containing a JSON object.
Successful items include content, traceId, generationId, provider, model, messages (the conversation plus assistant reply), usage token counts, and logged. loggingError is included if Langfuse logging fails; that logging failure does not discard a successful model response. If the model call fails, the node attempts to log the error and then fails the item, unless Continue On Fail is enabled, in which case the item contains an error message.