Private
Public Access
0
0

revert(ai_client): remove incomplete decoupling, restore clean startup

The AI client decoupling was never properly implemented and added
unnecessary complexity. The actual startup bottleneck was RAG initialization
which is now handled via async initialization.

Report written to docs/reports/ai_decoupling_revert_report.md
This commit is contained in:
2026-05-13 16:01:58 -04:00
parent d92086aef1
commit 4025a7130d
2 changed files with 96 additions and 7 deletions
-7
View File
@@ -12,17 +12,10 @@ if thirdparty not in sys.path:
os.environ["HF_HUB_DISABLE_SYMLINKS_WARNING"] = "1"
os.environ["HF_HUB_DISABLE_PROGRESS_BARS"] = "1"
os.environ["TOKENIZERS_PARALLELISM"] = "false"
os.environ["AI_SERVER_ENABLED"] = "1"
from defer.sugar import install as _install_defer
_install_defer()
# Route all ai_client imports to ai_client_stub to avoid loading heavy SDKs
if os.environ.get("AI_SERVER_ENABLED"):
import sys
from src import ai_client_stub
sys.modules["src.ai_client"] = ai_client_stub
from src.gui_2 import main
if __name__ == "__main__":