Skip to content

stainedglass_output_protection

Python package for Stained Glass Output Protection, a library for tokenwise protecting generative AI outputs in vLLM.

Contains both utilities for generating keys and encrypting/decrypting messages, as well as a vLLM plugin for integrating Stained Glass Output Protection directly into vLLM's generation pipeline.

Modules:

Name Description
decryption

Utilities to decrypt OpenAI-style Completion/Chat Completions responses.

encryption

Utilities for generating keys and encrypting/decrypting messages using the x25519 key exchange and AES-GCM encryption (formatted in the

parsing

Parse decrypted model outputs into reasoning, content, and tool calls.

prompt_embeds_id

Content-addressed identifiers for prompt_embeds payloads.

turboquant

TurboQuant MSE algorithm (arXiv:2504.19874) with encode helpers for the proxy.

vllm

vLLM plugin for Stained Glass Output Protection.