Skip to content

fix: emit MCP progress for perplexity_reason SSE (follow-up to #115)#116

Open
Abhishek21g wants to merge 2 commits into
perplexityai:mainfrom
Abhishek21g:fix/mcp-reason-progress
Open

fix: emit MCP progress for perplexity_reason SSE (follow-up to #115)#116
Abhishek21g wants to merge 2 commits into
perplexityai:mainfrom
Abhishek21g:fix/mcp-reason-progress

Conversation

@Abhishek21g

Copy link
Copy Markdown

Summary

Follow-up to #115 — extends the SSE onProgress hook to perplexity_reason (sonar-reasoning-pro) so MCP clients with _meta.progressToken receive notifications/progress during long reasoning streams, not just perplexity_research.

Also parameterizes the progress message label (Deep research vs Reasoning vs default Streaming response).

Problem

perplexity_reason called performChatCompletion() without an onProgress callback, so progress-aware MCP clients still saw silent tools/call periods on long reasoning runs.

Fix

  • createMcpProgressReporter(extra, label?) — optional label for tool-specific messages
  • perplexity_reason handler threads onProgress through performChatCompletion
  • Vitest: custom label test (+96 tests pass)

Verification

npm test

Relationship to other work

Fixes no new issue; extends #110 progress story to the reason tool.

…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.
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.

1 participant