Skip to content

fix(perplexity-web): mode "search" is downgraded to CONCISE and fails the whole catalog; point pplx-opus at Opus 5 - #8634

Closed
danscMax wants to merge 2 commits into
cheaper-inference:release/v3.8.50from
danscMax:fix/pplx-web-mode
Closed

danscMax wants to merge 2 commits into
cheaper-inference:release/v3.8.50from
danscMax:fix/pplx-web-mode

Conversation

@danscMax

@danscMax danscMax commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

Rebased onto current main (3.8.49) and reduced to two commits. The original PR predates the perplexity-web rework, so the old diff is gone — please re-review, the substance changed.

1. mode: "search" is broken — it takes the whole catalog down

3.8.49 posts mode: "search" for every catalog model. Perplexity no longer treats that as Pro Search: it downgrades the turn to CONCISE, discards model_preference, and ends the stream with status: "FAILED" and the text "Error in processing query."

Captured against the live endpoint, paid account (subscription_tier: "max", payment_tier: "paid", pro_search_mode: "pro"), same cookie, same query, only mode differs:

// mode:"search" + claude50sonnet
{"text": "Error in processing query.", "mode": "CONCISE", "status": "FAILED",
 "_extras": {"pro_search_mode": "pro", "subscription_tier": "max", "payment_tier": "paid"}}

// mode:"copilot" + claude50sonnet   (same account, same second)
{"mode": "COPILOT", "display_model": "claude50sonnet", "user_selected_model": "claude50sonnet",
 "message_mode": "STREAMING", "status": "PENDING"}   // …then a normal answer stream

// mode:"search" + claude50opus
{"text": "Error in processing query.", "mode": "CONCISE", "status": "FAILED"}

// mode:"copilot" + claude50opus
{"mode": "COPILOT", "display_model": "claude50opus", "status": "PENDING"}   // …streams

pplx-auto and pplx-sonar were already on "copilot" and keep working, which makes this easy to miss in a smoke test — the two models most people try first are exactly the two that are fine, while Sonnet/Opus/Gemini/GLM/Kimi/Grok/GPT-5.6 all fail.

The executor's THINKING_MAP branch hardcoded "search" as well, so thinking variants failed the same way.

This PR moves every MODEL_MAP entry and the thinking branch to "copilot" and adds a guard test, so a future entry cannot reintroduce "search" unnoticed.

2. pplx-opus points at the previous Opus generation

claude48opus / claude48opusthinking are still accepted by the backend, so there is no error — the model just answers from the older generation while the dashboard advertises it as Opus. Perplexity's catalog exposes claude50opus; with mode:"copilot" it comes back as "display_model": "claude50opus" (see the capture above). Updated MODEL_MAP, THINKING_MAP and the catalog label (which read "Claude Opus 4.8").

3. The built-in-search hint is now opt-in

The sentence "You have built-in web search. Answer questions directly using search results." was appended to every system message. Perplexity's answer engine searches anyway, and for coding clients it leaks into replies as meta-commentary ("I need to search before responding per my instructions"). Now behind OMNIROUTE_PPLX_SEARCH_HINT (off by default, documented in .env.example and docs/reference/ENVIRONMENT.md). Happy to drop this commit if you would rather keep the old behaviour — items 1 and 2 stand on their own.

Tested

  • tests/unit/perplexity-web.test.ts — 34/34, including three new cases (Opus mapping, the mode guard, the hint flag in both states).
  • Live, through a running 3.8.49 build with this branch applied: pplx-auto, pplx-sonar, pplx-sonnet, pplx-opus all answer; server log shows pref=claude50opus, mode=copilot. Before the fix, the same build returned "Error in processing query." for pplx-sonnet and pplx-opus.

@danscMax
danscMax requested a review from diegosouzapw as a code owner July 26, 2026 05:39
@danscMax

Copy link
Copy Markdown
Contributor Author

Pushed a second, separately-scoped commit (c9d2eb2): pplx-opus was still pinned to the previous Claude generation while Perplexity's own model picker now offers Claude Opus 5.

Probed against a Max session — both identifiers are accepted and echoed back as display_model:

model_preference display_model response
claude50opus claude50opus 219 KB
claude50opusthinking claude50opusthinking 43 KB
claude48opus (previous) claude48opus 44 KB
claude5opus — rejected

Updates MODEL_MAP, THINKING_MAP and the catalog label (the dashboard advertised "Claude Opus 4.8"). End-to-end through a running instance: perplexity-web/pplx-opus returns 200 with reasoning_content, in 4.7 s against 24 s on the previous generation.

Happy to split this into its own PR if you'd rather keep the mode fix isolated.

@diegosouzapw
diegosouzapw changed the base branch from main to release/v3.8.49 July 26, 2026 23:15
@diegosouzapw diegosouzapw added the deferred-v3.8.50 Adiada para o ciclo v3.8.50 (validacao VPS, refactor, ou escopo grande) label Jul 28, 2026
@diegosouzapw diegosouzapw changed the title fix(perplexity-web): stop routing every model through the rejected search mode [v3.8.50] fix(perplexity-web): stop routing every model through the rejected search mode Jul 28, 2026
@diegosouzapw

Copy link
Copy Markdown
Collaborator

Heads-up: this PR is running against a stale base

release/v3.8.49 has moved 116 commits ahead of the base this PR was last built against, and several gate failures that were red on the older base have since been repaired on the branch itself:

Gate class Repaired by
No new ESLint warnings (exit 2 — orphaned suppressions, not a lint violation) #8706, #8831
Fast Quality Gates / check:file-size / Quality Ratchet #8585, #8767, plus the post-merge-train re-pins
Docs Gates (fast-path) (missing Polish API_REFERENCE) #8831
backoff-clamp + compressionDetailNormalizers unit tests #8706

I verified this on a clean checkout of the current tip (3b515d90b3): lint:json --max-warnings 0, check:file-size, check:docs-sync, error-classification.test.ts (24/24) and check-db-rules.test.ts (22/22) all pass with no changes.

Currently failing here:

  • Lint
  • Quality Gates (Extended)
  • Quality Ratchet
  • dast-smoke

Please update the branch (the Update branch button, or rebase onto origin/release/v3.8.49) and let CI re-run. That should clear any failure caused by the stale base.

Note this is not a promise that every red disappears — a failure specific to the changes in this PR will survive the rebase, and Build (advisory) is advisory and does not block. Rebasing just removes the noise so what is left is actually yours.

No action was taken on this PR beyond this comment.

@diegosouzapw
diegosouzapw changed the base branch from release/v3.8.49 to release/v3.8.50 July 28, 2026 18:41
@diegosouzapw

Copy link
Copy Markdown
Collaborator

Re-homed to release/v3.8.50: v3.8.49 entered its release freeze, so the branch now belongs to the release captain and development continues on the next cycle. Nothing is wrong with this PR — it just needed a live base. No action needed from you; CI will re-run against the new base.

… opt-in

Two small follow-ups on top of the reworked perplexity-web executor in 3.8.49.

pplx-opus still resolved to `claude48opus` / `claude48opusthinking`. Perplexity's
catalog has moved Opus to 5.0; the old preference is still accepted, so the model
answered from the previous generation without any error to hint at it. Updates
MODEL_MAP, THINKING_MAP and the catalog label, which advertised "Claude Opus 4.8"
in the dashboard.

The built-in-search hint appended to every system message is now opt-in via
OMNIROUTE_PPLX_SEARCH_HINT. Perplexity's answer engine is search-first anyway, and
for coding clients the sentence leaks into replies as meta-commentary ("I need to
search before responding per my instructions").

Tested: tests/unit/perplexity-web.test.ts (33/33), incl. two new cases covering the
Opus mapping and the hint flag in both states.
@danscMax
danscMax force-pushed the fix/pplx-web-mode branch from a8cfdd1 to 8c33e26 Compare July 30, 2026 14:31
@danscMax danscMax changed the title [v3.8.50] fix(perplexity-web): stop routing every model through the rejected search mode fix(perplexity-web): mode "search" is downgraded to CONCISE and fails the whole catalog; point pplx-opus at Opus 5 Jul 30, 2026
…des it to CONCISE

Every catalog model (Sonnet, Opus, Gemini, GLM, Kimi, Grok, GPT-5.6) currently fails
with "Error in processing query." Perplexity no longer treats mode:"search" as Pro
Search: it downgrades the turn to CONCISE, drops model_preference and finishes the
stream with status:"FAILED". Only mode:"copilot" still honours a model choice.

Captured from the live endpoint on a paid account (subscription_tier:"max",
payment_tier:"paid"), same query, same cookie, only the mode differs:

  mode:"search"  + claude50sonnet -> {"text":"Error in processing query.",
                                      "mode":"CONCISE","status":"FAILED"}
  mode:"copilot" + claude50sonnet -> {"mode":"COPILOT",
                                      "display_model":"claude50sonnet"} + stream
  mode:"search"  + claude50opus   -> {"mode":"CONCISE","status":"FAILED"}
  mode:"copilot" + claude50opus   -> {"mode":"COPILOT",
                                      "display_model":"claude50opus"} + stream

pplx-auto/pplx-sonar were already on "copilot" and kept working, which is why this
is easy to miss. The THINKING_MAP branch in the executor hardcoded "search" too, so
thinking variants failed the same way.

Adds a guard test so no future entry can reintroduce "search".

Tested: tests/unit/perplexity-web.test.ts (34/34) + live requests through the
running server for pplx-auto, pplx-sonar, pplx-sonnet and pplx-opus.
@danscMax
danscMax force-pushed the fix/pplx-web-mode branch from 8c33e26 to eb1cbc8 Compare July 30, 2026 14:48
@diegosouzapw diegosouzapw added merge-train-deferred PR ejetada do merge-train — triagem separada and removed merge-train-deferred PR ejetada do merge-train — triagem separada deferred-v3.8.50 Adiada para o ciclo v3.8.50 (validacao VPS, refactor, ou escopo grande) labels Aug 17, 2026
diegosouzapw added a commit that referenced this pull request Aug 20, 2026
Merged — extraction of the one still-uncovered fix from #8634 (the other two items — mode "search"→CONCISE downgrade, pplx-opus generation — were already applied on this release tip). typecheck/file-size/changelog/complexity/cognitive-complexity gates all clean, 32/32 tests passing.
@diegosouzapw

Copy link
Copy Markdown
Collaborator

Thanks — great root-causing here, with live-endpoint evidence that made this easy to verify. Auditing against the current release tip:

  1. mode: "search" downgrade — already fixed. open-sse/executors/perplexity-web/protocol.ts already posts "copilot" throughout MODEL_MAP/THINKING_MAP, matching item 1's description exactly (down to the same live-capture evidence pattern).
  2. pplx-opus generation — already fixed. MODEL_MAP["pplx-opus"] already resolves to claude50opus, and the catalog label already reads "Claude Opus 5.0".
  3. Search-hint opt-in — genuinely still missing. Extracted this one into a clean PR: fix(perplexity-web): make the built-in-search hint opt-in #10904 (merged, with Co-authored-by: dansc <dansc@yandex.ru>).

Given this branch was a month old and CONFLICTING against the current release, I extracted just the uncovered fix rather than trying to reconcile the whole diff. Closing as superseded by #10904 for the remaining value — full credit is there.

muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…ference#10904)

Merged — extraction of the one still-uncovered fix from cheaper-inference#8634 (the other two items — mode "search"→CONCISE downgrade, pplx-opus generation — were already applied on this release tip). typecheck/file-size/changelog/complexity/cognitive-complexity gates all clean, 32/32 tests passing.
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.

2 participants