feat(cli): support compatible api version ranges (#8023)

Adds `api_version` ranges for LangGraph API base image tags.
`~=0.11.0.dev5` resolves to the newest matching compatible image while
freezing later dev prereleases until rc/final/patch tags exist;
`>~=0.11.0.dev5` uses the same floor but can also float to future stable
releases while ignoring future prereleases.

Verified with `make format`, `make lint`, and `make test` from
`libs/cli`.

---------

Signed-off-by: Connor Braa <cwlbraa@langchain.dev>
This commit is contained in:
Connor Braa
2026-06-15 20:24:31 -04:00
committed by GitHub
parent 97320843fe
commit 916025d2f6
3 changed files with 327 additions and 2 deletions
+8 -1
View File
@@ -159,7 +159,14 @@ OPT_POSTGRES_URI = click.option(
OPT_API_VERSION = click.option(
"--api-version",
type=str,
help="API server version to use for the base image. If unspecified, the latest version will be used.",
help=(
"API server version to use for the base image. If unspecified, the "
"latest stable version will be used. Compatible ranges like "
"~=0.11.0.dev5 stay on 0.11.0.dev5 while only newer dev builds exist, "
"then resolve to the newest matching rc or stable release, for example "
"0.11.0rc1 or 0.11.0. Stable-floating ranges like >~=0.11.0.dev5 "
"can also pick up future stable releases, for example 0.12.0."
),
)
OPT_ENGINE_RUNTIME_MODE = click.option(