From bb6cb0e8467b0db725ed8608308a6f9b50abd987 Mon Sep 17 00:00:00 2001 From: Reinier van der Leer Date: Mon, 2 Feb 2026 18:46:19 +0100 Subject: [PATCH] clean up --- .../backend/backend/api/features/chat/tools/utils.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/autogpt_platform/backend/backend/api/features/chat/tools/utils.py b/autogpt_platform/backend/backend/api/features/chat/tools/utils.py index f6ff19c0f8..bd25594b8a 100644 --- a/autogpt_platform/backend/backend/api/features/chat/tools/utils.py +++ b/autogpt_platform/backend/backend/api/features/chat/tools/utils.py @@ -13,7 +13,6 @@ from backend.data.model import ( CredentialsMetaInput, HostScopedCredentials, OAuth2Credentials, - _extract_host_from_url, ) from backend.integrations.creds_manager import IntegrationCredentialsManager from backend.util.exceptions import NotFoundError @@ -354,11 +353,9 @@ def _credential_is_for_host( if not requirements.discriminator_values: return True + # Check that credential host matches required host. # Host-scoped credential inputs are grouped by host, so any item from the set works. - host = _extract_host_from_url(list(requirements.discriminator_values)[0]) - - # Check that credential host matches required host - return credential.host == host + return credential.matches_url(list(requirements.discriminator_values)[0]) async def check_user_has_required_credentials(