Conversation
Contributor
|
@m-messer Do you plan to actively use this? |
Contributor
Author
|
@maximiliansoelch Of course, here is the shimmy PR on using SSE: lambda-feedback/shimmy#28 In particular, take a look at: https://github.com/lambda-feedback/shimmy/pull/28/changes#diff-1ee1003a66dcdc217b95324d29e9959e0795e3f021bb886f9b2bf26c149ef59e and the files in the I am happy to answer any questions you have on the implementation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Standardises an opt-in Server-Sent Events (SSE) progress-streaming response for
/evaluateand/chat, as proposed in #43.Previously the spec only documented
200 → application/json, whileChatCapabilities.supportsStreamingandLLMConfiguration.streamimplied streaming was in scope with no wire contract behind them. This defines that contract once, generically, so both endpoints stream identically and new endpoints get it for free.Contract:
Accept: text/event-stream. HTTP status stays200for the life of the stream, including failures.event:= stage name,data:=SseProgressStep), optional:keep-alive comments, and exactly one terminal frame.200body (event: completed) or anErrorResponseundererror(event: failed), plus asteps[]replay of every progress step.X-Request-Id/X-Api-Versionare sent once as response headers at stream open.configuration.llm.stream(token-level LLM streaming) is now explicitly documented as distinct from API-layer progress streaming.Key schema additions (shared, reused by both operations):
SseProgressStepstageis an informative string, not an enumSseTerminalStepssteps[]replay fragmentStreamingCapabilitiessupportsStreaming+supportedProgressStages, composed viaallOfintoChatCapabilitiesandEvaluateCapabilitiesSseEvaluateTerminalFrame/SseChatTerminalFramedata, reusing each operation's existing200bodyEvaluateResponse/evaluate200body extracted into a named schema so the terminal frame can reuse itChatCapabilities.supportsStreamingmoves into the shared fragment;EvaluateCapabilitiesgains streaming advertisement for the first time. Both/healthexamples now showsupportsStreaming+supportedProgressStages.Related issue
Closes #43
Scope
mainbranch, or from a fork if direct branch creation is not available.Validation
npm run lint— valid, no new warnings (8 pre-existing warnings unchanged)npm run bundle— succeeds; all new components resolveNotes for reviewers
text/event-streamcontent, new optional capability fields, description edits. The one refactor is/evaluate's200body moving from an inline array to the namedEvaluateResponsecomponent (semantically identical).SseChatTerminalFrame.outputusesanyOf: [Message, "null"]rather than the repo's usualtype: [object, "null"] + allOf: [$ref]idiom, because thefailed-frame example setsoutput: nulland must validate. Theerrorfields keep the existing repo idiom (no null example exercises them).shimmyreference implementation needs a matching PR — terminal-frame field names,/healthcapability output, its embedded spec copy, and stream tests.🤖 Generated with Claude Code