Skip to content

feat(runtime): accept a user-supplied API key for authenticated vLLM servers - #13294

Merged
cv merged 1 commit into
v1from
feat/runtime-supplied-key
Oct 15, 2026
Merged

cv merged 1 commit into
v1from
feat/runtime-supplied-key

Conversation

@cv

@cv cv commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

Closes #13225. Part of #13131.

Failure

With authentication: bearer, the vLLM runtime image could only generate its API key, in a Docker credential volume that NemoClaw reads back through the Docker engine. A server run on Kubernetes, Podman or anywhere else has no such volume, so it couldn't serve authenticated.

Decision

As narrowed on #13225: the platform's secret mechanism owns the key off Docker; NemoClaw owns the runtime image's interface.

  • Runtime: with authentication set, the supervisor uses a key from NEMOCLAW_INFERENCE_KEY when its launch sets one.
    • It then neither takes the credential volume's lock nor generates a key.
    • It passes the key to vLLM only as VLLM_API_KEY, removing the variable from vLLM's environment.
    • A supplied key must be 16 to 4096 printable characters without whitespace, and errors never include it.
    • A supplied key without authentication in the contract stops startup, so a server never runs unauthenticated while someone believes it's protected.
    • Without the variable, the Docker path is unchanged and keeps generating keys.
  • vllm_runtime and ollama_runtime: launch.key_env names that variable when authentication is on, and is empty otherwise, so users can wire their platform's secret to it.
  • Unchanged: registrations, since openshell_inference already takes a literal server object with credential_env. Readiness off Docker is the platform's, so endpoint readiness stays unauthenticated.
  • Not covered: Ollama. It has no authentication of its own, and NemoClaw's proxy that adds it only runs beside a Docker-managed gateway.
  • Docs: docs/inference.md gains "Supply the Key on Other Platforms" with a Kubernetes Secret example, and docs/provider.md describes key_env.

Validation

  • New tests: a_supplied_key_is_used_only_when_it_is_a_usable_token (runtime) and the_launch_names_the_key_variable_only_for_authenticated_servers (provider). Both failed before the change.
  • cargo ci passes locally: 1531 unit tests, 145 lifecycle tests.
  • Schema snapshots and the generated configuration reference are regenerated. fern check reports 0 errors.
  • Not tested: removing the inherited variable from vLLM's environment. Simulating inheritance means changing the test process's own environment, which is unsafe with tests in parallel; the existing VLLM_API_KEY removal is untested the same way.
  • Not run: the runtime images aren't rebuilt by cargo ci, so serving with a supplied key hasn't been exercised in a real image.

…servers

Off Docker there is no credential volume for the runtime to generate
its key in. With authentication set, the runtime now uses a key from
NEMOCLAW_INFERENCE_KEY when its launch sets one, without touching the
credential volume, and rejects a supplied key without authentication.
The runtime contracts' launch names the variable as key_env so
platforms can wire their own secret to it.
@github-actions

Copy link
Copy Markdown
Contributor

@cv
cv merged commit a66e5bb into v1 Oct 15, 2026
@cv
cv deleted the feat/runtime-supplied-key branch October 15, 2026 23:51
@wscurran wscurran added area: providers Inference provider integrations and provider behavior area: security Security controls, permissions, secrets, or hardening feature PR adds or expands user-visible functionality provider: vllm vLLM local or hosted provider behavior v1 NemoClaw v1 branch labels Oct 26, 2026
@cv cv added this to the Roadmap: GTC DC 2026 milestone Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: providers Inference provider integrations and provider behavior area: security Security controls, permissions, secrets, or hardening feature PR adds or expands user-visible functionality provider: vllm vLLM local or hosted provider behavior v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants