Skip to content

Release: Follow-up prompts with Langfuse tracking - #665

Merged
maxtechera merged 7 commits into
productionfrom
staging
Nov 6, 2025
Merged

Release: Follow-up prompts with Langfuse tracking#665
maxtechera merged 7 commits into
productionfrom
staging

Conversation

@maxtechera

Copy link
Copy Markdown
Collaborator

Summary

  • Add Answer FollowUpPrompts providers with Langfuse tracking
  • Fix follow-up prompts display and format
  • Fix env var typos and Google Gemini icons
  • Create standalone Langfuse trace for chatflows

Changes

  • 9 files changed, 360 insertions(+), 26 deletions(-)

Commits

  • feat: add Langfuse tracking for AAI follow-up prompts
  • feat: enhance follow-up prompt trace metadata with messageId
  • fix: create standalone Langfuse trace for chatflows
  • fix: revert to AAI_DEFAULT_ANTHROPHIC (existing env var)
  • fix: correct env var typo and Google Gemini icons
  • fix(ui): followup prompts displayed
  • fix(ui): followup prompts wrong format

- Add CallbackHandler integration for automatic token/cost tracking
- Support 4 AAI providers (OpenAI, Anthropic, Google Gemini, Groq)
- Implement nested tracing for agentflows via root parameter
- Extract createLangfuseCallbacks helper to reduce merge conflicts
- Pass parentLangfuseTrace, sessionId, userId through call chain
- Update all 9 LLM invoke() calls to pass callbacks parameter

Benefits:
- Automatic token tracking (no manual extraction)
- Full cost attribution for billing
- Proper trace hierarchy in Langfuse UI
- Tagged with 'follow-up-prompts' for easy filtering
- Graceful fallback if Langfuse disabled

Files modified:
- packages/components/src/followUpPrompts.ts
- packages/server/src/utils/buildAgentflow.ts
- packages/server/src/utils/buildChatflow.ts
…angfuse-tracking

feat: add Langfuse tracking for follow-up prompts with 4 AAI providers
@vercel

vercel Bot commented Nov 6, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
answerai-docs Ready Ready Preview Nov 6, 2025 2:18pm
the-answerai Building Building Preview Nov 6, 2025 2:18pm

@maxtechera
maxtechera merged commit 39484a1 into production Nov 6, 2025
10 of 12 checks passed
@maxtechera
maxtechera temporarily deployed to staging - aai-unified2-flowise-moonstruck November 6, 2025 14:19 — with Render Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant