fix: emit MCP progress notifications during deep research SSE (#110)#115
Open
Abhishek21g wants to merge 1 commit into
Open
fix: emit MCP progress notifications during deep research SSE (#110)#115Abhishek21g wants to merge 1 commit into
Abhishek21g wants to merge 1 commit into
Conversation
…xityai#110) Stream sonar-deep-research deltas to clients via notifications/progress when progressToken is present, with a 10s heartbeat during silent search.
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
Fixes #110 —
perplexity_researchno longer appears silent to MCP clients duringsonar-deep-researchSSE streaming.Problem
consumeSSEStream()buffered the full SSE response before returning. MCP clients with ~60–90stools/callcaps timed out even whenPERPLEXITY_TIMEOUT_MSwas higher.Fix
consumeSSEStream(response, onProgress?)invokes a callback per content deltaSSE_HEARTBEAT_MS)perplexity_researchemitsnotifications/progresswhenextra._meta.progressTokenis presentComplements (does not replace) the async start/poll approach in #111 for clients without progress support.
Verification
Manual: MCP client with progress token; run
perplexity_researchwithreasoning_effort: mediumon a prompt >90s.