#18896: CLI: add vLLM configure command
docs
cli
scripts
commands
size: M
Cluster:
Ollama Model Enhancements
## Summary
- add `openclaw models configure vllm` command (interactive + flags)
- write vLLM provider config and default model selection
- fix `pnpm openclaw --` arg passthrough in dev runner
## Testing
- `pnpm test src/commands/models.configure-vllm.e2e.test.ts` (fails: test config excludes `*.e2e.test.ts`)
- `pnpm test:e2e -- src/commands/models.configure-vllm.e2e.test.ts` (runs full e2e suite; unrelated failures)
- `pnpm test src/cli/models-cli.test.ts`
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Adds `openclaw models configure vllm` command to streamline vLLM provider setup by prompting for configuration (or accepting CLI flags) and updating both auth profiles and config in one step.
- Refactored `promptAndConfigureVllm` into reusable helpers (`normalizeVllmBaseUrl`, `buildVllmModelDefinition`, `applyVllmProviderConfig`) to support both interactive and non-interactive workflows
- New command handles TTY detection and falls back to requiring `--api-key` and `--model-id` flags in non-interactive environments
- Updates default model and adds to allowlist after configuration
- Test coverage includes e2e test validating config updates, auth profile creation, and model preservation
<h3>Confidence Score: 5/5</h3>
- Safe to merge - well-structured refactor with solid test coverage
- Clean implementation following existing patterns, good separation of concerns with extracted helper functions, comprehensive test coverage for both interactive and non-interactive paths, and proper error handling for edge cases
- No files require special attention
<sub>Last reviewed commit: e659b26</sub>
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#21199: Models: suppress repeated vLLM/Ollama discovery warnings (#21037)
by itsishant · 2026-02-19
77.9%
#21182: feat(litellm): enhance LiteLLM provider with model discovery and pr...
by hiboute · 2026-02-19
75.6%
#22462: CLI: add config path subcommand to print active config file path
by cyb1278588254 · 2026-02-21
71.5%
#6059: fix #6044
by vivganes · 2026-02-01
71.4%
#13079: feat: Add OpenAI-compatible API option to CLI for self-hosted models
by MikeWang0316tw · 2026-02-10
71.1%
#20567: fix: validate model IDs against catalog before saving to config
by baja87 · 2026-02-19
70.8%
#9257: this is my first fork
by demonking369 · 2026-02-05
70.7%
#18988: feat(config): add support for config warnings and improve validation
by saurav470 · 2026-02-17
70.6%
#7568: feat(agents): add LM Studio auto-discovery and provider support
by sjseo298 · 2026-02-03
70.6%
#16033: fix: add model configuration step to onboard command
by MisterGuy420 · 2026-02-14
70.2%