Commit graph

629 commits

Author SHA1 Message Date
Raphaël MANSUY
cf75f71291 ci: fix lint/pre-commit issues and apply autoformat 2025-12-05 14:31:13 +08:00
Raphaël MANSUY
0f7b8ff0a3 Fix: reset document status endpoint (dict access) and add UI 'Reset to Pending' + error handler improvements and translations 2025-12-05 13:07:44 +08:00
Raphaël MANSUY
e4962dd2a5 feat: Enhance multi-tenant support by allowing unauthenticated access and updating document routes to use tenant-specific RAG instances 2025-12-05 00:55:09 +08:00
Raphaël MANSUY
730c406749 feat: Implement multi-tenant support across graph and query routes
- Enhanced graph_routes.py and query_routes.py to support multi-tenant architecture by introducing tenant-specific RAG instances.
- Updated create_graph_routes and create_query_routes functions to accept rag_manager for tenant management.
- Added get_tenant_rag dependency to all relevant endpoints to ensure tenant context is utilized for operations.
- Modified Vite configuration to include comprehensive API proxy rules for seamless interaction with backend services.
- Implemented cascade delete functionality in tenant_service.py for tenant and knowledge base deletions.
- Added detailed logging and error handling for tenant operations.
- Created audit logs documenting the multi-tenant implementation process and decisions made.
2025-12-05 00:04:29 +08:00
Raphaël MANSUY
a6aa073d70 feat(webui): Add single-tenant/multi-tenant mode support
- Add LIGHTRAG_MULTI_TENANT env var to control multi-tenant mode
- Add multi_tenant_enabled flag to /auth-status and /health endpoints
- Update LoginPage to auto-redirect in single-tenant mode
- Update App.tsx to set default tenant/KB in single-tenant mode
- Update TenantSelector to skip API calls in single-tenant mode
- Update SiteHeader to hide tenant selector in single-tenant mode
- Update useTenantInitialization hook to skip in single-tenant mode
- Update AuthStore with multiTenantEnabled state

In single-tenant mode (default):
- No tenant selection UI shown
- Auto-creates default tenant and KB context
- Direct access to all WebUI features

