def get_loaded_models(self) -> dict:
        """
        Retrieves the loaded models from the remote inference service.

        Returns:
            dict: A dictionary of loaded models.

        Raises:
            httpx.HTTPError: If an HTTP error occurs.
            Exception: For any other exceptions.
        """
        try:
            response = self.client.get("/models")
            response.raise_for_status()
            return response.json()
        except httpx.HTTPStatusError as http_err:
            if http_err.response.status_code == 400:
                error_detail = http_err.response.json().get('detail', 'Bad Request')
                raise ModelError(f"Failed to retrieve loaded models: {error_detail}") from http_err
            else:
                # Re-raise the original HTTPStatusError for other status codes
                raise

        Retrieves the loaded models from the remote inference service.

        Returns:
            dict: A dictionary of loaded models.

        Raises:
            httpx.HTTPError: If an HTTP error occurs.
            Exception: For any other exceptions.
        
src/marqo/inference/native_inference/remote/client/model_manager_client.py