Skip to content

docs: document resumable SSE streams and automatic reconnection#6079

Merged
Swimburger merged 1 commit into
mainfrom
devin/1783235733-sse-resumable-docs
Jul 5, 2026
Merged

docs: document resumable SSE streams and automatic reconnection#6079
Swimburger merged 1 commit into
mainfrom
devin/1783235733-sse-resumable-docs

Conversation

@Swimburger

Copy link
Copy Markdown
Member

Summary

The resumable flag on SSE endpoints (and the SDK auto-reconnection it enables) shipped across TypeScript, Python, Go, and C#, but nothing on the specs side or in the SDK deep-dives documented it. This adds that coverage.

Specs side — documents the resumable field on both API-definition formats:

  • OpenAPI SSE page: new "Resumable streams" section covering x-fern-streaming.resumable: true, its interaction with terminator, and document-level vs. operation-level inheritance/override.
  • Fern Definition SSE page: new "Resumable streams" section covering response-stream.resumable: true.

Generators side — the sse-metadata deep-dive previously described only manual stream resumption. Adds an "Automatic reconnection" section documenting the opt-in behavior (reconnect with Last-Event-ID, honor server retry: with a 1s default / 30s cap, 5-attempt consecutive cap with reset-on-progress) and the per-SDK request options:

SDK Toggle Attempt cap
TypeScript stream.reconnectionEnabled stream.maxReconnectionAttempts
Python stream_reconnection_enabled max_stream_reconnection_attempts
Go option.WithoutStreamReconnection() option.WithMaxStreamReconnectAttempts(n)
C# DisableStreamReconnection MaxStreamReconnectAttempts

Cross-references — the SDK capabilities SSE bullet now links to the automatic-reconnection section; the spec pages and deep-dive link to each other.

Vale passes with no new alerts (the remaining suggestions are pre-existing simply/easily hedges on untouched lines).

Follow-up (not in this PR)

x-fern-discriminator-context (used for protocol- vs. data-level SSE union discrimination) is a supported extension that appears undocumented. Left out here since it's a separate, non-reconnection concern — happy to document it in a follow-up if wanted.

Link to Devin session: https://app.devin.ai/sessions/e8bc7dce89d141feadc89b5f948721aa
Requested by: @Swimburger

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@Swimburger Swimburger requested a review from devalog as a code owner July 5, 2026 07:16
@Swimburger Swimburger self-assigned this Jul 5, 2026
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

@Swimburger Swimburger merged commit a7d27a2 into main Jul 5, 2026
5 checks passed
@Swimburger Swimburger deleted the devin/1783235733-sse-resumable-docs branch July 5, 2026 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants