def update_model_config(
        self,
        shared_model_path: str,
        shared_adapter_path: str,
        model_config: ModelConfig,
        input_model_id: str,
        output_model_path: str,
    ) -> ModelConfig:
        """Download model files from shared cache and update model config.

        Args:
            shared_model_path (str): Model path stored in shared cache
            shared_adapter_path (str): Adapter path stored in shared cache
            model_config (ModelConfig): Model config to be updated
            input_model_id (str): Input model hash
            output_model_path (Path): Output model path

        Returns:
            ModelConfig: updated model config

        """
        logger.debug("Updating model config with shared model path: %s", shared_model_path)
        output_model_path = Path(output_model_path) / "model"

        model_directory_prefix = f"{input_model_id}/model/model"
        blob_list = self.container_client_factory.get_blob_list(model_directory_prefix)
        self._download_blob_list(blob_list, model_directory_prefix, output_model_path)

        adapter_directory_prefix = f"{input_model_id}/model/adapter"
        blob_list = self.container_client_factory.get_blob_list(adapter_directory_prefix)
        self._download_blob_list(blob_list, adapter_directory_prefix, output_model_path, "adapter")

        additional_files_directory_prefix = f"{input_model_id}/model/additional_files"
        additional_files_blob_list = self.container_client_factory.get_blob_list(additional_files_directory_prefix)
        self._download_blob_list(
            additional_files_blob_list, additional_files_directory_prefix, output_model_path, "additional_files"
        )

        if model_config.type.lower() == "hfmodel" and hf_repo_exists(shared_model_path):
            model_config.config["model_path"] = shared_model_path
        else:
            model_config.config["model_path"] = str(output_model_path / shared_model_path)

        if model_config.type.lower() == "hfmodel" and shared_adapter_path:
            model_config.config["adapter_path"] = str(output_model_path / shared_adapter_path)

        additional_files_path = output_model_path / "additional_files"
        if additional_files_path.exists():
            additional_files = [str(file) for file in additional_files_path.iterdir()]
            model_config.config["model_attributes"]["additional_files"] = additional_files

        return model_config
Download model files from shared cache and update model config.

        Args:
            shared_model_path (str): Model path stored in shared cache
            shared_adapter_path (str): Adapter path stored in shared cache
            model_config (ModelConfig): Model config to be updated
            input_model_id (str): Input model hash
            output_model_path (Path): Output model path

        Returns:
            ModelConfig: updated model config

        
olive/cache.py