Files
OmniRoute/changelog.d/fixes/6955-perplexity-web-empty-content.md
NOXX - Commiter 4007149183 fix(perplexity-web): stop empty-content responses from live schematized SSE (#6955)
* fix(perplexity-web): stop empty-content responses from live schematized SSE

Align the request payload and stream parser with the current www.perplexity.ai
browser capture so non-streaming pplx-web calls no longer return
"Provider returned empty content".

- Map pplx-sonar → copilot/turbo (live browser default; experimental was empty)
- Advertise workflow_widgets/navigation_results + supports_tool_approval_modal
- Use event: end_of_stream as the TLS stream EOF (not OpenAI [DONE])
- Recover answers from COMPLETED FINAL double-encoded text step-blobs
- Prefer the longest dual ask_text / ask_text_N_markdown track
- Promote buffered SSE text to a ReadableStream when looksLikeSse false-negatives

Regression: 31/31 perplexity-web unit tests pass.

* fix(sse): satisfy no-explicit-any budget in perplexity-web test additions

Two new assertions in the pre-merge sweep used `as any` beyond the file's
frozen eslint-suppressions allowance (11); replace them with narrow local
result-shape casts so the file stays within the existing budget.

Co-authored-by: Diego Rodrigues de Sa e Souza <diegosouzapw@users.noreply.github.com>

* test(perplexity-web): replace any with derived types + rebaseline test-file-size

Fixes the ~13 @typescript-eslint/no-explicit-any promised in review but never
pushed: real interfaces (PplxChatCompletionJson/PplxErrorJson) replace the
`as any` json casts, fetch cast uses `typeof fetch`. Removes the now-stale
perplexity-web.test.ts entry from eslint-suppressions.json (0 errors, no
suppressions). Rebaselines the frozen test-file-size (999 -> 1200) to reflect
the PR's own legitimate test growth after merging release/v3.8.49.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>

---------

Co-authored-by: Diego Rodrigues de Sa e Souza <diegosouza.pw@gmail.com>
Co-authored-by: Diego Rodrigues de Sa e Souza <diegosouzapw@users.noreply.github.com>
Co-authored-by: artickc <artickc@users.noreply.github.com>
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
2026-07-19 20:52:31 -03:00

544 B

  • fix(sse): perplexity-web's default pplx-auto/pplx-sonar targets now post mode: "copilot" (with pplx-sonar mapped to model_preference: "turbo" instead of experimental), match Perplexity's event: end_of_stream SSE terminator instead of OpenAI's [DONE], and fall back to the COMPLETED frame's double-encoded FINAL step-blob when no diff_block/markdown_block streamed — fixing [perplexity-web/pplx-sonar] Provider returned empty content against the current schematized www.perplexity.ai SSE API. (thanks @artickc)