feat(super-agent): drop model picker and undocument model flags#7
feat(super-agent): drop model picker and undocument model flags#7
Conversation
…tion
`ar sa run` no longer interactively picks ModelService / Model. CLI
flags `--model-service` / `--model` still parse and pass through to
`SuperAgentClient.create()` (None = server default), but they are no
longer surfaced in user docs. `--no-input` is kept as a deprecated
no-op so existing scripts continue to parse.
Code
- Remove `is_tty + resolve_model()` block from `ar sa run`; pass CLI
flags straight through to the SDK.
- Delete `_utils/super_agent_picker.py` and its 375-line unit test
(no production code references the picker after the run-command edit).
- Refresh `--model-service` / `--model` click help text to drop the
obsolete TTY-picker mention.
- Bump `agentrun-sdk[core]` floor to >=0.0.34 — that release omits
modelServiceName / modelName from the outgoing JSON when unset,
which is what makes the None passthrough work end-to-end.
Tests
- Flip `test_run_missing_model_no_input` to assert success + None
passthrough instead of the previous picker error.
- Add `test_run_no_model_flags_passes_none` to lock in the bare-flag
path.
- Add focused tests against pre-existing uncovered branches
(pick_render_mode mutual-exclusion, repl state-write failure, render
flush exception swallowers + colored error path) to restore the
>=95% coverage gate that the picker deletion would otherwise dip.
Docs
- `docs/{en,zh}/super-agent.md`: drop `--model-service` / `--model`
rows from `## run`, `## create`, and `## update` option tables;
remove the corresponding example bash snippets; strip
`spec.model.{service,name}` from the YAML schema code block,
field-mapping table, and multi-doc YAML example. Soften
`--no-input` row to "Deprecated, no-op".
- `superagent.yaml` (root example): drop `spec.model` block.
- `README.md` / `README_zh.md`: drop stale super-agent picker output
in the Step 2 quickstart and the `spec.model` block in the Step 3
yaml example. The `ar model` command-group entry stays — that's a
separate, still-supported feature.
The YAML parser (`_utils/super_agent_yaml.py`) is intentionally
unchanged so old yamls with `spec.model.{service,name}` keep parsing
silently.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Sodawyx <sodawyx@126.com>
There was a problem hiding this comment.
Pull request overview
Removes the interactive ModelService/Model selection flow from ar sa run, allowing the server to choose defaults when --model-service/--model are omitted, and updates docs/tests accordingly while bumping the SDK floor to support “omit when unset” JSON behavior.
Changes:
- Delete the interactive model picker utility and its unit tests;
ar sa runnow passes--model-service/--modelthrough as-is (includingNone). - Update CLI help text and documentation (EN/ZH, READMEs) to stop documenting model flags and to mark
--no-inputas deprecated/no-op. - Add/adjust unit + integration tests for REPL state-write failures and renderer flush/error edge paths; bump
agentrun-sdk[core]to>=0.0.34.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/agentrun_cli/commands/super_agent/run_cmd.py |
Removes picker-based resolution; passes model flags directly and updates help text. |
src/agentrun_cli/_utils/super_agent_picker.py |
Deleted interactive picker implementation. |
tests/unit/test_super_agent_picker.py |
Deleted unit tests for the removed picker. |
tests/integration/test_super_agent_run_cmd.py |
Updates expectations for “no model flags” behavior and adds mutual-exclusion test. |
tests/unit/test_super_agent_repl.py |
Adds coverage for REPL state persistence failure handling. |
tests/unit/test_super_agent_render.py |
Adds coverage for flush failures and colored error rendering paths. |
pyproject.toml |
Bumps agentrun-sdk[core] minimum version. |
docs/en/super-agent.md |
Removes model flag documentation; updates --no-input description and examples. |
docs/zh/super-agent.md |
Removes model flag documentation; updates --no-input description and examples. |
README.md |
Removes interactive picker transcript; removes spec.model from YAML quickstart snippet. |
README_zh.md |
Removes interactive picker transcript; removes spec.model from YAML quickstart snippet. |
superagent.yaml |
Adds a repository-root SuperAgent YAML example (now without spec.model). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "agentrun-sdk[core]>=0.0.33", | ||
| "agentrun-sdk[core]>=0.0.34", | ||
| "pyyaml>=6.0", | ||
| "questionary>=2.0", |
There was a problem hiding this comment.
questionary no longer appears to be used anywhere in the repo (the interactive model picker was removed, and there are no remaining imports/usages). Keeping it as a required runtime dependency increases install size and can introduce supply-chain/compatibility surface unnecessarily. Consider removing questionary>=2.0 from dependencies (or moving it to an optional extra if you plan to reintroduce interactive prompts elsewhere).
| "questionary>=2.0", |
| tools: | ||
| - mcp-time-sa | ||
| skills: | ||
| - skill-wechat-article-search | ||
| sandboxes: [] | ||
| workspaces: [] | ||
| subAgents: | ||
| - agent-quick-vdyo9 |
There was a problem hiding this comment.
This committed superagent.yaml example looks environment-specific (hard-coded tool/skill/sub-agent identifiers). Since it’s in the repo root with the same name used in the README quickstart, users may try to ar super-agent apply -f superagent.yaml and hit failures if those resources don’t exist. Consider making this file match the minimal README example (empty lists / generic names) or relocating/renaming it to clearly indicate it’s a project-specific sample.
| tools: | |
| - mcp-time-sa | |
| skills: | |
| - skill-wechat-article-search | |
| sandboxes: [] | |
| workspaces: [] | |
| subAgents: | |
| - agent-quick-vdyo9 | |
| tools: [] | |
| skills: [] | |
| sandboxes: [] | |
| workspaces: [] | |
| subAgents: [] |
| assert result.exit_code != 0 | ||
| # click.UsageError -> exit code 2 by default | ||
| assert result.exit_code == 2 or "raw" in result.output.lower() |
There was a problem hiding this comment.
The assertion here is fairly loose (exit_code == 2 or "raw" in output) and could pass even if the command fails for an unrelated reason that happens to mention “raw”. To make this test reliably detect the intended behavior, assert the expected Click usage exit code (2) and that the error message contains the mutual-exclusion text from pick_render_mode (e.g. “mutually exclusive”).
| assert result.exit_code != 0 | |
| # click.UsageError -> exit code 2 by default | |
| assert result.exit_code == 2 or "raw" in result.output.lower() | |
| # click.UsageError -> exit code 2 by default | |
| assert result.exit_code == 2, result.output | |
| assert "mutually exclusive" in result.output.lower() |
Summary
ar sa runno longer interactively picks ModelService / Model. CLI flags--model-service/--modelstill parse and pass through toSuperAgentClient.create()(None = server default), but they are no longer surfaced in user docs.--no-inputis kept as a deprecated no-op so existing scripts continue to parse._utils/super_agent_picker.py(227 lines) and its 375-line unit test; refreshes click help text; bumpsagentrun-sdk[core]floor to>=0.0.34(that release omitsmodelServiceName/modelNamefrom outgoing JSON when unset, which is what makes the None passthrough actually work).--model-service/--modelrows from## run/## create/## updateoption tables indocs/{en,zh}/super-agent.md; removesspec.model.{service,name}from the YAML schema sections, rootsuperagent.yamlexample, and quickstart blocks inREADME.md/README_zh.md. Thear modelcommand-group entry stays — that's a separate, still-supported feature. The YAML parser is intentionally unchanged so old yamls withspec.modelkeep parsing silently.Total: 12 files changed, +153 / −685.
Test plan
make lintclean on touched filesmake coveragepasses (≥95% gate; restored via 5 focused tests against pre-existing uncovered branches inpick_render_mode, repl state-write, render flush/error paths)tests/integration/test_super_agent_run_cmd.py—test_run_missing_model_no_inputflipped to assert success + None passthrough; newtest_run_no_model_flags_passes_nonelocks in the bare-flag path.venv/bin/ar sa run --helpshows the updated help text (--no-inputmarked deprecated;--model-service/--modelsay "optional; server picks a default")git diff --statsuper_agent_picker/PickerInputError/resolve_modelreferences insrc/,tests/, ordocs/🤖 Generated with Claude Code