Skip to content

feat(cli): enhance llm svc run with two new override flags#289

Merged
Syspretor merged 5 commits intosgl-project:mainfrom
diw-zw:0422-modelpath
Apr 22, 2026
Merged

feat(cli): enhance llm svc run with two new override flags#289
Syspretor merged 5 commits intosgl-project:mainfrom
diw-zw:0422-modelpath

Conversation

@diw-zw
Copy link
Copy Markdown
Collaborator

@diw-zw diw-zw commented Apr 22, 2026

Summary

Enhance llm svc run with two new override flags and move MountPath from the storage plugin interface into MountOptions, plus a comprehensive README audit.

Changes

1. New --model-path flag in llm svc run

Users who place models directly into storage (bypassing llm model pull) can now specify the exact container path. Without this flag the default /models/<model>/<revision> path is used.

2. New --image flag in llm svc run

Allows overriding the container image from the mode config. Useful when the default image registry is inaccessible (e.g. DockerHub in China) and a mirror registry is needed.

3. Move MountPath from Plugin.MountPath() to MountOptions.MountPath

  • Plugin.MountPath() method removed from the interface — mount path is no longer a plugin-level concern.
  • DefaultMountPath = "/models" constant added to interface.go.
  • MountOptions.MountPath field introduced; all callers pass storageplugin.DefaultMountPath.
  • Both OSSStorage and PVCStorage implementations updated to read opts.MountPath.
  • Tests updated: MountPath() test cases removed; MountStorage calls updated to include MountPath: DefaultMountPath.

4. README.md audit and fixes

  • svc run: Added --image, --model-path, --wait, --wait-timeout, --test-api, --test-api-timeout, --local-port flags.
  • svc list: Removed global --namespace (inherited from root).
  • svc delete: Changed usage to NAME... (supports multiple args); removed global-only Flags table.
  • svc chat: Fixed interactive example (-i required); fixed --system example.
  • model pull: Added --revision, --wait flags.
  • model list: Corrected --storage (was --source).
  • benchmark get/delete/logs: Added --job flag; benchmark logs usage fixed from JOB_NAME to RBG_NAME with --job and --follow flags.
  • config add-storage: Added --config flag; fixed example keys.
  • Troubleshooting: MODEL_NAMEMODEL_ID.

@diw-zw diw-zw requested a review from Syspretor April 22, 2026 09:45
@diw-zw diw-zw changed the title 0422 modelpath [cli] feat: enhance llm svc run with two new override flags Apr 22, 2026
@diw-zw diw-zw changed the title [cli] feat: enhance llm svc run with two new override flags feat(cli): enhance llm svc run with two new override flags Apr 22, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the CLI documentation and refactors the storage plugin interface to use a centralized DefaultMountPath instead of per-plugin methods. It introduces new flags for the svc run command, including --image and --model-path, and updates the benchmark commands for better consistency. Review feedback focuses on ensuring cross-platform path compatibility by using filepath.ToSlash for paths intended for use inside Linux containers, preventing issues when the CLI is run on Windows.

Comment thread cmd/cli/cmd/llm/model/pull.go Outdated
Comment thread cmd/cli/cmd/llm/svc/run.go
Comment thread cmd/cli/cmd/llm/svc/run.go Outdated
Copy link
Copy Markdown
Collaborator

@Syspretor Syspretor left a comment

Choose a reason for hiding this comment

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

/lgtm

@Syspretor Syspretor enabled auto-merge (squash) April 22, 2026 11:46
Copy link
Copy Markdown
Collaborator

@Syspretor Syspretor left a comment

Choose a reason for hiding this comment

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

/lgtm

@Syspretor Syspretor merged commit 43e015f into sgl-project:main Apr 22, 2026
8 of 9 checks passed
@diw-zw diw-zw deleted the 0422-modelpath branch April 30, 2026 08:44
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.

2 participants