Skip to content

vllm

vLLM plugin for Stained Glass Output Protection.

Consists of several major components, each of which has its own module. See each module for more details.

As of vLLM 0.21.0, the vllm.general_plugins entry point system loads plugins in all vLLM processes, including the process that builds the OpenAI-compatible FastAPI application. AsyncEngineArgs.add_cli_args calls load_general_plugins() while the vllm serve parser is being built, EngineArgs.__post_init__ calls it again in every spawned API server worker, and EngineCore.__init__ calls it in the engine subprocess. No special launch command is therefore needed: vllm serve <model> is fully output-protected.

See entrypoint for the deprecated alternative-entrypoint.

Warning

Under almost no circumstances should you need to import this package directly. If stainedglass_output_protection is installed, vLLM loads it automatically via the vllm.general_plugins entry point.

Modules:

Name Description
entrypoint

Register Stained Glass Output Protection with vLLM.

launch_modes

Refuse vLLM launch modes that would bypass Output Protection (OP).

middleware

Middleware for the vLLM OpenAI-compatible RESTful API server that reads a user-provided public key from the request headers, registers

parsers

Disable server-side tool/reasoning parsing under Output Protection (OP) Encryption.

prompt_embeds

Enable vLLM's --enable-prompt-embeds by default under Output Protection (OP).

registry

User key registry for Stained Glass Output Protection in vLLM, shared across all vLLM processes.

request_output

Patched vLLM RequestOutput class with encrypted text fields.

sampling_params

Preserve special tokens in the raw model output under Output Protection (OP).

server_keys

Utilities for managing ephemeral server keys in a FastAPI application.

turboquant_plugin

vLLM general plugin that patches prompt-embed loading to decode TurboQuant-compressed payloads.

verification

Assert that Output Protection (OP) actually took effect in vLLM, and refuse to serve if it did not.