Skip to content

fix: update Perplexity types and remove deprecated models#2007

Open
KushalLukhi wants to merge 1 commit intomckaywrigley:mainfrom
KushalLukhi:fix/remove-deprecated-perplexity-types
Open

fix: update Perplexity types and remove deprecated models#2007
KushalLukhi wants to merge 1 commit intomckaywrigley:mainfrom
KushalLukhi:fix/remove-deprecated-perplexity-types

Conversation

@KushalLukhi
Copy link
Copy Markdown

Problem

The Perplexity model types in types/llms.ts and lib/chat-setting-limits.ts still reference deprecated models that are no longer available in the Perplexity API. This causes type errors and confusion for users trying to use the current Perplexity models.

Solution

Updated the Perplexity type definitions to match the current API model cards at https://docs.perplexity.ai/guides/model-cards

Changes

  • types/llms.ts: Removed deprecated model types, added new Sonar model types
  • lib/chat-setting-limits.ts: Updated chat settings for new Perplexity models
  • lib/models/llm/perplexity-llm-list.ts: Already updated in PR fix: update Perplexity models to match current API #2005, now types are aligned

Removed deprecated types:

  • pplx-7b-online, pplx-70b-online
  • pplx-7b-chat, pplx-70b-chat
  • mixtral-8x7b-instruct, mistral-7b-instruct
  • llama-2-70b-chat
  • codellama-34b-instruct, codellama-70b-instruct
  • sonar-small-chat, sonar-small-online
  • sonar-medium-chat, sonar-medium-online

Added new types:

  • sonar-reasoning-pro - Advanced search with Chain of Thought reasoning
  • sonar-reasoning - Cost-effective reasoning model
  • sonar-pro - Advanced search for complex queries
  • sonar - Lightweight model for simple tasks
  • sonar-deep-research - Expert-level research model

Testing

  • TypeScript compilation passes
  • Model types align with current Perplexity API
  • No breaking changes for users already on new Sonar models

Related to #1836 (Perplexity model updates)

- Remove deprecated Perplexity model types (pplx-*, mixtral-8x7b-instruct,
  mistral-7b-instruct, llama-2-70b-chat, codellama-*-instruct, sonar-small-*,
  sonar-medium-*)
- Add new Sonar model types (sonar-reasoning-pro, sonar-reasoning, sonar-pro,
  sonar, sonar-deep-research)
- Update chat setting limits for new Perplexity models
- Update Perplexity LLM list with current models and pricing
- Align types/llms.ts with current Perplexity API model cards

Fixes stale type definitions that referenced models no longer available
in the Perplexity API.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant