From f085820dd3084734494d3fb1cd39fab264f7f661 Mon Sep 17 00:00:00 2001 From: syachamaneni-lc Date: Wed, 23 Sep 2026 09:49:51 -0700 Subject: [PATCH] fix(cli): label agent flags as private beta --- libs/cli/langgraph_cli/deploy.py | 5 +++++ libs/cli/tests/unit_tests/test_deploy_agents.py | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/libs/cli/langgraph_cli/deploy.py b/libs/cli/langgraph_cli/deploy.py index d2967c472..78de5f119 100644 --- a/libs/cli/langgraph_cli/deploy.py +++ b/libs/cli/langgraph_cli/deploy.py @@ -1982,6 +1982,7 @@ def _deploy_cmd( validate_deploy_commands(install_command, build_command) agent = None if agent_id is not None or environment is not None: + em.note("--agent-id and --environment flags are in private beta") if not agent_id or not agent_id.strip() or not environment: raise click.UsageError( "--agent-id and --environment are required together." @@ -2138,6 +2139,10 @@ def deploy_list( agent_id: str | None, environment: str | None, ) -> None: + if agent_id is not None or environment is not None: + click.secho( + "--agent-id and --environment flags are in private beta", fg="yellow" + ) if agent_id is not None and not agent_id.strip(): raise click.UsageError("--agent-id must not be empty.") filters = {} diff --git a/libs/cli/tests/unit_tests/test_deploy_agents.py b/libs/cli/tests/unit_tests/test_deploy_agents.py index 14de9f099..254298822 100644 --- a/libs/cli/tests/unit_tests/test_deploy_agents.py +++ b/libs/cli/tests/unit_tests/test_deploy_agents.py @@ -71,6 +71,7 @@ def test_agent_create(deployment_api, tmp_path, monkeypatch): _, requests, build = deployment_api result = CliRunner().invoke(cli, AGENT_ARGS) assert result.exit_code == 0, result.output + assert "--agent-id and --environment flags are in private beta" in result.output assert dict(requests[0].url.params) == { "name_contains": "", "agent_id": "customer-support", @@ -103,3 +104,14 @@ def test_agent_rejects_explicit_name(deployment_api, monkeypatch): assert result.exit_code == 2 assert "cannot be combined" in result.output assert not requests + + +@pytest.mark.parametrize( + "args", [["--agent-id", "customer-support"], ["--environment", "staging"], []] +) +def test_agent_list_beta_notice(deployment_api, args): + result = CliRunner().invoke(cli, ["deploy", "list", *args]) + assert result.exit_code == 0, result.output + assert ( + "--agent-id and --environment flags are in private beta" in result.output + ) == bool(args)