In multi-tenant mode (LIGHTRAG_MULTI_TENANT=true):
- Shows tenant/KB selection UI
- Requires tenant API routes to be configured
2025-12-04 20:37:06 +08:00
Raphaël MANSUY
a3cae5aaf8 cherry-pick a93c1661 2025-12-04 19:19:22 +08:00
Raphaël MANSUY
034fc51a6d cherry-pick 4fcae985 2025-12-04 19:19:22 +08:00
Raphaël MANSUY
216c8aaa4a cherry-pick 8c07c918 2025-12-04 19:19:02 +08:00
Raphaël MANSUY
9be3d5c4b5 cherry-pick 678e17bb 2025-12-04 19:19:01 +08:00
Raphaël MANSUY
aa03f42729 cherry-pick 0216325e 2025-12-04 19:19:01 +08:00
Raphaël MANSUY
f7270b719c cherry-pick 7ccc1fdd 2025-12-04 19:19:00 +08:00
Raphaël MANSUY
d82b5d2de2 cherry-pick 71b27ec4 2025-12-04 19:19:00 +08:00
Raphaël MANSUY
e58675161e cherry-pick 4cbd8761 2025-12-04 19:18:59 +08:00
Raphaël MANSUY
1331c38fe4 cherry-pick 79a17c3f 2025-12-04 19:18:41 +08:00
Raphaël MANSUY
2321ef6e37 cherry-pick 54c48dce 2025-12-04 19:18:40 +08:00
Raphaël MANSUY
ebb1ed7971 cherry-pick b32b2e8b 2025-12-04 19:18:39 +08:00
Raphaël MANSUY
2a451c4e22 cherry-pick 5155edd8 2025-12-04 19:18:39 +08:00
Raphaël MANSUY
3438f9e896 cherry-pick 25f829ef 2025-12-04 19:18:39 +08:00
Raphaël MANSUY
4629d24a40 cherry-pick 9ed19695 2025-12-04 19:18:38 +08:00
Raphaël MANSUY
de3f5f10c2 cherry-pick 8dc23eef 2025-12-04 19:18:37 +08:00
Raphaël MANSUY
646b1fad38 cherry-pick 80668aae 2025-12-04 19:18:37 +08:00
Raphaël MANSUY
5b207db37e cherry-pick 637b850e 2025-12-04 19:18:36 +08:00
Raphaël MANSUY
3c99bf455e cherry-pick 4c3ab584 2025-12-04 19:18:36 +08:00
Raphaël MANSUY
215d392896 cherry-pick 04d23671 2025-12-04 19:18:35 +08:00
Raphaël MANSUY
5bdd741eed cherry-pick 8bf41131 2025-12-04 19:18:34 +08:00
Raphaël MANSUY
ad8a645ddf cherry-pick 50210e25 2025-12-04 19:18:16 +08:00
Raphaël MANSUY
0a6e4616b2 cherry-pick 130b4959 2025-12-04 19:18:16 +08:00
Raphaël MANSUY
8d538ea9b3 cherry-pick f2fb1202 2025-12-04 19:18:16 +08:00
Raphaël MANSUY
3e524467c5 cherry-pick 44f51f88 2025-12-04 19:18:16 +08:00
Raphaël MANSUY
3a2e706436 cherry-pick 2d9334d3 2025-12-04 19:18:16 +08:00
Raphaël MANSUY
cefece087e cherry-pick 1a4d6775 2025-12-04 19:18:15 +08:00
Raphaël MANSUY
c9e5988349 cherry-pick b81b8620 2025-12-04 19:18:15 +08:00
Raphaël MANSUY
71bb5642e3 cherry-pick d550f1c5 2025-12-04 19:18:14 +08:00
Raphaël MANSUY
6b1e95dbf7 cherry-pick bf6ca9dd 2025-12-04 19:18:14 +08:00
Raphaël MANSUY
94646e6186 cherry-pick 7b1f8e0f 2025-12-04 19:18:14 +08:00
Raphaël MANSUY
d4c1a5c190 cherry-pick 0c1cb7b7 2025-12-04 19:18:14 +08:00
Raphaël MANSUY
18ed0a82e9 cherry-pick 0aef6a16 2025-12-04 19:18:14 +08:00
Raphaël MANSUY
201084e05a cherry-pick cf2a024e 2025-12-04 19:18:14 +08:00
Raphaël MANSUY
282dacc291 cherry-pick d4abe704 2025-12-04 19:18:14 +08:00
Raphaël MANSUY
6bd9a64fce cherry-pick b1a4e7d7 2025-12-04 19:18:13 +08:00
Raphaël MANSUY
c658f85131 cherry-pick 19a41584 2025-12-04 19:18:13 +08:00
Raphaël MANSUY
c96bc06153 cherry-pick 7297ca1d 2025-12-04 19:18:13 +08:00
Raphaël MANSUY
93acccf818 cherry-pick ffcd75a4 2025-12-04 19:18:13 +08:00
Raphaël MANSUY
dd1961ee48 cherry-pick e20f86a0 2025-12-04 19:18:13 +08:00
Raphaël MANSUY
2962839642 cherry-pick dd4c988b 2025-12-04 19:18:13 +08:00
Raphaël MANSUY
b56071c815 cherry-pick d5e7b230 2025-12-04 19:18:13 +08:00
Raphaël MANSUY
e64223dda9 cherry-pick d3b5cb63 2025-12-04 19:18:12 +08:00
Raphaël MANSUY
39ed70578b cherry-pick bd487a45 2025-12-04 19:18:12 +08:00
Raphaël MANSUY
80b959980d cherry-pick 7545fa72 2025-12-04 19:18:12 +08:00
Raphaël MANSUY
c5ea12a69c cherry-pick 68bee74d 2025-12-04 19:18:12 +08:00