Perplexity's model fields are inconsistent per model: Claude Sonnet 5 reports the real slug in user_selected_model with display_model "turbo", while GLM-5.2 reports the inverse. Pick whichever field is present and not "turbo", and fall back to the requested model when both are missing or "turbo".
Also add glm_5_2 to KNOWN_MODELS.
Refs #7 (follow-up comment)
Perplexity's /rest/models/config now exposes claude50sonnet and
claude50sonnetthinking. Add both to KNOWN_MODELS with the official
labels from the config.
The stream's display_model can report "turbo" even when the requested
model was honored, so prefer user_selected_model when present and not
"turbo" so tool metadata reflects the model actually used.
Closes#7
Co-authored-by: Ivan Pereira <183991+ivanrvpereira@users.noreply.github.com>
Hardcode is_incognito: true in the Perplexity request and remove the
toggle surface: the incognito tool parameter, PI_PERPLEXITY_INCOGNITO
env var, config file field, /perplexity-config prompt, and TUI status
indicators. Config and resolveDefaultModel are now model-only.
Supersedes the incognito portion of PR #4.
Co-authored-by: Ivan Pereira <183991+ivanrvpereira@users.noreply.github.com>
Run Perplexity search and auth requests through pi's Node runtime instead of
shelling out to Bun. Move development and CI commands to npm, add a Node test
build path, and keep OTP auth fail-fast when Set-Cookie headers are not
available.
mock.module() in index-execute.test.ts permanently poisons Bun's
module cache — mock.restore() does not undo it in Bun 1.3.11.
Use cache-busted dynamic imports (../src/mod.ts?t=${Date.now()}) in
beforeEach for the three affected test files so each test gets a
fresh, unpoisoned module instance.