Skip to content

feat(models): expose legacy inventory as JSON - #2631

Open
tang-vu wants to merge 1 commit into
Osmantic:mainfrom
tang-vu:feat/upgrade-model-list-json
Open

feat(models): expose legacy inventory as JSON#2631
tang-vu wants to merge 1 commit into
Osmantic:mainfrom
tang-vu:feat/upgrade-model-list-json

Conversation

@tang-vu

@tang-vu tang-vu commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add --list --json to the legacy model-directory upgrade helper
  • emit the current model plus sorted inventory entries with name, disk size, and active state
  • represent an unset current model as JSON null
  • preserve the existing human inventory unchanged
  • validate the public CLI against a two-model fixture

Why this matters

Older ODS installations still use this production helper for directory-based model upgrades. Automation and migration tooling can now inspect available and active models without scraping colored table output before deciding whether to invoke an upgrade.

Overlap check

Searched open/closed PR titles for upgrade model json list and bodies referencing ods/scripts/upgrade-model.sh. PRs #2613, #2404, and #2266 change compose/state/env mutation paths; none changes the read-only inventory command. This PR is isolated to cmd_list and its CLI option.

Test plan

  • bash ods/tests/test-upgrade-model-list-json.sh
  • bash -n ods/scripts/upgrade-model.sh
  • bash -n ods/tests/test-upgrade-model-list-json.sh
  • git diff --check

Generated with Codex

Sign up for free to 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.

1 participant