mirror of
https://github.com/vxcontrol/pentagi.git
synced 2026-07-21 08:15:23 -04:00
[PR #102] [MERGED] langchaingo update and observability improvements #161
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/vxcontrol/pentagi/pull/102
Author: @asdek
Created: 2/18/2026
Status: ✅ Merged
Merged: 2/18/2026
Merged by: @asdek
Base:
master← Head:feat/langchaingo_update📝 Commits (10+)
e6cbf4afeat: major langchaingo dependency update and add product working analysis API8f1f9eefeat: update graphiti-go-client dependency and enhance observability integrationfd60a8ffeat: add analytics service and endpoints for usage statisticse193390fix: typo in graphiti source descriptiond307fa1feat: enhance summarization handling for reasoning signaturese68e237feat: enhance summarization functionality for multi-provider compatibilityefd966crefactor: replace newID() with newSpanID() for W3C compliance16bd43cfix: chain summarization with critical guarantees4065300chore: update base image in Dockerfile from alpine:3.22.1 to alpine:3.23.3d84d93bchore: update model and pricing in moonshot provider configuration📊 Changes
277 files changed (+99895 additions, -18833 deletions)
View changed files
📝
.env.example(+2 -0)📝
.vscode/launch.json(+5 -3)📝
.vscode/settings.json(+2 -2)📝
Dockerfile(+8 -7)📝
README.md(+104 -57)📝
backend/cmd/ctester/main.go(+4 -0)📝
backend/cmd/ftester/mocks/logs.go(+17 -1)📝
backend/cmd/ftester/worker/executor.go(+6 -0)📝
backend/cmd/ftester/worker/tester.go(+6 -5)📝
backend/cmd/installer/wizard/controller/controller.go(+19 -3)📝
backend/cmd/installer/wizard/locale/locale.go(+9 -0)📝
backend/cmd/installer/wizard/models/llm_provider_form.go(+50 -0)➕
backend/docs/analytics_api.md(+1005 -0)📝
backend/docs/chain_ast.md(+106 -1)📝
backend/docs/chain_summary.md(+208 -10)📝
backend/docs/config.md(+158 -144)📝
backend/docs/controller.md(+1 -1)📝
backend/docs/database.md(+587 -47)📝
backend/docs/langfuse.md(+534 -37)➕
backend/docs/llms_how_to.md(+1865 -0)...and 80 more files
📄 Description
Description of the Change
This PR introduces a major update to the langchaingo dependency and implements comprehensive observability improvements across the system. It also adds analytics capabilities, enhances chain summarization logic, and includes various UI/UX improvements.
Problem
The system required several critical improvements:
Solution
Backend Infrastructure:
LLM_SERVER_PROVIDERandLLM_SERVER_PRESERVE_REASONINGenvironment variablesFrontend Improvements:
DevOps & Configuration:
Database & Analytics:
Closes #
Type of Change
Areas Affected
Testing and Verification
The changes have been tested across multiple LLM providers and system components to ensure compatibility and stability.
Test Configuration
Test Steps
Test Results
Security Considerations
Enhanced Security Measures:
getSafeReturnUrlutility to prevent open redirect vulnerabilities in authentication flowDependency Updates:
No Breaking Security Changes:
Performance Impact
Improvements:
New Analytics Overhead:
Testing:
Recommendations:
created_atfields for faster analytics queries at scaleDocumentation Updates
backend/docs/analytics_api.md- comprehensive analytics API documentationbackend/docs/llms_how_to.md- LLM provider configuration guidebackend/docs/observability.md- enhanced observability documentationbackend/docs/chain_summary.md- chain summarization algorithm detailsbackend/docs/chain_ast.md- AST handling for reasoning signatures.env.examplewith new configuration optionsDeployment Notes
New Environment Variables:
Database Migrations:
The following migrations will run automatically on deployment:
20260128_153000_tool_call_id_template.sql- Adds tool call ID template tracking20260129_120000_add_tracking_fields.sql- Adds analytics tracking fieldsDocker Image Updates:
Recommended Deployment Steps:
feat/langchaingo_updatebranch.envfile with new optional variables (if needed)docker-compose pullto get updated base imagesdocker-compose down && docker-compose up -dfor clean restartGET /api/v1/analytics/usageBackward Compatibility:
Rollback Plan:
If issues occur, rollback is straightforward:
docker-compose up -d --buildChecklist
Code Quality
go fmtandgo vet(for Go code)npm run lint(for TypeScript/JavaScript code)Security
Compatibility
Documentation
Additional Notes
Key Changes Summary:
Langchaingo Update (16 commits worth of work):
Observability Enhancements:
Analytics Infrastructure:
Chain Summarization Improvements:
Frontend Enhancements:
Review Focus Areas:
Testing Notes:
Known Limitations:
Migration Path:
This is a non-breaking update. Existing deployments can upgrade without data loss or configuration changes. New features are opt-in via environment variables.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.