fix: emit MCP progress for perplexity_reason SSE (follow-up to #115)#116
Open
Abhishek21g wants to merge 2 commits into
Open
fix: emit MCP progress for perplexity_reason SSE (follow-up to #115)#116Abhishek21g wants to merge 2 commits into
Abhishek21g wants to merge 2 commits 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.
Extend the perplexityai#115 progress reporter to perplexity_reason and parameterize the progress label for tool-specific messages.
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
Follow-up to #115 — extends the SSE
onProgresshook toperplexity_reason(sonar-reasoning-pro) so MCP clients with_meta.progressTokenreceivenotifications/progressduring long reasoning streams, not justperplexity_research.Also parameterizes the progress message label (
Deep researchvsReasoningvs defaultStreaming response).Problem
perplexity_reasoncalledperformChatCompletion()without anonProgresscallback, so progress-aware MCP clients still saw silenttools/callperiods on long reasoning runs.Fix
createMcpProgressReporter(extra, label?)— optional label for tool-specific messagesperplexity_reasonhandler threadsonProgressthroughperformChatCompletionVerification
npm testRelationship to other work
progressTokenFixes no new issue; extends #110 progress story to the reason tool.