streaming-architecture

Unify provider SSE streams into OpenAI-compatible chat chunks.

104|19|Updated Jul 15, 2025
One-click install
npx skills add https://github.com/majiayu000/litellm-rs --skill streaming-architecture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: streaming-architecture
Source: https://github.com/majiayu000/litellm-rs/tree/main/.claude/skills/streaming-architecture
Command: npx skills add https://github.com/majiayu000/litellm-rs --skill streaming-architecture

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

LiteLLM-RS Streaming Architecture provides a unified, provider-agnostic streaming pipeline that normalizes diverse SSE formats from 66+ providers and outputs an OpenAI-compatible chat stream in real time.

Core Features & Use Cases

  • Unified SSE parsing and buffering with a provider-agnostic Transformer system.
  • Provider-specific transformations to normalize data into OpenAI-compatible chunks.
  • Real-time, streaming chat outputs with consistent formatting and error handling.
  • Use Case: Route SSE from multiple providers (OpenAI, Anthropic, Google, etc.) and present a single OpenAI-like stream to clients.

Quick Start

Use the streaming architecture for building a multi-provider streaming gateway that produces OpenAI-compatible chat chunks from provider SSE streams and supports backpressure and error handling.

Frequently Asked Questions about streaming-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I normalize SSE streams from multiple LLM providers into a single format?

Normalizing SSE streams from multiple LLM providers requires a unified parser with provider-specific transformers to convert diverse event formats into consistent OpenAI-compatible chat chunks for real-time output.

What is the best way to unify diverse provider SSE streams in Rust?

Unifying diverse provider SSE streams in Rust is best achieved using a trait-based transformer system with buffered parsing. This skill implements an SSETransformer trait and VecDeque buffering to handle real-time event flow deterministically across 66+ providers.

Does this streaming architecture support backpressure and robust error handling?

Yes, this streaming architecture supports backpressure and robust error handling. It enforces deterministic parsing and provider-aware error management to ensure consistent ChatChunk outputs during real-time event flow processing.

Can I route real-time chat outputs from Anthropic and Google to an OpenAI-compatible stream?

Yes, you can route real-time chat outputs from providers like Anthropic and Google into an OpenAI-compatible stream. The architecture applies provider-specific transformations to normalize SSE data into a single OpenAI-like stream for clients.

How does the UnifiedSSEParser handle provider-specific event transformations?

The UnifiedSSEParser handles provider-specific transformations by implementing an SSETransformer trait, utilizing VecDeque buffering to manage real-time event flow, and enforcing deterministic parsing to output consistent ChatChunk data with provider-aware metadata.

When do I need a provider-agnostic streaming pipeline for LLM applications?

You need a provider-agnostic streaming pipeline when building a multi-provider streaming gateway that requires consistent formatting and error handling. It is essential when routing SSE from 66+ providers to present a single OpenAI-like stream to clients.