ageerle d1a820728f fix(sse): SSE 改为按会话隔离 + 修 trace 租户 bug + 清理冗余
SSE 串台修复:
- SseEmitterManager 新增按 sessionId 维度的 connect/sendEvent/disconnect,
  每个会话一个 SSE 连接,替代原 userId+token 维度(同用户多会话串台)
- SseMessageDto 增加 sessionId + eventDto 字段,跨实例按会话路由
- SseTopicListener 优先按 sessionId 路由,回退原 userId/群发逻辑
- SseMessageUtils 增加 sessionId 重载,对话链路全部切换
- ChatServiceFacade / MyMcpClientListener / WorkflowStarter 切到 sessionId
- 通知/全局 /sse 端点保留 userId 模式(通知按用户)

trace 租户 bug 修复:
- trace_run / trace_node 加入 tenant.excludes,监控表跨租户全局可见,
  绕过异步线程租户上下文不传播导致 node 查不到的问题

冗余清理:
- 删除零使用的 @TraceNode 注解 + TraceNodeAspect 切面 + 对应单测
- TraceProperties 删除 recordDetail/maxInputLength/maxOutputLength
  (仅对已删切面生效,编程式埋点用 RagTracePayloadBuilder 不受影响)
- TracePayloadUtils 删除 input/output/asString 方法
- TraceConstants 删除无引用的 NODE_METHOD/HTTP/DB/CACHE/TASK/STREAM
- TraceContext 删除预留的 copyNodeStack
- TraceNodeVo 删除未用的 children 字段
- TraceRecordServiceImpl.getDetail 删除重复 enrich
- application.yml 删除 trace.payload 无效配置项
- RagTraceNodeTypes 删除无引用的 NODE_STREAM

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-23 15:35:10 +08:00
2026-02-06 03:00:23 +08:00
2026-02-06 03:14:13 +08:00

RuoYi AI

Contributors Forks Stargazers Issues MIT License

GitHub Trending

RuoYi AI Logo

Enterprise-Grade AI Assistant Platform

An out-of-the-box full-stack AI platform supporting multi-agent collaboration, Supervisor mode orchestration, and multiple decision models, with advanced RAG technology and visual workflow orchestration capabilities

中文 | 📖 Documentation | 🚀 Live Demo | 🐛 Report Issues | 💡 Feature Requests

Core Features

Module Current Capabilities
Model Management Multi-model integration (OpenAI/DeepSeek/Tongyi/Zhipu/MiniMax), multi-modal understanding, Coze/DIFY/FastGPT platform integration
Knowledge Base Local RAG + Vector DB (Milvus/Weaviate/Qdrant) + Document parsing
Tool Management MCP protocol integration, Skills capability + Extensible tool ecosystem
Workflow Orchestration Visual workflow designer, drag-and-drop node orchestration, SSE streaming execution, currently supports model calls, email sending, manual review nodes
Multi-Agent Agent framework based on Langchain4j, Supervisor mode orchestration, supports multiple decision models

Project Repositories

Module GitHub Repository Gitee Repository GitCode Repository
🔧 Backend ruoyi-ai ruoyi-ai ruoyi-ai
🎨 User Frontend ruoyi-web ruoyi-web ruoyi-web
🛠️ Admin Panel ruoyi-admin ruoyi-admin ruoyi-admin
🎬 Drama ruoyi-drama ruoyi-drama
🤖 Copilot ruoyi-copilot ruoyi-copilot ruoyi-copilot
📱 Mini-App ruoyi-uniapp ruoyi-uniapp ruoyi-uniapp

Partner Projects

Project Name GitHub Repository Gitee Repository
element-plus-x element-plus-x element-plus-x

🛠️ Technical Architecture

Core Framework

  • Backend: Spring Boot 3.5.8 + Langchain4j
  • Data Storage: MySQL 8.0 + Redis + Vector Databases (Milvus/Weaviate/Qdrant)
  • Frontend: Vue 3 + Vben Admin + element-plus-x
  • Security: Sa-Token + JWT dual-layer security
  • Document Processing: PDF, Word, Excel parsing, intelligent image analysis
  • Real-time Communication: WebSocket real-time communication, SSE streaming response
  • System Monitoring: Comprehensive logging system, performance monitoring, service health checks

🐳 Docker Deployment

This project provides two Docker deployment methods:

Use docker-compose-all.yaml to start all services at once (including backend, admin panel, user frontend, and dependencies):

# Clone the repository
git clone https://github.com/ageerle/ruoyi-ai.git
cd ruoyi-ai

# Start all services (pull pre-built images from registry)
docker-compose -f docker-compose-all.yaml up -d

# Check service status
docker-compose -f docker-compose-all.yaml ps

# Access services
# Admin Panel: http://localhost:25666 (admin / admin123)
# User Frontend: http://localhost:25137
# Backend API: http://localhost:26039

Method 2: Step-by-step Deployment (Source Build)

If you need to build backend services from source, follow these steps:

Step 1: Deploy Backend Service

# Enter backend project directory
cd ruoyi-ai

# Start backend service (build from source)
docker-compose up -d --build

# Wait for backend service to start
docker-compose logs -f backend

Step 2: Deploy Admin Panel

# Enter admin panel project directory
cd ruoyi-admin

# Build and start admin panel
docker-compose up -d --build

# Access admin panel
# URL: http://localhost:5666

Step 3: Deploy User Frontend (Optional)

# Enter user frontend project directory
cd ruoyi-web

# Build and start user frontend
docker-compose up -d --build

# Access user frontend
# URL: http://localhost:5137

Service Ports

Service One-click Port Step-by-step Port Description
Admin Panel 25666 5666 Admin backend access
User Frontend 25137 5137 User frontend access
Backend Service 26039 6039 Backend API service
MySQL 23306 23306 Database service
Redis 26379 6379 Cache service
Weaviate 28080 28080 Vector database
MinIO API 29000 9000 Object storage API
MinIO Console 29090 9090 Object storage console

Image Registry

All images are hosted on Alibaba Cloud Container Registry:

crpi-31mraxd99y2gqdgr.cn-beijing.personal.cr.aliyuncs.com/ruoyi_ai

Available images:

  • mysql:v3 - MySQL database (includes initialization SQL)
  • redis:6.2 - Redis cache
  • weaviate:1.30.0 - Vector database
  • minio:latest - Object storage
  • ruoyi-ai-backend:latest - Backend service
  • ruoyi-ai-admin:latest - Admin frontend
  • ruoyi-ai-web:latest - User frontend

Common Commands

# Stop all services
docker-compose -f docker-compose-all.yaml down

# View service logs
docker-compose -f docker-compose-all.yaml logs -f [service-name]

# Restart a service
docker-compose -f docker-compose-all.yaml restart [service-name]

MiniMax Configuration

The built-in MiniMax provider accepts one API Host value and selects the matching protocol adapter. Use a Base URL from this table:

Region OpenAI-compatible Base URL Anthropic-compatible Base URL
Global https://api.minimax.io/v1 https://api.minimax.io/anthropic
China https://api.minimaxi.com/v1 https://api.minimaxi.com/anthropic

For Anthropic-compatible requests, configure the Base URL ending in /anthropic. Do not append /v1 or /v1/messages; the provider adapter derives the request path internally.

Model ID Total context Input modalities Thinking
MiniMax-M3 1,000,000 tokens Text, image, video Adaptive or disabled
MiniMax-M2.7 204,800 tokens Text Always on

Current pay-as-you-go prices are in USD per million tokens:

Model Service tier and input range Input Output Cache read Cache write
MiniMax-M3 Standard, up to 512,000 input tokens $0.30 $1.20 $0.06 Not listed
MiniMax-M3 Standard, over 512,000 input tokens $0.60 $2.40 $0.12 Not listed
MiniMax-M3 Priority, up to 512,000 input tokens $0.45 $1.80 $0.09 Not listed
MiniMax-M3 Priority, over 512,000 input tokens $0.90 $3.60 $0.18 Not listed
MiniMax-M2.7 Standard $0.30 $1.20 $0.06 $0.375

See the official API overview and pay-as-you-go pricing for current details.

📚 Documentation

Want to learn more about installation, deployment, configuration, and secondary development?

👉 Complete Documentation

🤝 Contributing

We warmly welcome community contributions! Whether you are a seasoned developer or just getting started, you can contribute to the project 💪

How to Contribute

  1. Fork the project to your account
  2. Create a branch (git checkout -b feature/new-feature-name)
  3. Commit your changes (git commit -m 'Add new feature')
  4. Push to the branch (git push origin feature/new-feature-name)
  5. Create a Pull Request

💡 Tip: We recommend submitting PRs to GitHub, we will automatically sync to other code hosting platforms

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.

🙏 Acknowledgments

Thanks to the following excellent open-source projects for their support:

💎 Sponsors

Thanks to the following sponsors for supporting this project:

Atlas Cloud

Visit Atlas Cloud · Coding Plan Promotion A full-modal AI inference platform that gives developers a unified AI API, supporting video generation, image generation, and LLMs. Connect once to access 300+ curated models.

Volcengine CodingPlan

Volcengine CodingPlan Developer Program Volcengine is ByteDance's cloud and AI service platform. Volcengine Ark provides API access to Doubao LLM, DeepSeek, and more — a one-stop AI development and inference platform for developers.

💬 Community Chat

WeChat QR Code
Scan to add author on WeChat
Join group for learning
QQ Group QR Code
QQ Tech Exchange Group
Technical discussion

Star to SupportFork to Contribute📚 中文📖 Complete Documentation

Built with ❤️, maintained by the RuoYi AI open-source community

Description
No description provided
Readme MIT 72 MiB
Languages
Java 95.5%
Python 4.4%