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:
@@ -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__":
|
||||
|
||||
Reference in New Issue
Block a user