https://github.com/microsoft/autogen/blob/600bd3f2fe0596d263e30ce6821ce8260d15dd43/autogen/agentchat/contrib/agent_builder.py#L222 add code for catching the exception. ``` agent_builder.py#L222 except Exception as ex: server_id = self.online_server_name ``` A better way is to define a parameter for `_create_agent` function to determine whether to use huggingface_hub.