From 7402fab20ae5a2144494adf64e820d873041e8c4 Mon Sep 17 00:00:00 2001 From: Juan Antonio Osorio Date: Wed, 29 Jan 2025 13:26:47 +0200 Subject: [PATCH] Bootstrap provider with auth none This allows for the right type of authentication to be auto-discovered in case we were able to get the models. Signed-off-by: Juan Antonio Osorio --- src/codegate/providers/crud/crud.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/codegate/providers/crud/crud.py b/src/codegate/providers/crud/crud.py index 0e485df8..ebae2b97 100644 --- a/src/codegate/providers/crud/crud.py +++ b/src/codegate/providers/crud/crud.py @@ -185,6 +185,9 @@ async def try_initialize_provider_endpoints( ): try: models = pimpl.models() + + # If we were able to get the models, we don't need auth + provend.auth_type = apimodelsv1.ProviderAuthType.none except Exception as err: logger.debug( "Unable to get models from provider",