Skip to content

Commit 2aa724a

Browse files
lzswebzhansheng.lzs
andauthored
acli: sync 0.7.1 and fix cli command routing (#206)
* feat(acli): make rule 18 demand cross-reference resolution on transformed output Mirrors agenticCLI a7b1a84. Rule 18 only required verifying code changes, so an agent producing a data document could pass every check it ran and still ship a broken one: Terminal-Bench hard-066c had organization-json-generator write employee *names* into project.members where the grader wants employee IDs, and report the conversion as deliberate -- "member IDs resolved to employee names, per schema's members: string[]". jsonschema agreed with it, because the schema only constrains members to an array of strings, so 3 of 4 tests passed and test_relationships_integrity failed on 'Cristiano Ronaldo' not in {'D001-E001', 'D001-E002', 'D001-E003'}. Names the case in the rule: when output transforms or joins data (ETL, CSV/JSON, migrations), also assert every cross-reference resolves, since schema-valid output with dangling IDs still fails. Measured on Terminal-Bench hard (10 tasks, qwen3.8-max, serial; wheel ae86d994 whose only content delta from the before-wheel ab5c911a is this clause): the task went 3p/1f -> 4p/0f and wrote an explicit dangling-reference check. Batch score unchanged at 6/10 -- two out-of-scope tasks flipped negative and only 4 of the 6 passes are shared between runs, so single-run task-level variance on hard is about +/-2. Full attribution in agenticCLI bench/terminal-bench/RESULTS.md, runs hard-066c / hard-066d. * fix(cli): route the auth group to typer instead of the expert agent c4e38e7 registered app.add_typer(auth.app) but never added "auth" to _TOP_LEVEL_COMMANDS, so main()'s unknown-command branch forwarded the line to the SDK Expert agent: `dashscope auth whoami` opened a chat session instead of verifying the key, and login/logout were unreachable. `auth --help` kept working, which hid the gap -- the help branch dispatches before routing. Also document auth in the expert's cli.md skill. It claims to be authoritative for CLI usage but had no auth row, so the agent could not answer either. The new test asserts every registered typer group is routable. One-directional on purpose: rl/agentic-rl stay listed when the optional extra is absent. * fix(cli): stop forwarding malformed commands into the expert agent main() sent any line whose first token was not in _TOP_LEVEL_COMMANDS to the agent as a question. That catch-all swallowed real errors: `dashscope -w wsid generation create` opened a chat instead of reporting "No such option: -w", and `dashscope generaton create` hid a typo that typer would have answered with "Did you mean 'generation'". It is also why the missing auth entry fixed in 6008270 silently disabled a working command rather than erroring. Three paths reach the agent now: a bare `dashscope`, an explicit `dashscope expert ...`, and a single unknown token -- the last one keeps the documented `dashscope "question"` one-shot working. Everything else goes to typer. `expert` is a routing keyword, not a typer group, and stays out of _TOP_LEVEL_COMMANDS; that set now only bounds global -k/--api-key parsing. This reverses the routing half of b808fcd -- the typer subcommand and the ~/.acli config sync it deleted stay deleted. README, README_zh and the expert's cli.md skill all advertised the removed catch-all, so their wording is updated to match. * fix(cli): only bare dashscope and `expert` enter the agent The single-unknown-token short form made a quoted command line indistinguishable from a question: `dashscope "auth whoami"` opened a chat whose first user message was the command itself, which in a session log looks exactly like someone asking about it. Drop the short form so every invocation that is not a bare `dashscope` or `dashscope expert ...` goes to typer, which parses real commands and reports unknown ones with a "Did you mean" suggestion. `dashscope expert "question"` remains the one-shot form. The vendored acli entrypoint had the same flaw in a worse shape: an unrecognized token fell through to the interactive agent and discarded the arguments entirely, so `acli auth whoami` produced no error at all. It now exits 2 with a usage error, matching typer. * fix(acli): probe multimodal-generation first and remember the binding Synced from agenticCLI. The gateway binds each model to exactly one aigc service path and answers the other with a 400 "url error", so the probe order decides who pays for an unlearned model. text-generation went first, which made the default model (qwen3.8-max, multimodal-bound) fail the first request of every session — in the prod gateway log that is an InvalidParameter with a fully tokenized body thrown away, then a retry that re-uploads and re-tokenizes it. The learned path was also kept only on the instance, and a provider is built per session start, per model switch and per vision call, so nothing survived between them. Persist the binding next to the global config and share it across instances; drop unreadable or unknown-path entries instead of repairing them, since a lost binding only costs one probe. * test(cli): pin dashscope auth whoami and login behaviour Eleven tests over the two commands a user runs first, against a throwaway ~/.dashscope and a stubbed Models.list, so no real key file is touched and no request is sent. whoami: the login guidance and exit 1 when nothing is configured; the masked key with its source on success; an environment key reported as its own source rather than the file; a short key masked as *** instead of half-revealed; exit 2 on a rejected key without leaking it; exit 2 with the reason when the validation call itself fails. login: prompting and saving, --key skipping the prompt, surrounding whitespace stripped, a blank key refused without writing anything, and a round trip proving whoami accepts what login wrote. The key_store fixture has to move both bindings of the api-key path constant: save_api_key/get_default_api_key read it from dashscope.common.api_key while auth reads its own imported copy, so patching one leaves login and whoami silently disagreeing about where the key lives. Messages are compared through a newline-stripping helper because rich hard-wraps at 80 columns under CliRunner and force-breaks long tokens without inserting a space. Wrapping Console.width instead would pin _width on the module-level consoles past teardown. Checked against three deliberate breaks of auth.py: 7 of the 11 failed, then all 11 passed again once it was restored. * acli: sync 0.6.7 — skills, search_files, platform line, Windows decoding Vendors agenticCLI 4876f43 plus the 0.6.7 bump. All seven files are byte-identical to the upstream sources modulo the dashscope. import prefix. render_skill no longer runs str.format() over a skill body. A body is Markdown full of literal braces from the JSON and Python it documents, so text-generation.md — which shows messages=[{"role": "user", ...}] and declares no arguments at all — raised KeyError('"role"'), and the old `except KeyError` reported that as "missing args" for a skill that takes none. 6 of the 13 bundled skills were unusable through use_skill while /skill and the catalog kept advertising them. Substitution is now a plain replace of the declared arguments only; use_skill and the scheduler branch on `is None` rather than falsiness, so the missing-args hint can no longer render empty. search_files matches the pattern against paths relative to the search root as well as the basename, and skips dot-directories only unless the pattern names one, so .acli/skills/*.md is reachable without walking every .git in the tree. Its description now says that * crosses separators, which it does under fnmatch and did not under the old basename-only match, and the no-match message states what was actually searched instead of implying the file is absent. EnvironmentSection states the platform and how run_command executes, through a new shell_label() that lives next to _spawn so the prompt cannot drift from what the tool really runs. Nothing used to say which shell this is: on Windows the model wrote `2>/dev/null || find /` and spent a turn on a PowerShell ParserError. Child-process output decoding tries UTF-8 strictly first, then the Windows OEM code page from GetOEMCP() and the stdio/locale encodings. A piped child writes in its console's code page, which need not equal sys.stdout.encoding, and cp936 accepts nearly any byte sequence so it would silently mangle UTF-8 rather than fail. A UnicodeDecodeError in the last four bytes is the byte-budget truncation splitting a character, not evidence of another encoding, so it is repaired instead of re-decoding the whole buffer under a DBCS page. Adds tests/unit/test_acli_skill_render.py: the 13 bundled skill files ship only in this wheel, so they are the real corpus that broke and the one piece of coverage with dashscope-only value. Verified by restoring the pre-fix render_skill — exactly those 6 skills fail, 19 tests — then restoring the fix. The upstream coverage for the other three fixes stays in agenticCLI, which is where those test modules live. dashscope unit: 1011 passed, 7 skipped. pre-commit --all-files green, mypy included. dashscope/acli/examples/ is untouched by the sync. * test: silence pylint on the two new cli/acli test modules pytest fixtures are injected by name, so every test taking key_store or bundled_skills redefines it from module scope, and the ones that need only the fixture's side effects never read the parameter. Both are the repo's existing convention for test modules; the assertions are unchanged apart from `calls == []` becoming `not calls`. pre-commit run --all-files only started reporting these once the files were tracked — it lints tracked files, so the untracked originals were skipped. * docs(acli): reconcile the bundled expert example with agenticCLI-examples sync_acli.sh deliberately preserves dashscope/acli/examples/, so the bundled example config drifts from its upstream repo in agenticCLI-examples and has to be reconciled by hand. Both files had moved independently: - agent.md: upstream gained the 2026-09 error-code pass (request_too_large, permission_error, billing_error, timeout_error, and the note to match on the exception class rather than .code). Take the upstream version. - system-prompt.md: Bailian docs moved to docs.modelstudio.console.alibabacloud.com. Point the product overview at the new domain and add the API-key, app-id/workspace-id and knowledge-base entries, whose titles were verified against the live pages. The remaining help.aliyun.com links are left alone rather than guessed at. The two trees are now byte-identical. * fix(cli): point the non-TTY refusal at `dashscope expert "question"` When the agent is invoked without a terminal and nothing is piped in, the error told the user to rerun as `dashscope "your question"`. That stopped working in de16112, which routes everything except a bare `dashscope` and an explicit `expert` keyword to typer. So the one message that could have recovered the command line sent the user straight into `No such command 'your question'`. Cover the whole non-TTY branch, which had no tests: piped text becomes a one-shot prompt, an empty pipe exits 2 with the corrected hint, and an unreadable stdin is refused the same way rather than crashing. The hint assertions name both the corrected form and the stale one, so a revert shows up as a failure instead of passing quietly. * acli: sync the write_file temp-dir fix from agenticCLI 749999a write_file refused any path outside the cwd, which made it stricter than every layer around it without protecting anything: run_command can already write to temp because the shell is not path-guarded, delete_file reaches anywhere behind its own prompt, and the opt-in OS sandbox confines writes to "the workspace and temp areas". The refusal also cost more than a failed call — models reach for /tmp for scratch files by instinct, so the retry put the scratch file in the user's repo instead, which is the worse outcome. Writes now land in the cwd or the realpath'd system temp dir. Both sides are resolved with realpath, so a symlink inside either root still cannot escape, and validate_path runs first so SENSITIVE_NAMES keeps blocking e.g. /tmp/.ssh/config. The refusal message names both roots generically rather than echoing absolute paths. Per-file sync only: the two files are byte-identical to agenticCLI modulo the acli. -> dashscope.acli. import rewrite. examples/ was preserved by the sync script, and no version is bumped -- agenticCLI stays at 0.6.7. * docs(acli): let the expert example answer questions about itself The Response Strategy offered three question types — issue analysis, API question, example generation — and the Workflow said to classify into one of them. A question about the assistant matches none of the three, so it fell through to the only behaviour left: probe the environment until an answer turns up. Observed on a real session: "你现在是什么模型" and "你能干嘛" together burned four run_command calls, two of which failed on bash syntax under PowerShell, before producing an answer that was already sitting in the prompt on the Current model line. Nothing about the assistant is discoverable by running a command. Add the fourth branch and make the Workflow route to it first, rather than relying on the anti-pattern list to be re-read: the model was never classifying these as "explore unrelated files to get oriented", so that line never applied. Vendored from agenticCLI-examples 77c5284; the two trees are byte-identical. * acli: sync the redaction and silence-nudge fixes from agenticCLI Two changes, both from the same reported transcript: 3f40870 — tool output is now redacted on the way into context. save_session already ran sanitize over the persisted history, so the session file was the only thing protected: a key read out of the environment was scrubbed on disk and handed to the model in full, where it stayed in the prompt prefix for the rest of the turn. It runs before truncate_head_tail rather than after, since a character-budget cut can split a token in half and leave a fragment too short for the sk- pattern to match. tool_result_for_display is untouched — that path renders to the user's own terminal. 39d0781 — one reminder per turn after ACLI_SILENT_TOOL_NUDGE (default 6, 0 disables) consecutive tool calls stream no prose. The turn shape the transcript had has no other backstop: StagnationTracker's read-only classifier counts run_command as mutating and so resets its streak, its repeat counters need byte-identical calls, ReflectionTracker needs failures, and the convergence section is oneshot-only. Fires in interactive mode too, which is where the user is watching a spinner and getting nothing. The agenticCLI unit tests covering both are not vendored by sync_acli.sh, so this repo ships them without coverage; verified against agenticCLI's 2728 passing tests. dashscope suite: 1079 passed, 42 skipped. * acli: sync the memory/skill-loop stage-0+1 changes from agenticCLI Oneshot tool registrations and memory wiring, prompt-composition and hint/token trace stats, create_plan prompt cleanup with the invisible- tool CI guard, loader-compatible skill generator behind the ACLI_EVOLVE_SKILL gate, runtime skill registration with deletion propagation, and concurrent-write hardening. * acli: sync failed-turn tracing, /model and crypto tolerance from agenticCLI 7a1105c — failed/silent turns now leave a "[Turn failed before any response: ...]" assistant trace, an identical resubmit reuses the orphaned trailing user message instead of stacking, markdown-only interrupt partials are dropped, the tongyi native wire strips reasoning_content (it was re-billing the thinking trace every turn), the gateway 403 overdue-payment block is explicitly non-retryable with an account/billing hint at both display layers, unknown slash commands print a dim notice before falling through to the model, the Current user env line is labeled as the configured display name, and an ENC: config value this machine cannot decrypt loads as unset with a stderr note instead of killing startup with a bare UnicodeDecodeError (the "Agent failed to start ('utf-8' codec ...)" report). a3d2a2c — /model <name> switches the model under the current provider without the /provider wizard; bare /model shows the current model. Non-interactive, so both REPL and TUI route it through the synchronous dispatch path. Mirrored tests added to tests/unit (tongyi wire sanitizing, account classification/hint, gateway 403 never retried); the remaining coverage lives in agenticCLI, whose suite passes 2756. dashscope acli suite: 323 passed. * acli: sync thinking-budget, output-cap continuation and oneshot policy from agenticCLI 0.6.12 Source changes arrive via scripts/sync_acli.sh; the reflection and tongyi-native tests are ported by hand with dashscope.acli imports. * acli: sync run_command budget back-pressure and 0.7.0 from agenticCLI Single-command timeout now tracks the remaining wall-clock budget (min 30s, 180s finalize reserve), and the oneshot policy gains the long-command clause; version 0.7.0 marks the Terminal-Bench hard set reaching best-of 10/10 upstream. * fix(acli): narrow _run_started for the repo mypy gate _clamp_run_command_timeout subtracts the monotonic anchor after the ceiling-None guard, but the repo's mypy (pinned --python-version=3.10) cannot infer _run_started is non-None from that guard across methods — CI on PR #206 failed with "Unsupported operand types for - (float and None)". Fold the check into the guard; upstream agenticCLI gets the same line so the next sync stays byte-identical. black also explodes two long calls in the merge-touched tongyi tests. * acli: sync 0.7.1 from agenticCLI Vision chain (oneshot registration, injection perception, region reads with voting, vision timeout, qwen3-vl-plus default), reasoning stall retry fix, oneshot empty-turn backstop, rules 17/18 and the hard-band best-partial write. vendored suite 1032 passed, 10 skipped. --------- Co-authored-by: zhansheng.lzs <zhansheng.lzs@alibaba-inc.com>
1 parent 2cd356a commit 2aa724a

33 files changed

Lines changed: 2031 additions & 453 deletions

‎dashscope/acli/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import uuid
55

6-
__version__ = "0.6.7"
6+
__version__ = "0.7.1"
77

88
# Per-process identifier sent as x-dashscope-sdk-session-id so the
99
# backend can group multi-turn requests from one CLI run.

‎dashscope/acli/agent.py‎

Lines changed: 307 additions & 43 deletions
Large diffs are not rendered by default.

‎dashscope/acli/cli/constants.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@
197197
"/tts",
198198
"/camera",
199199
"/provider",
200+
"/model",
200201
"/setup",
201202
"/capability",
202203
"/subagents",

‎dashscope/acli/cli/dispatch.py‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,13 @@ def _handle_slash_command(
367367

368368
handle_provider_command(cmd, agent, config)
369369
return True
370+
elif cmd.startswith("/model"):
371+
from dashscope.acli.cli.handlers_provider import (
372+
handle_model_command,
373+
)
374+
375+
handle_model_command(cmd, agent, config)
376+
return True
370377
elif cmd.startswith("/dev test provider") or cmd.startswith(
371378
"/dev debug call",
372379
):

‎dashscope/acli/cli/handlers_provider.py‎

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,3 +301,57 @@ def handle_provider_command(cmd: str, agent: Agent, config: Config) -> bool:
301301
"[dim]/provider is now a Q&A wizard; args ignored[/dim]",
302302
)
303303
return _provider_wizard(agent, config)
304+
305+
306+
def handle_model_command(cmd: str, agent: Agent, config: Config) -> bool:
307+
"""/model [name] — switch the model inside the current provider.
308+
309+
Users coming from other CLIs type /model reflexively; making them
310+
rediscover it under the /provider wizard costs a turn. Provider, key
311+
and protocol stay with /provider.
312+
"""
313+
parts = cmd.split(maxsplit=1)
314+
if len(parts) == 1 or not parts[1].strip():
315+
console.print(
316+
f"[cyan]{config.provider}/{config.model}[/cyan] "
317+
f"protocol={config.protocol}",
318+
)
319+
console.print(
320+
"[dim]Usage: /model <name> switches the model; "
321+
"/provider covers provider/key/protocol.[/dim]",
322+
)
323+
return True
324+
325+
model = parts[1].strip()
326+
normalized = normalize_model_name(model)
327+
if normalized != model:
328+
console.print(
329+
f"[dim]Model name normalized to {normalized} "
330+
f"(API model IDs are case-sensitive)[/dim]",
331+
)
332+
333+
# Same rule as the wizard's model step: an unlisted name under a
334+
# built-in provider is registered as a custom model; under an
335+
# extension provider it is used as-is.
336+
models = PROVIDER_MODELS.get(config.provider, [])
337+
if not models:
338+
ext = find_provider(config.provider)
339+
if ext is not None:
340+
models = ext.resolved_models()
341+
if (
342+
models
343+
and normalized not in models
344+
and config.provider in PROVIDER_MODELS
345+
):
346+
register_custom_model(config, config.provider, normalized)
347+
console.print(
348+
f"[green]✓ Registered {config.provider}/{normalized}[/green]",
349+
)
350+
config.model = normalized
351+
config.save_global()
352+
config.save_workspace()
353+
if _rebuild_provider(agent, config):
354+
console.print(
355+
f"[green]✓ Switched: {config.provider}/{config.model}[/green]",
356+
)
357+
return True

‎dashscope/acli/cli/repl.py‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,15 @@ async def _cli_confirm_callback(
562562
continue
563563
elif result:
564564
continue
565+
else:
566+
# Not a registered command: the text goes to the model (an
567+
# agent can legitimately answer slash-command questions),
568+
# but say so — a typo'd command must not fail silently.
569+
console.print(
570+
f"[dim]Unknown command "
571+
f"{user_input.split()[0]}; sending it to the model "
572+
f"instead (/help lists commands).[/dim]",
573+
)
565574

566575
# Expand @path tokens to file contents before sending to the agent.
567576
# Done here (post slash-command handling) so slash commands themselves

‎dashscope/acli/cli/runners.py‎

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,32 @@ async def _run_oneshot(config: Config, prompt: str):
148148
auto_approve=config.auto_approve,
149149
confirm_mode=config.confirm_mode,
150150
)
151+
152+
# Memory and the shared hook bus must exist before the Agent does (same
153+
# wiring as cli/repl.py): without them oneshot had no memory provider at
154+
# all, so every memory- or skill-shaped capability scored a constant zero
155+
# in non-interactive runs.
156+
memory = None
157+
if config.memory_enabled:
158+
from dashscope.acli.cli.handlers_profile import set_memory_client
159+
from dashscope.acli.platforms import get_memory_provider
160+
161+
memory = get_memory_provider(config)
162+
if memory:
163+
set_memory_client(memory)
164+
165+
from dashscope.acli.hooks import create_hook_bus
166+
167+
hook_bus = create_hook_bus()
168+
151169
agent = Agent(
152170
provider=provider,
153171
executor=executor,
154172
max_turns=config.max_turns,
173+
memory=memory,
155174
provider_name=config.provider,
156175
model_name=config.model,
176+
hook_bus=hook_bus,
157177
oneshot=True,
158178
)
159179

@@ -178,11 +198,53 @@ async def _run_oneshot(config: Config, prompt: str):
178198
set_delegate_parent(agent)
179199
set_delegate_config(config)
180200

181-
from dashscope.acli.cli.mcp import _connect_mcp
201+
from dashscope.acli.cli.mcp import (
202+
_connect_mcp,
203+
_disconnect_mcp,
204+
_mcp_clients,
205+
)
182206
from dashscope.acli.tools.platform import register_platform_tools
183207

184208
register_platform_tools(config, connect_mcp_fn=_connect_mcp)
185209

210+
# The four registrations below mirror the interactive/TUI paths
211+
# (cli/repl.py, _run_tui_mode). Oneshot used to skip them, which left
212+
# skill packages unloaded and the session/skill/evolution tools
213+
# unregistered in exactly the mode benchmarks run in.
214+
from dashscope.acli.skills import get_skill_manager
215+
216+
skill_manager = get_skill_manager()
217+
skill_manager._registry_url = getattr(config, "skill_registry", "")
218+
skill_manager._global = False
219+
skill_manager.load(hook_bus=hook_bus)
220+
221+
from dashscope.acli.tools.session import register_session_tools
222+
223+
register_session_tools(
224+
config,
225+
get_agent=lambda: agent,
226+
get_provider_fn=get_provider,
227+
connect_mcp_fn=_connect_mcp,
228+
disconnect_mcp_fn=_disconnect_mcp,
229+
list_mcp_services_fn=list_known_services,
230+
get_mcp_clients_fn=lambda: _mcp_clients,
231+
)
232+
233+
# Vision too: without it, oneshot (every bench run 071c–071k) offered
234+
# no view_image at all — the prompt named a tool the model could not
235+
# see — and read_file/run_command auto-perceive had no context.
236+
from dashscope.acli.tools.vision import register_vision_tools
237+
238+
register_vision_tools(config, get_provider_fn=get_provider)
239+
240+
from dashscope.acli.tools.evolution import register_evolution_tools
241+
242+
register_evolution_tools(get_agent=lambda: agent)
243+
244+
from dashscope.acli.tools.skills import register_skill_tools
245+
246+
register_skill_tools(get_agent=lambda: agent)
247+
186248
expanded, images, audio_clips = _expand_at_references(prompt)
187249
if images and not is_vision_model(config.model):
188250
console.print(
@@ -225,7 +287,12 @@ async def _run_oneshot(config: Config, prompt: str):
225287
if usage_path:
226288
_write_usage_file(usage_path, executor)
227289
if failure is not None:
290+
from dashscope.acli.providers.hardening import account_error_hint
291+
228292
print(f"Error: {failure}", file=sys.stderr)
293+
hint = account_error_hint(failure)
294+
if hint:
295+
print(hint, file=sys.stderr)
229296
sys.exit(1)
230297

231298

‎dashscope/acli/cli/streaming.py‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
AsyncSpinner,
2222
UserAbortedTurn,
2323
message_text_for_compress,
24+
truncate,
2425
)
2526

2627
console = Console()
@@ -206,7 +207,10 @@ async def _do_summarize(
206207
lesson = f"Steps: {'; '.join(steps)}"
207208

208209
tracker.record_experience(
209-
task_summary=task[:200],
210+
# Flatten newlines and mark truncation: the task is usually
211+
# the raw prompt, and a mid-word cut with embedded newlines
212+
# breaks the numbered "Past Lessons" list in the system prompt.
213+
task_summary=truncate(" ".join(task.split()), 200),
210214
tools_used=tools_used,
211215
outcome=outcome,
212216
lesson=lesson,
@@ -313,6 +317,11 @@ def _sigint_handler():
313317
console.print("\n[dim]Turn aborted[/dim]")
314318
except Exception as e:
315319
console.print(f"\n[red]Error: {e}[/red]")
320+
from dashscope.acli.providers.hardening import account_error_hint
321+
322+
hint = account_error_hint(e)
323+
if hint:
324+
console.print(f"[yellow]{hint}[/yellow]")
316325
finally:
317326
# Restore default SIGINT handler
318327
try:

‎dashscope/acli/commands.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@
8080
"/provider",
8181
"Configure Provider / Key / model / protocol (Q&A style)",
8282
),
83+
(
84+
"/model",
85+
"Switch the model within the current provider "
86+
"(/model <name>)",
87+
),
8388
(
8489
"/trust",
8590
"Tool trust/deny cache for this session "

‎dashscope/acli/config.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"qwen-max",
3333
"qwen-plus",
3434
"qwen-turbo",
35+
"qwen3-vl-plus",
3536
"qwen-vl-max",
3637
"qwen-vl-plus",
3738
"qwen-omni-turbo",

0 commit comments

Comments
 (0)