From 262fe5551682ebe5156b35e4c99bc0162eb19353 Mon Sep 17 00:00:00 2001 From: pk-zipstack Date: Mon, 30 Mar 2026 12:37:30 +0530 Subject: [PATCH 1/2] [FIX] Add hook for setting default adapters for invited users Add setup_default_adapters_for_user() hook to AuthenticationService and call it from set_user_organization() when an invited user joins an existing organization. This allows the cloud plugin to set up default triad adapters (LLM, embedding, vector DB, x2text) for invited users, fixing silent failures in API deployment creation. Co-Authored-By: Claude Opus 4.6 (1M context) --- backend/account_v2/authentication_controller.py | 7 +++++++ backend/account_v2/authentication_service.py | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/backend/account_v2/authentication_controller.py b/backend/account_v2/authentication_controller.py index 19eac7baa9..477f9587c0 100644 --- a/backend/account_v2/authentication_controller.py +++ b/backend/account_v2/authentication_controller.py @@ -213,6 +213,13 @@ def set_user_organization(self, request: Request, organization_id: str) -> Respo logger.info( f"New organization created with Id {organization_id}", ) + else: + try: + self.auth_service.setup_default_adapters_for_user( + organization=organization, user=user + ) + except MethodNotImplemented: + pass user_info: UserInfo | None = self.get_user_info(request) serialized_user_info = SetOrganizationsResponseSerializer(user_info).data diff --git a/backend/account_v2/authentication_service.py b/backend/account_v2/authentication_service.py index 591742821a..053a1e67af 100644 --- a/backend/account_v2/authentication_service.py +++ b/backend/account_v2/authentication_service.py @@ -266,6 +266,11 @@ def get_invitations(self, organization_id: str) -> list[MemberInvitation]: def frictionless_onboarding(self, organization: Organization, user: User) -> None: raise MethodNotImplemented() + def setup_default_adapters_for_user( + self, organization: Organization, user: User + ) -> None: + raise MethodNotImplemented() + def delete_invitation(self, organization_id: str, invitation_id: str) -> bool: raise MethodNotImplemented() From df848c754684bc2ae977d1f129d207afd1e300c1 Mon Sep 17 00:00:00 2001 From: Praveen Kumar Date: Tue, 31 Mar 2026 13:23:51 +0530 Subject: [PATCH 2/2] Update backend/account_v2/authentication_controller.py Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> Signed-off-by: Praveen Kumar --- backend/account_v2/authentication_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/account_v2/authentication_controller.py b/backend/account_v2/authentication_controller.py index 477f9587c0..ef63fffd38 100644 --- a/backend/account_v2/authentication_controller.py +++ b/backend/account_v2/authentication_controller.py @@ -219,7 +219,7 @@ def set_user_organization(self, request: Request, organization_id: str) -> Respo organization=organization, user=user ) except MethodNotImplemented: - pass + logger.info("setup_default_adapters_for_user not implemented") user_info: UserInfo | None = self.get_user_info(request) serialized_user_info = SetOrganizationsResponseSerializer(user_info).data