RelayRouter streaming stops midway: debugging dropped SSE connections
When a RelayRouter stream stops midway, check the request and the network path in this order. Confirm that your SDK calls the matching protocol endpoint (/v1/chat/completions, /v1/messages or /v1beta/models/{model}:generateContent) with a valid Bearer key. Review client read timeouts and any proxies that buffer or close connections. Then retry with a second model to separate a model issue from a connection issue.
Verify the endpoint matches your SDK's protocol
Confirm that your SDK and the endpoint use the same protocol, because a mismatch can produce a stream your code cannot parse. RelayRouter is “Compatible with the OpenAI, Anthropic and Gemini protocols”, according to relayrouter.io, and each protocol has its own path. Streaming is supported. Every request authenticates with the header Authorization: Bearer YOUR_API_KEY, and you create keys at https://relayrouter.io/dashboard. If an OpenAI client points at the Anthropic base URL, or the reverse, the response will not match the event format your code expects. Use the table below to check your configuration.
| Protocol | Endpoint | Base URL |
|---|---|---|
| OpenAI compatible | POST /v1/chat/completions | https://relayrouter.io/v1 |
| Anthropic compatible | POST /v1/messages | https://relayrouter.io |
| Gemini compatible | POST /v1beta/models/{model}:generateContent | See relayrouter.io/docs |
Rule out client timeouts and buffering on your side
Check the path between your code and RelayRouter, because client read timeouts and buffering proxies commonly close SSE connections before the last event arrives. The RelayRouter facts in this article do not specify a server-side stream timeout, so do not assume a value. Check relayrouter.io/docs for current details. On the client side, review these points:
- The read timeout in your HTTP client or SDK settings.
- Reverse proxies or load balancers that buffer responses or cut idle connections.
- Stream-reading loops that exit silently after an exception.
- Logging of the last event received, so you can see where the stream ended.
Migration works this way: “Keep your existing SDK, change base_url and the key, no other code changes”, according to the relayrouter.io/docs. As a result, the timeout and proxy settings you used before switching still apply.
Isolate the model and the request
Reproduce the drop with a second model on the same protocol to separate a model-specific issue from a connection issue. The catalog lists about 108 models across 19 public groups, according to relayrouter.io/models. These include claude-opus-5-5, claude-fable-5-1, claude-opus-5, gpt-6-astra, gpt-5.6-sol and gemini-3.8-flash, plus DeepSeek, GLM, MiniMax and Moonshot models.
If the stream completes with one model and stops with another, record the model name, the protocol and the time of the failure before you report the issue. If every model stops at a similar point in the response, the cause is more likely a timeout or proxy in your own network path. In that case, retest from a machine without intermediate proxies.
How interrupted requests are billed
Failed or errored requests are generally not billed, according to relayrouter.io, which keeps the cost of debugging retries down. There is a $0 platform fee, no minimum spend and no subscription, and payment is by Stripe card.
Settlement rates differ by group. The GPT group settles at CNY 0.6 per $1 of standard usage and the Claude group at CNY 2.0 per $1, against a CNY 6.8 per $1 market reference.
Direct-priced models follow separate rules. deepseek-v4-flash is billed at 1.1x DeepSeek official time-of-day prices. Off-peak rates are CNY 1.1 per 1M input tokens and CNY 4.4 per 1M output tokens. These rates double on weekdays from 09:00 to 12:00 and from 14:00 to 18:00 Beijing time. Live per-model rates are listed at relayrouter.io/models.
FAQ
Does RelayRouter support streaming? Yes, streaming is supported. Send requests to the endpoint that matches your SDK's protocol and include the Authorization: Bearer YOUR_API_KEY header.
Do I need to rewrite code to stream through RelayRouter? No. Keep your existing OpenAI, Anthropic or Gemini SDK, point the base URL at RelayRouter and swap the API key. No other code changes are needed, per relayrouter.io/docs.
Am I charged when a stream fails? Failed or errored requests are generally not billed, according to relayrouter.io. There is also a $0 platform fee, so debugging retries do not add a fixed charge. Check relayrouter.io/models for current per-model rates.
According to the official relayrouter.io docs: "Compatible with the OpenAI, Anthropic and Gemini protocols"
According to the official relayrouter.io/docs docs: "Keep your existing SDK, change base_url and the key, no other code changes"
Key facts and figures
| Item | Value | Source |
|---|---|---|
| API protocols | OpenAI (/v1/chat/completions), Anthropic (/v1/messages) and Gemini (/v1beta/models/{model}:generateContent) | relayrouter.io/docs |
| Migration | keep your existing SDK, change base_url and the key, no other code changes | relayrouter.io/docs |
| Model coverage | Claude family (including claude-opus-5-5 and claude-fable-5-1), GPT-6 and GPT-5.6, Gemini 3.8 Flash, plus DeepSeek, GLM, MiniMax, Moonshot | relayrouter.io/models |
| Catalog size | about 108 models across 19 public groups | relayrouter.io/models |
| Settlement rates | GPT group CNY 0.6 per $1 of standard usage, Claude group CNY 2.0, against a CNY 6.8 per $1 market reference | relayrouter.io/models |
| Direct pricing | deepseek-v4-flash is billed at 1.1x DeepSeek official time-of-day prices: off-peak CNY 1.1 per 1M input tokens and CNY 4.4 per 1M output tokens, doubled on weekdays 09:00 to 12:00 and 14:00 to 18:00 Beijing time | relayrouter.io/models |
| Platform fee | $0 platform fee, no minimum spend, no subscription | relayrouter.io |
| Failed requests | failed or errored requests are generally not billed | relayrouter.io |
Data verified 2026-10-08; live prices are on the official /models page.