Skip to content

dev/cli2.0 - #223

Merged
luk384090-cloud merged 13 commits into
mainfrom
dev/cli2.0
Nov 6, 2026
Merged

luk384090-cloud merged 13 commits into
mainfrom
dev/cli2.0

Conversation

@luk384090-cloud

Copy link
Copy Markdown
Collaborator
  • Add CLI v2 core architecture and root Typer app configuration
  • Implement chat create command with support for streaming and non-streaming text generation
  • Add python -m dashscope.cli2 module entry point
  • Provide CI testing utility examples and local mock gateway
  • Optimize command module structure with lazy SDK imports to improve help text loading speed
  • Fix missing client user-agent in ASR module WebSocket requests

Description

[Describe what this PR does and why]

Related Issue: Fixes #[issue_number] or Relates to #[issue_number]

Security Considerations: [Check if API keys or sensitive credentials are exposed in code/logs]

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Refactoring

Component(s) Affected

  • Model
  • Application
  • Common
  • Documentation
  • Tests
  • CI/CD

Checklist

  • Pre-commit hooks pass
  • Tests pass locally
  • Documentation updated (if needed)
  • Ready for review

Testing

[How to test these changes]

Additional Notes

[Optional: any other context]

luk384090-cloud added 5 commits November 3, 2026 15:10
- Add CLI v2 core architecture and root Typer app configuration
- Implement chat create command with support for streaming and non-streaming text generation
- Add python -m dashscope.cli2 module entry point
- Provide CI testing utility examples and local mock gateway
- Optimize command module structure with lazy SDK imports to improve help text loading speed
- Fix missing client user-agent in ASR module WebSocket requests
- Catch TypeError exception during CliRunner instantiation
- Adapt to click 8.2+ default stream separation behavior
- Update _runner function in test_app.py
- Update _runner function in test_errors.py
- Add detailed docstring to _click_passthrough function
- Explain the reason for collecting both real click and typer exception classes
- Add capture logic for exceptions in typer's internal _click compatibility layer
- Extract relevant exception classes from typer._click.exceptions
- Prevent typer's missing argument exceptions from being misclassified as server errors
- Handle import errors when older typer versions do not provide the _click module
… cli

Rename the v2 package directory from cli2 to cli, making it the
primary command tree. Add 16 new resource commands (files, models,
images, videos, embeddings, multimodal, rerank, tokenization, apps,
deployments, rl, audio, audio-customization, tingwu, decision,
agentstudio) alongside the existing chat/ft/config commands.

Key changes:
- Rename dashscope/cli2 → dashscope/cli and tests/cli2 → tests/cli
- Bump version to 2.0.4
- Refactor main.py dispatch logic with consolidated command routing
- Expand config_store.py with TOML line-editor writer (no new deps)
- Overhaul error handling, output formatting, and progress display
- Enhance ft command with extended fine-tuning workflows
- Update README and CLI examples (en/zh) with new command docs
- Add comprehensive test coverage for all new commands
- Clean up legacy import aliases
… cli

Rename the v2 package directory from cli2 to cli, making it the
primary command tree. Add 16 new resource commands (files, models,
images, videos, embeddings, multimodal, rerank, tokenization, apps,
deployments, rl, audio, audio-customization, tingwu, decision,
agentstudio) alongside the existing chat/ft/config commands.

Key changes:
- Rename dashscope/cli2 → dashscope/cli and tests/cli2 → tests/cli
- Bump version to 2.0.4
- Refactor main.py dispatch logic with consolidated command routing
- Expand config_store.py with TOML line-editor writer (no new deps)
- Overhaul error handling, output formatting, and progress display
- Enhance ft command with extended fine-tuning workflows
- Update README and CLI examples (en/zh) with new command docs
- Add comprehensive test coverage for all new commands
- Clean up legacy import aliases
@luk384090-cloud
luk384090-cloud force-pushed the dev/cli2.0 branch 2 times, most recently from a77879f to b358423 Compare November 5, 2026 02:58
luk384090-cloud and others added 5 commits November 5, 2026 11:12
- Add trailing comma in delete operation of deployments command
- Add trailing comma in raise statements of rerank command
- Add trailing commas to function parameter lists in test files
- Add trailing commas to list and dict arguments in test files
- Unify code style to comply with auto-formatting tools
ubuntu-latest now resolves to Ubuntu 26.04, which ships no CPython 3.9
build, so setup-python failed on the 3.9 leg and matrix fail-fast
cancelled the passing 3.10-3.13 legs. Keep the still-supported 3.9 leg
on ubuntu-24.04 and leave 3.10-3.13 on ubuntu-latest, for both the
current and legacy jobs.
zhansheng.lzs added 3 commits November 5, 2026 17:40
Use dashscope-sdk-python/{version} so the SDK and language identity are explicit without duplicating the major version.
Keep dashscope on the v2 SDK and expose the frozen 1.x CLI as dashscope1, rejecting moved commands with a migration hint instead of dispatching or rewriting argv.
@luk384090-cloud
luk384090-cloud merged commit 93af254 into main Nov 6, 2026
12 checks passed
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.

1 participant