From 3ff384cbeb605cc2986fdfdffa7ae67c668929c7 Mon Sep 17 00:00:00 2001 From: yuqei Date: Sun, 31 May 2026 15:48:24 +0800 Subject: [PATCH] fix: add missing _context method to RemoteSharedAIPlatformClient --- backend/app/clients/shared_ai_platform.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backend/app/clients/shared_ai_platform.py b/backend/app/clients/shared_ai_platform.py index 520ff225..84d91495 100644 --- a/backend/app/clients/shared_ai_platform.py +++ b/backend/app/clients/shared_ai_platform.py @@ -97,6 +97,13 @@ class RemoteSharedAIPlatformClient: api_prefix=settings.shared_ai_platform_api_prefix, ) + def _context(self, current_user: Dict[str, Any]) -> SharedAIRequestContext: + return SharedAIRequestContext( + tenant_id=current_user.get("tenant_id", ""), + user_id=current_user.get("id", ""), + user_role=current_user.get("role", "admin"), + ) + def stream_answer( self, current_user: Dict[str, Any],