update-models-perplexity

update-models-perplexity is a command for Claude Code from enricoros/big-AGI. It costs 11 tokens per session (616 once invoked), scanned A, original, MIT.

A model-maintenance command for Perplexity, an online AI search and answer service. It updates the code file that defines which Perplexity models are available, along with their prices and capabilities.

In plain words
What is it for?
Use it when Perplexity changes its served models, pricing, context lengths, request format, or image and file input support.
Why use it?
It reduces the risk that the application uses outdated model names, pricing, context limits, or input-support information. The command also points to the service’s documentation as its source.

Command for Claude Code

About the project

Big-AGI is an open-source workspace for using multiple AI models through chat and other AI functions. It is intended for engineers, founders, researchers, and other users who want to work with AI personas, model comparisons, image generation, voice, documents, and code-related features. The catalogue entries provide commands, instructions, and a skill for working with Big-AGI.

enricoros/big-AGI · 7,109 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/enricoros/big-agi/update-models-perplexity
Clone the repo
git clone --depth 1 https://github.com/enricoros/big-AGI

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for update-models-perplexity

README.md
[![agentmods](https://agentmods.dev/badge/commands/enricoros/big-agi/update-models-perplexity.svg)](https://agentmods.dev/commands/enricoros/big-agi/update-models-perplexity)
Your own site
<a href="https://agentmods.dev/commands/enricoros/big-agi/update-models-perplexity"><img src="https://agentmods.dev/badge/commands/enricoros/big-agi/update-models-perplexity.svg" alt="Measured on agentmods" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 616 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00011 $0.00616
Opus 5 $0.00005 $0.00308
Sonnet 5 $0.00002 $0.00123
Haiku 4.5 $0.00001 $0.00062

Measured 5d ago against content hash 067bffd71c60, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

update-models-perplexity scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/llms/update-models-perplexity.md · 28 lines

What it actually says

Update src/modules/llms/server/openai/models/perplexity.models.ts with latest model definitions.

Reference src/modules/llms/server/llm.server.types.ts and src/modules/llms/server/models.mappings.ts for context only. Focus on the model file, do not descend into other code.

Primary Sources: (append .md to any docs URL for raw markdown - the HTML is MDX-heavy)

Note: https://docs.perplexity.ai/getting-started/models is now marketing-only (no ids, no context windows).

Fallbacks if blocked: Search "perplexity api latest pricing", "perplexity latest models", or search GitHub for latest model prices and context windows

Live endpoint (extra signal): The Sonar API has no list-models endpoint, but if .env.api-keys has PERPLEXITY_API_KEY a minimal /chat/completions probe against a candidate id confirms it's served (docs now name the path POST /v1/sonar; /chat/completions, the path big-AGI calls, is an alias with the identical schema) (max_tokens must be >= 16; retired ids 400 with an explicit "deprecated"/"Invalid model" message). Never commit or echo the key.

Not this vendor: the Agent API (/v1/agent, resells Anthropic/OpenAI/Google/xAI) and the Gateway (https://api.perplexity.ai/router/v1, incl. GET /router/v1/models, open-weight models hosted by Perplexity) are separate Perplexity products - out of scope for this file. Since July 2026 every Sonar docs page carries a banner steering to the Agent API; the four Sonar ids are still served and still in scope.

Important:

  • Review the full model list for additions, removals, and price changes
  • Minimize whitespace/comment changes, focus on content
  • Preserve comments to make diffs easy to review
  • Flag broken links or unexpected content
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 28 lines · 11 tokens per session scan A 067bffd71c60

Subscribe to this mod's changes

update-models-perplexity is a command published in the GitHub repository enricoros/big-AGI (7,109 stars, last pushed yesterday), licensed MIT. It adds 11 tokens to every session and 616 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.