Implement streaming responses with OpenRouter. Use when building real-time chat interfaces or reducing time-to-first-token. Trigger with phrases like 'openrouter streaming', 'openrouter sse', 'stream response', 'real-time openrouter'.
From openrouter-packnpx claudepluginhub nickloveinvesting/nick-love-plugins --plugin openrouter-packThis skill is limited to using the following tools:
references/async-streaming.mdreferences/basic-streaming.mdreferences/error-handling-in-streams.mdreferences/errors.mdreferences/examples.mdreferences/frontend-integration.mdreferences/stream-processing.mdreferences/web-framework-integration.mdGuides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Details PluginEval's skill quality evaluation: 3 layers (static, LLM judge), 10 dimensions, rubrics, formulas, anti-patterns, badges. Use to interpret scores, improve triggering, calibrate thresholds.
This skill demonstrates streaming response implementation for lower perceived latency and real-time output display.
stream: true in your chat completion request bodydata: {...} line from the response stream, extracting choices[0].delta.content from each chunkdata: [DONE] to know when the stream is complete; accumulate chunks for the full responseReadableStream or EventSource in the browser to display tokens as they arrive| Error | Cause | Fix |
|---|---|---|
| Stream cuts off mid-response | Network timeout or model error | Implement reconnection logic; save partial output |
Missing usage in stream | Some models omit usage in streaming mode | Set stream_options: { include_usage: true } or make a separate token count call |
| Empty delta chunks | Keep-alive pings from the server | Filter chunks where delta.content is null or empty |
See ${CLAUDE_SKILL_DIR}/references/errors.md for full error reference.
See ${CLAUDE_SKILL_DIR}/references/examples.md for runnable code samples.