| name | perplexity-upgrade-migration |
| description | Migrate between Perplexity model generations and API parameter changes.
Use when upgrading to new Sonar models, handling deprecated parameters,
or migrating from legacy pplx-api models.
Trigger with phrases like "upgrade perplexity", "perplexity migration",
"perplexity model change", "update perplexity", "perplexity deprecated".
|
| allowed-tools | Read, Write, Edit, Bash(npm:*), Bash(git:*) |
| version | 1.12.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","perplexity","api","migration"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Perplexity Upgrade & Migration
Current State
!npm list openai 2>/dev/null | grep openai || echo 'openai not installed'
!pip show openai 2>/dev/null | grep Version || echo 'N/A'
Overview
Guide for migrating between Perplexity model generations and API changes. Perplexity has evolved from pplx-api with third-party models to the Sonar family with built-in web search.
Model Evolution
| Era | Models | Status |
|---|
| Legacy (pre-2025) | pplx-7b-online, pplx-70b-online, llama-3.1-sonar-* | Deprecated |
| Current (2025) | sonar, sonar-pro | Active |
| Extended (2025+) | sonar-reasoning-pro, sonar-deep-research | Active |
Instructions
Step 1: Identify Legacy Patterns to Update
set -euo pipefail
grep -rn "pplx-7b\|pplx-70b\|llama.*sonar\|sonar-small\|sonar-medium\|sonar-huge" \
--include="*.ts" --include="*.py" --include="*.js" --include="*.json" \
. 2>/dev/null || echo "No legacy models found"
grep -rn "api.perplexity.com\|pplx.readme.io" \
--include="*.ts" --include="*.py" --include="*.js" \
. 2>/dev/null || echo "No legacy URLs found"
Step 2: Model Name Migration Map
const MODEL_MIGRATION: Record<string, > = {
: ,
: ,
: ,
: ,
: ,
: ,
: ,
: ,
: ,
: ,
: ,
: ,
: ,
};
(): {
migrated = [model];
(!migrated) {
.();
;
}
(migrated !== model) {
.();
}
migrated;
}