Model Registry
The ModelRegistry provides programmatic access to the bundled model catalog, including availability metadata.
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:
|
identifier_by_tier |
Optional identifier overrides selected by account tier.
TYPE:
|
tool_name |
MCP tool name used when registering this model as an MCP tool.
TYPE:
|
provider |
Provider slug used for catalog grouping.
TYPE:
|
is_official |
Whether Perplexity currently lists the model in its official WebUI.
TYPE:
|
min_tier |
Minimum Perplexity subscription, or
TYPE:
|
mode |
API request mode sent in the payload (e.g.
TYPE:
|
mode_by_tier |
Optional mode overrides selected by account tier.
TYPE:
|
status |
Observed availability state. Unknown models require explicit risk acknowledgement and are the default until a live test is recorded.
TYPE:
|
last_tested_at |
UTC timestamp of the test that supports the current
status, or
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
Methods:
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 |
Source code in src/perplexity_webui_scraper/models/registry.py
list_all
list_all() -> list[Model]
Return all registered :class:Model instances in definition order.
| RETURNS | DESCRIPTION |
|---|---|
list[Model]
|
List of all models loaded from |
resolve_for_use
resolve_for_use(
model_id: str,
*,
allow_risky_model: bool = False,
custom_model_mode: ModelMode = "copilot",
) -> Model
Resolve a model and enforce explicit acknowledgement of risky states.