feat(perplexity-agent): sync models with current Agent API catalog#3194
feat(perplexity-agent): sync models with current Agent API catalog#3194w3nash wants to merge 3 commits into
Conversation
Action items
|
|
Verified all 7 against the Agent API Models docs. The The docs
The 7 flagged models publish explicit flat cache rates, which is exactly what's in the TOMLs:
The |
|
every single one supports max? Im surprised by that |
|
I checked the upstream docs, and no, not every model supports I've now matched each model to the effort values it actually supports. GPT-5.6, the new Claude models, and GLM-5.2 support all five; the others use smaller sets or no configurable effort. I also added the relevant sources to each model file. |
Summary
Updates the
perplexity-agentprovider to match the current Perplexity Agent API Models catalog. The provider was outdated: it listed models Perplexity no longer serves and was missing the current lineup.Final catalog: 33 models.
Changes
Removed (3) — no longer in the Agent API catalog:
google/gemini-2.5-flashgoogle/gemini-2.5-proxai/grok-4-1-fast-non-reasoningAdded (18) — each via
base_modelinheritance + local[cost](docs Agent API rates) + model-specific reasoning metadata where applicable:claude-opus-4-8,claude-sonnet-5gpt-5,gpt-5.4-mini,gpt-5.4-nano,gpt-5.6-sol,gpt-5.6-terra,gpt-5.6-lunagemini-3.1-flash-lite,gemini-3.1-flash-lite-preview,gemini-3.5-flashgrok-4.5,grok-4.3,grok-4.20-reasoning,grok-4.20-non-reasoning,grok-4.20-multi-agentperplexity/glm-5.2(base_modelzhipuai/glm-5.2)perplexity/kimi-k2.7-code(base_modelmoonshotai/kimi-k2.7-code)Pricing is taken from the Agent API Models page. The docs encode each model's
cachefield one of three ways (per the page'scacheEncodingnote), andcache_readis transcribed accordingly:glm-5.20.26,kimi-k2.7-code0.19,grok-4.50.50,grok-4.3/grok-4.20-*0.20)inputx0.1(90% off input) →cache_read = input × 0.1null→ nocache_readReasoning audit
The Agent API accepts
reasoning.effortvalueslow,medium,high,xhigh, andmax, but the global request schema does not establish that every routed model implements every value. The added models now use the intersection of Perplexity's request enum and each model's documented controls:low,medium,high,xhigh,maxanthropic/claude-opus-4-8,anthropic/claude-sonnet-5,openai/gpt-5.6-sol,openai/gpt-5.6-terra,openai/gpt-5.6-luna,perplexity/glm-5.2low,medium,high,xhighopenai/gpt-5.4-mini,openai/gpt-5.4-nano,xai/grok-4.20-multi-agentlow,medium,highopenai/gpt-5,google/gemini-3.1-flash-lite,google/gemini-3.1-flash-lite-preview,google/gemini-3.5-flash,xai/grok-4.3,xai/grok-4.5reasoning_options = []perplexity/kimi-k2.7-code,xai/grok-4.20-reasoningreasoning = false)xai/grok-4.20-non-reasoningNotes:
reasoning.effortselects 4 or 16 collaborating agents rather than reasoning depth; the request values are still represented as an effort option because that is the exposed API field.low/mediumtohighandxhightomaxinternally.Evidence
reasoning.effortrequest field and global enum.Docs verified on 2026-07-11.
Notes
perplexity/-prefixed IDs for GLM and Kimi match the Agent API model IDs a caller sends;base_modelpoints at the origin-provider metadata (zhipuai/glm-5.2,moonshotai/kimi-k2.7-code).deprecatedbecause they are absent from the current authoritative catalog.Verification
bun validateexits 0.git diff --checkexits 0.perplexity-agentoutput contains nobase_modelleakage.