Skip to content

fix(cli): accept canonical langgraph --runtime flag (keep lang-graph alias)#483

Open
pallakatos wants to merge 1 commit into
mainfrom
fix/langgraph-runtime-flag-alias
Open

fix(cli): accept canonical langgraph --runtime flag (keep lang-graph alias)#483
pallakatos wants to merge 1 commit into
mainfrom
fix/langgraph-runtime-flag-alias

Conversation

@pallakatos

Copy link
Copy Markdown
Collaborator

Problem

kars add <name> --runtime langgraph fails today:

Unknown --runtime value: langgraph. Valid values: …, lang-graph, …

The CLI flag parser (cli/src/runtime.ts) only accepted the hyphenated lang-graph, but the unhyphenated langgraph is the canonical spelling used everywhere else:

  • the CLI's own --runtime help text (add.ts) — so the tool contradicted itself
  • docs: docs/cli-reference.md, docs/runtimes.md, README.md
  • controller: plan_langgraph, langgraph_default_image()
  • runtime images: kars-runtime-langgraph, dirs runtimes/langgraph/
  • Helm values: runtimes.langgraph.image
  • E2E tests: --runtime langgraph

lang-graph was an accidental island in just the CLI flag parser + operator picker. This also makes the --runtime langgraph example in the getting-started guide / launch materials work out of the box.

Fix

  • langgraph is now the canonical flag in FLAG_TO_KIND and the operator TUI picker.
  • lang-graph keeps working via a dedicated FLAG_ALIASES map consulted by flagToKind() — but it is not surfaced in pickers (wiredRuntimeFlags), the reverse KIND_TO_FLAG map, or the "Valid values" error text. No breakage for existing scripts.

Tests

  • Canonical langgraph and legacy lang-graph (case-insensitive) both resolve to LangGraph.
  • The alias is asserted absent from the canonical valid-values error text.
  • Updated the wiredRuntimeFlags() expected-set test to langgraph.

Verification (local)

  • tsc --noEmit clean
  • npm test — 933 passed / 2 skipped (28 runtime tests incl. 4 new)
  • npm run lint — 0 errors

No release cut with this PR — folding into the next batched release.

…ph` alias)

The CLI flag parser only accepted the hyphenated `lang-graph`, so
`kars add x --runtime langgraph` failed with "Unknown --runtime value"
— even though the `--runtime` help text, docs, controller
(`plan_langgraph`), runtime images (`kars-runtime-langgraph`) and Helm
values all use the unhyphenated `langgraph`. Make `langgraph` canonical
in FLAG_TO_KIND and the operator picker; keep `lang-graph` working via a
dedicated FLAG_ALIASES map that is not surfaced in pickers or the
valid-values error text. Adds tests for both spellings.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

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