Skip to content

Commit da902af

Browse files
author
jzhu
committed
docs: document list_models_cmd forms in README and validate space-separated model lists
1 parent a08d1f3 commit da902af

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Repository layout
1919
- mcp/: MCP subsystem with manager, CLI, server registry JSONs. (files: code_assistant_manager/mcp/manager.py, server_commands.py, cli.py, registry/servers/*.json)
2020
- menu/: Terminal UI components and centered menus used to select tools interactively.
2121
- config.py, env_loader.py: Configuration parsing and .env helper utilities.
22+
- list_models_cmd supports three forms now: (1) a python module invocation (e.g. "python -m code_assistant_manager.litellm_models"), (2) legacy shell commands (e.g. "curl ... | jq -r '.data.[].id'"), and (3) a plain space-separated model list (e.g. "qwen3-max qwen3-coder-plus").
2223

2324
- tests/: Pytest test suite (unit, integration, interactive). Test configuration in pytest.ini. Run with: python -m pytest tests/
2425

code_assistant_manager/config.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,14 @@ def validate_command(value: str) -> bool:
531531
if not parts:
532532
return False
533533

534+
# Allow plain space-separated model lists (e.g., "qwen3-max qwen3-coder-plus")
535+
try:
536+
if all(validate_model_id(p) for p in parts):
537+
return True
538+
except Exception:
539+
# If validate_model_id is not suitable for a token, fall back to executable checks
540+
pass
541+
534542
# Validate executable (first part)
535543
executable = parts[0]
536544

0 commit comments

Comments
 (0)