feat(websocket): accept official response.steer events - #5775
Open
songlairui wants to merge 1 commit into
Open
songlairui wants to merge 1 commit into
songlairui wants to merge 1 commit into
Conversation
CLIProxyAPI's Responses WS whitelist dropped mid-turn steer before upstream could see it. Forward the official three-field payload and keep HTTP fallback as steering_not_supported. Co-authored-by: Cursor <cursoragent@cursor.com>
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
/v1/responsesWebSocket previously treatedresponse.steeras an unknown type and returnedunsupported websocket request type: response.steer, so official mid-turn steering never reached Codex/xAI.type,previous_response_id,input) without injectingstreamormodel, and leave the lastresponse.createsnapshot unchanged.response.create. HTTP fallback cannot mid-turn-steer and returnssteering_not_supported.Test plan
go test ./sdk/api/handlers/openai/ -run 'TestNormalizeResponsesWebsocketRequestSteer|TestNormalizeResponsesWebsocketPassthroughRequestSteer|TestNormalizeResponsesWebsocketRequestSteerRejectsEmptyInput|TestNormalizeResponsesWebsocketRequestStillRejectsUnknownType|TestResponsesWebsocketRequestRequiresCurrentUpstream|TestNormalizeResponsesWebsocketRequestCreate'go test ./internal/runtime/executor/ -run 'TestBuildCodexWebsocketRequestBodyPreserves|TestBuildXAIWebsocketRequestBodyPreservesSteer|TestBuildXAIWebsocketRequestBodySetsStore'response.steerafterresponse.createand confirm it is forwarded instead of rejected as an unknown typesteering_not_supportedresponse.cancelare still rejectedMade with Cursor