Skip to content

fix: emit MCP progress notifications during deep research SSE (#110)#115

Open
Abhishek21g wants to merge 1 commit into
perplexityai:mainfrom
Abhishek21g:fix/mcp-research-progress
Open

fix: emit MCP progress notifications during deep research SSE (#110)#115
Abhishek21g wants to merge 1 commit into
perplexityai:mainfrom
Abhishek21g:fix/mcp-research-progress

Conversation

@Abhishek21g

Copy link
Copy Markdown

Summary

Fixes #110perplexity_research no longer appears silent to MCP clients during sonar-deep-research SSE streaming.

Problem

consumeSSEStream() buffered the full SSE response before returning. MCP clients with ~60–90s tools/call caps timed out even when PERPLEXITY_TIMEOUT_MS was higher.

Fix

  • consumeSSEStream(response, onProgress?) invokes a callback per content delta
  • 10s heartbeat during silent search/reasoning phases (SSE_HEARTBEAT_MS)
  • perplexity_research emits notifications/progress when extra._meta.progressToken is present

Complements (does not replace) the async start/poll approach in #111 for clients without progress support.

Verification

npm ci && npm run build && npm test

Manual: MCP client with progress token; run perplexity_research with reasoning_effort: medium on a prompt >90s.

…xityai#110)

Stream sonar-deep-research deltas to clients via notifications/progress
when progressToken is present, with a 10s heartbeat during silent search.
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.

perplexity_research times out in MCP clients — server buffers full SSE stream, never emits notifications/progress

1 participant