Repository navigation
What's New
Streaming Chat Completions (SSE)
Requests with stream: true are now fully supported. The gateway scans the full request through DLP before forwarding, then streams the LLM response back as Server-Sent Events — matching the OpenAI streaming spec.
- Drop-in compatible — set
stream: truein your existing OpenAI SDK calls, no other changes needed - DLP on every request — PII redaction and prompt injection blocking run on the full request before streaming begins
- Token usage included —
stream_options.include_usageis automatically enabled; usage appears in the final chunk - Graceful error handling — mid-stream errors return a structured error chunk followed by
data: [DONE]
Example
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8080/v1", api_key="your-key")
stream = client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": "Hello"}],
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
What Changed
Added
- Full SSE streaming support for chat completions
- OpenAI-compatible streamed responses
- Streaming passthrough while preserving request-side enforcement
What Does NOT Change
- Request-side DLP (PII redaction, prompt injection blocking) — identical behavior
- Provider resolution and routing — same logic
- API key auth, rate limiting, fail-closed security — all unchanged
- Response-side DLP scanning — not in scope (planned for a future release)
Files Changed
| File | Change |
|---|---|
proxy-api/app/providers.py |
Added forward_chat_completion_stream() |
proxy-api/app/routers/proxy.py |
Removed stream: true rejection, added SSE streaming path |
proxy-api/tests/test_proxy.py |
Updated test to verify streaming is accepted |
Links
Documentation
- Managed Cloud — 1M free credits, no credit card
PR
- PR #1
Full Changelog
Release Notes
When publishing:
- Set as Latest release
- Enable Create a discussion for this release