From f42587438e3b2fd5046fdcc24d0af2daf9c164da Mon Sep 17 00:00:00 2001 From: Ace Data Cloud Dev Date: Tue, 11 Aug 2026 15:47:31 +0800 Subject: [PATCH 1/6] fix: update glm/pyproject.toml for glm-pro-cli --- glm/pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glm/pyproject.toml b/glm/pyproject.toml index f620ac5..1bc8f77 100644 --- a/glm/pyproject.toml +++ b/glm/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "glm-cli" +name = "glm-pro-cli" version = "0.1.0" description = "CLI tool for GLM Chat Completions via AceDataCloud" readme = "README.md" @@ -56,7 +56,7 @@ release = [ "twine>=6.1.0", ] all = [ - "glm-cli[dev,test,release]", + "glm-pro-cli[dev,test,release]", ] [project.scripts] From 40510683c8751530c0a2f8f74a1b60ce8df8b42b Mon Sep 17 00:00:00 2001 From: Ace Data Cloud Dev Date: Tue, 11 Aug 2026 15:47:33 +0800 Subject: [PATCH 2/6] fix: update glm/glm_cli/main.py for glm-pro-cli --- glm/glm_cli/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glm/glm_cli/main.py b/glm/glm_cli/main.py index 301babb..a3359e5 100644 --- a/glm/glm_cli/main.py +++ b/glm/glm_cli/main.py @@ -19,7 +19,7 @@ def get_version() -> str: """Get the package version.""" try: - return metadata.version("glm-cli") + return metadata.version("glm-pro-cli") except metadata.PackageNotFoundError: return "dev" From c9491da9730b72115568ac659f6fb8ac604e7e1a Mon Sep 17 00:00:00 2001 From: Ace Data Cloud Dev Date: Tue, 11 Aug 2026 15:47:36 +0800 Subject: [PATCH 3/6] fix: update glm/README.md for glm-pro-cli --- glm/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glm/README.md b/glm/README.md index 9ccac3c..c21c4f7 100644 --- a/glm/README.md +++ b/glm/README.md @@ -5,7 +5,7 @@ A command-line tool for GLM chat completions via [AceDataCloud](https://platform ## Installation ```bash -pip install glm-cli +pip install glm-pro-cli ``` ## Quick Start From bf70f30bad51fec6f8db4561a6ba2d22edb5312c Mon Sep 17 00:00:00 2001 From: Ace Data Cloud Dev Date: Tue, 11 Aug 2026 15:47:38 +0800 Subject: [PATCH 4/6] fix: update glm/tests/test_commands.py for glm-pro-cli --- glm/tests/test_commands.py | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/glm/tests/test_commands.py b/glm/tests/test_commands.py index 6d45ec0..df9bd48 100644 --- a/glm/tests/test_commands.py +++ b/glm/tests/test_commands.py @@ -7,7 +7,7 @@ from click.testing import CliRunner from httpx import Response -from glm_cli.main import cli +from glm_cli.main import cli, get_version @pytest.fixture @@ -23,6 +23,14 @@ def test_version(self, runner): assert result.exit_code == 0 assert "glm-cli" in result.output + def test_version_uses_distribution_name(self, monkeypatch): + monkeypatch.setattr( + "glm_cli.main.metadata.version", + lambda name: "1.2.3" if name == "glm-pro-cli" else None, + ) + + assert get_version() == "1.2.3" + def test_help(self, runner): result = runner.invoke(cli, ["--help"]) assert result.exit_code == 0 @@ -55,9 +63,7 @@ def test_chat_rich_output(self, runner, mock_chat_response): respx.post("https://api.acedata.cloud/glm/chat/completions").mock( return_value=Response(200, json=mock_chat_response) ) - result = runner.invoke( - cli, ["--token", "test-token", "chat", "Hello"] - ) + result = runner.invoke(cli, ["--token", "test-token", "chat", "Hello"]) assert result.exit_code == 0 assert "Paris" in result.output @@ -81,8 +87,13 @@ def test_chat_with_system_prompt(self, runner, mock_chat_response): result = runner.invoke( cli, [ - "--token", "test-token", "chat", "Hello", - "-s", "You are a helpful assistant", "--json", + "--token", + "test-token", + "chat", + "Hello", + "-s", + "You are a helpful assistant", + "--json", ], ) assert result.exit_code == 0 From 3f00107a1d8911298796ae69b504d267cf58fc49 Mon Sep 17 00:00:00 2001 From: Ace Data Cloud Dev Date: Tue, 11 Aug 2026 15:47:41 +0800 Subject: [PATCH 5/6] fix: update glm/glm_cli/commands/chat.py for glm-pro-cli --- glm/glm_cli/commands/chat.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/glm/glm_cli/commands/chat.py b/glm/glm_cli/commands/chat.py index 7c3441b..f6ede11 100644 --- a/glm/glm_cli/commands/chat.py +++ b/glm/glm_cli/commands/chat.py @@ -130,7 +130,9 @@ default=False, help="Enable parallel function calling during tool use.", ) -@click.option("--stream", is_flag=True, default=False, help="Stream partial chat completion events.") +@click.option( + "--stream", is_flag=True, default=False, help="Stream partial chat completion events." +) @click.option( "--response-format", default=None, @@ -149,7 +151,7 @@ @click.option( "--stream-options", default=None, - help='Streaming options as a JSON object (e.g. \'{"include_usage": true}\').', + help="Streaming options as a JSON object (e.g. '{\"include_usage\": true}').", ) @click.option("--metadata", default=None, help="Metadata as a JSON object.") @click.option("--logit-bias", default=None, help="Logit bias map as a JSON object.") @@ -220,9 +222,7 @@ def chat( parsed_modalities = parse_json_array(modalities, "--modalities") parsed_audio = parse_json_object(audio, "--audio") parsed_prediction = parse_json_object(prediction, "--prediction") - parsed_web_search_options = parse_json_object( - web_search_options, "--web-search-options" - ) + parsed_web_search_options = parse_json_object(web_search_options, "--web-search-options") except click.BadParameter as e: print_error(e.format_message()) raise SystemExit(1) from None From 69c1adad68fbc2b1a1cb742421c62d00664622f9 Mon Sep 17 00:00:00 2001 From: Ace Data Cloud Dev Date: Tue, 11 Aug 2026 15:47:44 +0800 Subject: [PATCH 6/6] fix: update glm/glm_cli/core/client.py for glm-pro-cli --- glm/glm_cli/core/client.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/glm/glm_cli/core/client.py b/glm/glm_cli/core/client.py index 6046cc5..fb9029a 100644 --- a/glm/glm_cli/core/client.py +++ b/glm/glm_cli/core/client.py @@ -24,8 +24,7 @@ def _get_headers(self) -> dict[str, str]: """Get request headers with authentication.""" if not self.api_token: raise GLMAuthError( - "API token not configured. " - "Set ACEDATACLOUD_API_TOKEN or use --token option." + "API token not configured. Set ACEDATACLOUD_API_TOKEN or use --token option." ) return { "accept": "application/json",