Skip to content

Add CLI model management commands - #9

Merged
MuoDoo merged 7 commits into
mainfrom
copilot/cli-model-management-commands
Jul 3, 2026
Merged

Add CLI model management commands#9
MuoDoo merged 7 commits into
mainfrom
copilot/cli-model-management-commands

Conversation

CopilotAI commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Model setup and recovery were only discoverable through scripts and README instructions. This adds first-class vox model commands for listing, downloading, verifying, repairing, and removing local models.

  • CLI model lifecycle

    • Adds vox model list [--installed]
    • Adds vox model download <model-name>
    • Adds vox model verify <model-name>
    • Adds vox model repair <model-name>
    • Adds vox model remove <model-name>
  • Model manifest and validation

    • Tracks supported local model sets for Qwen3-ASR, Whisper base, HY-MT translation, and CosyVoice3 TTS.
    • Reports model path, version, source, checksum availability, file size, and status.
    • Detects missing, empty, and partial .part downloads.
  • Discoverability

    • Exposes model management from vox --help.
    • Updates missing-model errors to point at vox model download ....
    • Documents the new workflow in the README.

Example:

vox model list
vox model download qwen3-asr-1.7b
vox model verify qwen3-asr-1.7b
vox model repair qwen3-asr-1.7b

CopilotAI changed the title [WIP] Add model management commands for CLIAdd CLI model management commandsJun 24, 2026
CopilotAI requested a review from MuoDooJune 24, 2026 03:40
@MuoDoo
MuoDoo requested a review from CopilotJune 24, 2026 06:59

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces first-class vox model subcommands to manage local model lifecycle (list/download/verify/repair/remove), centralizing model manifest metadata and status inspection, and updating documentation and tests to cover the new workflow.

Changes:

  • Added a vox_model_manager library implementing model manifest + status inspection and CLI subcommands.
  • Wired vox model ... routing into the main vox CLI and updated missing-model guidance to point at vox model download ....
  • Added README documentation and a new test covering verify/list/remove behavior.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
FileDescription
apps/model_manager.hDeclares model manifest/status types and the run_model_command entrypoint.
apps/model_manager.cppImplements supported model manifest, status inspection, and vox model command handling.
apps/CMakeLists.txtAdds vox_model_manager static library and links it into the vox executable.
apps/vox.cppRoutes vox model ... to the model manager; updates missing-model download hints.
CMakeLists.txtEnsures the apps subdirectory is included so the model manager target exists for tests.
README.mdDocuments the new model management CLI workflow and verification behavior.
tests/model_manager_test.cppAdds a focused test for model inspection and vox model subcommands.
tests/CMakeLists.txtBuilds and registers the new vox_model_manager_test.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadCMakeLists.txt
Comment on lines 121 to 127
add_subdirectory(llama_runtime)
add_subdirectory(asr)
add_subdirectory(translate)
add_subdirectory(tts)
add_subdirectory(pipeline)
if(VOX_BUILD_APPS)
add_subdirectory(apps)
endif()
add_subdirectory(apps)

Comment threadapps/model_manager.h
Comment on lines +239 to +244
for (const ManagedModel & model : supported_models()) {
const ManagedModelStatus status = inspect_model(model, project_root);
if (installed_only && !status.complete) {
continue;
}
out << model.name << "\t" << status_name(status) << "\t" << model.version << "\t";
Comment on lines +74 to +81
const int result = std::system(model.download_command.c_str());
std::filesystem::current_path(previous, ec);
if (result != 0) {
err << "Download command failed for " << model.name << ".\n";
return 1;
}
return 0;
}
Comment threadtests/model_manager_test.cpp Outdated
Comment on lines +1 to +24
#include "model_manager.h"

#include <filesystem>
#include <fstream>
#include <iostream>
#include <sstream>

namespace {

bool expect(bool condition, const std::string & message) {
if (!condition) {
std::cerr << message << "\n";
return false;
}
return true;
}

} // namespace

int main() {
namespace fs = std::filesystem;

bool ok = true;
const fs::path root = fs::temp_directory_path() / "vox_model_manager_test";

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Comment threadapps/model_manager.cpp Outdated
Comment threadapps/model_manager.cpp Outdated
Comment on lines +324 to +325
out << "Downloading " << model->name << " using: " << model->download_command << "\n";
return run_download_command(*model, project_root, err);

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After a successful download, the model is now re-inspected and a non-zero exit is returned with a clear message when it's still incomplete (410a13e).

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Comment on lines +301 to +316
if (command == "repair") {
std::error_code ec;
const ManagedModelStatus status = inspect_model(*model, project_root);
for (size_t i = 0; i < model->files.size(); ++i) {
const std::filesystem::path path = status.files[i].path;
if (status.files[i].exists && !status.files[i].complete) {
std::filesystem::remove(path, ec);
if (ec) {
err << "Could not remove incomplete file " << path << ": " << ec.message() << "\n";
return 1;
}
out << "Removed incomplete file: " << path.string() << "\n";
}
std::filesystem::remove(path.string() + ".part", ec);
}
}

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

@MuoDoo
MuoDooforce-pushed the copilot/cli-model-management-commands branch from acc1aa6 to 8afcc29CompareJuly 3, 2026 15:01
@MuoDoo
MuoDoo marked this pull request as ready for review July 3, 2026 15:48
@MuoDoo
MuoDoo merged commit 43cdf7c into mainJul 3, 2026
4 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@MuoDoo