This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Description
Add Model Alias Command
related epic #1154
Feature Overview
This PR introduces a new command to update the alias of an existing model in our CLI tool. The model alias feature allows users to assign and update custom, memorable names for their models, enhancing usability and model management.
Implementation Details
- Extended
ModelListUtils with an UpdateModelAlias method
- Updated model list persistence to include and manage aliases
- Only update new alias if it is unique, and the model to be updated is existed
Key Functions
ModelAliasCmd::Exec(const std::string& model_handle, const std::string& model_alias)
ModelListUtils::UpdateModelAlias(const std::string& model_id, const std::string& new_model_alias)
Usage
Users can update a model's alias using the following command:
cli models alias --model_id <model_id_or_current_alias> --new_model_alias <new_alias>
Testing
- Added unit tests for
ModelListUtils::UpdateModelAlias in model_list_utils_test.cpp
- Manual testing performed across Windows, macOS, and Linux platforms