Model Registry
The ModelRegistry provides programmatic access to all available Perplexity AI models.
Model
perplexity_webui_scraper.models.types.Model
Bases: BaseModel
Immutable metadata for a single Perplexity AI model.
| ATTRIBUTE | DESCRIPTION |
|---|---|
id |
Canonical string key used to select this model
(e.g.
TYPE:
|
name |
Human-readable display name shown in the UI.
TYPE:
|
description |
Short description of the model's characteristics.
TYPE:
|
identifier |
Internal Perplexity model identifier sent in the API payload.
TYPE:
|
tool_name |
MCP tool name used when registering this model as an MCP tool.
TYPE:
|
min_tier |
Minimum Perplexity subscription required:
TYPE:
|
mode |
API request mode sent in the payload (e.g.
TYPE:
|
ModelRegistry
perplexity_webui_scraper.models.registry.ModelRegistry
Registry of all available Perplexity AI models.
The registry is populated at instantiation time by reading models.json
from the _static package directory via importlib.resources. The
singleton MODELS instance is created at module import time.
Usage::
from perplexity_webui_scraper.models import MODELS
model = MODELS.resolve("perplexity/best")
all_models = MODELS.list_all()
Load models from the bundled models.json static asset.
Source code in src/perplexity_webui_scraper/models/registry.py
Functions
resolve
resolve(model_id: str) -> Model
Look up a model by its canonical string ID.
| PARAMETER | DESCRIPTION |
|---|---|
model_id
|
The model identifier, e.g.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Model
|
The matching :class: |
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If |