Skip to content

Commit c99908d

Browse files
authoredFeb 18, 2025··
💄 style: improve perplexity models (#6307)
* update perplexity models * defaultShowBrowserRequest for openai * revert
1 parent 47d27a3 commit c99908d

File tree

21 files changed

+89
-234
lines changed

21 files changed

+89
-234
lines changed
 

‎locales/ar/models.json

+3
Original file line numberDiff line numberDiff line change
@@ -1577,6 +1577,9 @@
15771577
"sonar-reasoning": {
15781578
"description": "منتج API الجديد المدعوم من نموذج الاستدلال من DeepSeek."
15791579
},
1580+
"sonar-reasoning-pro": {
1581+
"description": "منتج API جديد مدعوم من نموذج الاستدلال DeepSeek."
1582+
},
15801583
"step-1-128k": {
15811584
"description": "يوفر توازنًا بين الأداء والتكلفة، مناسب لمجموعة متنوعة من السيناريوهات."
15821585
},

‎locales/bg-BG/models.json

+3
Original file line numberDiff line numberDiff line change
@@ -1577,6 +1577,9 @@
15771577
"sonar-reasoning": {
15781578
"description": "Нови API продукти, поддържани от модела за разсъждение на DeepSeek."
15791579
},
1580+
"sonar-reasoning-pro": {
1581+
"description": "Нов API продукт, поддържан от модела за разсъждение DeepSeek."
1582+
},
15801583
"step-1-128k": {
15811584
"description": "Баланс между производителност и разходи, подходящ за общи сценарии."
15821585
},

‎locales/de-DE/models.json

+3
Original file line numberDiff line numberDiff line change
@@ -1577,6 +1577,9 @@
15771577
"sonar-reasoning": {
15781578
"description": "Ein neues API-Produkt, das von DeepSeek-Inferenzmodellen unterstützt wird."
15791579
},
1580+
"sonar-reasoning-pro": {
1581+
"description": "Ein neues API-Produkt, das von dem DeepSeek-Inferenzmodell unterstützt wird."
1582+
},
15801583
"step-1-128k": {
15811584
"description": "Bietet ein ausgewogenes Verhältnis zwischen Leistung und Kosten, geeignet für allgemeine Szenarien."
15821585
},

‎locales/en-US/models.json

+3
Original file line numberDiff line numberDiff line change
@@ -1577,6 +1577,9 @@
15771577
"sonar-reasoning": {
15781578
"description": "A new API product powered by the DeepSeek reasoning model."
15791579
},
1580+
"sonar-reasoning-pro": {
1581+
"description": "A new API product powered by the DeepSeek reasoning model."
1582+
},
15801583
"step-1-128k": {
15811584
"description": "Balances performance and cost, suitable for general scenarios."
15821585
},

‎locales/es-ES/models.json

+3
Original file line numberDiff line numberDiff line change
@@ -1577,6 +1577,9 @@
15771577
"sonar-reasoning": {
15781578
"description": "Nuevo producto API respaldado por el modelo de razonamiento de DeepSeek."
15791579
},
1580+
"sonar-reasoning-pro": {
1581+
"description": "Un nuevo producto API respaldado por el modelo de razonamiento DeepSeek."
1582+
},
15801583
"step-1-128k": {
15811584
"description": "Equilibrio entre rendimiento y costo, adecuado para escenarios generales."
15821585
},

‎locales/fa-IR/models.json

+3
Original file line numberDiff line numberDiff line change
@@ -1577,6 +1577,9 @@
15771577
"sonar-reasoning": {
15781578
"description": "محصول جدید API که توسط مدل استدلال DeepSeek پشتیبانی می‌شود."
15791579
},
1580+
"sonar-reasoning-pro": {
1581+
"description": "محصول جدید API که توسط مدل استدلال DeepSeek پشتیبانی می‌شود."
1582+
},
15801583
"step-1-128k": {
15811584
"description": "تعادل بین عملکرد و هزینه، مناسب برای سناریوهای عمومی."
15821585
},

‎locales/fr-FR/models.json

+3
Original file line numberDiff line numberDiff line change
@@ -1577,6 +1577,9 @@
15771577
"sonar-reasoning": {
15781578
"description": "Nouveau produit API soutenu par le modèle de raisonnement DeepSeek."
15791579
},
1580+
"sonar-reasoning-pro": {
1581+
"description": "Nouveau produit API soutenu par le modèle de raisonnement DeepSeek."
1582+
},
15801583
"step-1-128k": {
15811584
"description": "Équilibre entre performance et coût, adapté à des scénarios généraux."
15821585
},

‎locales/it-IT/models.json

+3
Original file line numberDiff line numberDiff line change
@@ -1577,6 +1577,9 @@
15771577
"sonar-reasoning": {
15781578
"description": "Nuovo prodotto API supportato dal modello di ragionamento DeepSeek."
15791579
},
1580+
"sonar-reasoning-pro": {
1581+
"description": "Nuovo prodotto API supportato dal modello di ragionamento DeepSeek."
1582+
},
15801583
"step-1-128k": {
15811584
"description": "Equilibrio tra prestazioni e costi, adatto per scenari generali."
15821585
},

‎locales/ja-JP/models.json

+3
Original file line numberDiff line numberDiff line change
@@ -1577,6 +1577,9 @@
15771577
"sonar-reasoning": {
15781578
"description": "DeepSeek推論モデルによってサポートされる新しいAPI製品です。"
15791579
},
1580+
"sonar-reasoning-pro": {
1581+
"description": "DeepSeek推論モデルによってサポートされる新しいAPI製品。"
1582+
},
15801583
"step-1-128k": {
15811584
"description": "性能とコストのバランスを取り、一般的なシナリオに適しています。"
15821585
},

‎locales/ko-KR/models.json

+3
Original file line numberDiff line numberDiff line change
@@ -1577,6 +1577,9 @@
15771577
"sonar-reasoning": {
15781578
"description": "DeepSeek 추론 모델이 지원하는 새로운 API 제품입니다."
15791579
},
1580+
"sonar-reasoning-pro": {
1581+
"description": "DeepSeek 추론 모델이 지원하는 새로운 API 제품입니다."
1582+
},
15801583
"step-1-128k": {
15811584
"description": "성능과 비용의 균형을 맞추어 일반적인 시나리오에 적합합니다."
15821585
},

‎locales/nl-NL/models.json

+3
Original file line numberDiff line numberDiff line change
@@ -1577,6 +1577,9 @@
15771577
"sonar-reasoning": {
15781578
"description": "Een nieuw API-product ondersteund door het DeepSeek redeneringsmodel."
15791579
},
1580+
"sonar-reasoning-pro": {
1581+
"description": "Een nieuw API-product ondersteund door het DeepSeek redeneringsmodel."
1582+
},
15801583
"step-1-128k": {
15811584
"description": "Biedt een balans tussen prestaties en kosten, geschikt voor algemene scenario's."
15821585
},

‎locales/pl-PL/models.json

+3
Original file line numberDiff line numberDiff line change
@@ -1577,6 +1577,9 @@
15771577
"sonar-reasoning": {
15781578
"description": "Nowy produkt API wspierany przez model wnioskowania DeepSeek."
15791579
},
1580+
"sonar-reasoning-pro": {
1581+
"description": "Nowy produkt API wspierany przez model wnioskowania DeepSeek."
1582+
},
15801583
"step-1-128k": {
15811584
"description": "Równoważy wydajność i koszty, odpowiedni do ogólnych scenariuszy."
15821585
},

‎locales/pt-BR/models.json

+3
Original file line numberDiff line numberDiff line change
@@ -1577,6 +1577,9 @@
15771577
"sonar-reasoning": {
15781578
"description": "Novo produto API suportado pelo modelo de raciocínio da DeepSeek."
15791579
},
1580+
"sonar-reasoning-pro": {
1581+
"description": "Um novo produto de API suportado pelo modelo de raciocínio DeepSeek."
1582+
},
15801583
"step-1-128k": {
15811584
"description": "Equilibra desempenho e custo, adequado para cenários gerais."
15821585
},

‎locales/ru-RU/models.json

+3
Original file line numberDiff line numberDiff line change
@@ -1577,6 +1577,9 @@
15771577
"sonar-reasoning": {
15781578
"description": "Новый API продукт, поддерживаемый моделью вывода DeepSeek."
15791579
},
1580+
"sonar-reasoning-pro": {
1581+
"description": "Новый API продукт, поддерживаемый моделью вывода DeepSeek."
1582+
},
15801583
"step-1-128k": {
15811584
"description": "Балансирует производительность и стоимость, подходит для общих сценариев."
15821585
},

‎locales/tr-TR/models.json

+3
Original file line numberDiff line numberDiff line change
@@ -1577,6 +1577,9 @@
15771577
"sonar-reasoning": {
15781578
"description": "DeepSeek akıl yürütme modeli tarafından desteklenen yeni API ürünü."
15791579
},
1580+
"sonar-reasoning-pro": {
1581+
"description": "DeepSeek'in akıl yürütme modeli tarafından desteklenen yeni API ürünü."
1582+
},
15801583
"step-1-128k": {
15811584
"description": "Performans ve maliyet arasında denge sağlar, genel senaryolar için uygundur."
15821585
},

‎locales/vi-VN/models.json

+3
Original file line numberDiff line numberDiff line change
@@ -1577,6 +1577,9 @@
15771577
"sonar-reasoning": {
15781578
"description": "Sản phẩm API mới được hỗ trợ bởi mô hình suy luận của DeepSeek."
15791579
},
1580+
"sonar-reasoning-pro": {
1581+
"description": "Sản phẩm API mới được hỗ trợ bởi mô hình suy diễn DeepSeek."
1582+
},
15801583
"step-1-128k": {
15811584
"description": "Cân bằng hiệu suất và chi phí, phù hợp cho các tình huống chung."
15821585
},

‎locales/zh-CN/models.json

+3
Original file line numberDiff line numberDiff line change
@@ -1577,6 +1577,9 @@
15771577
"sonar-reasoning": {
15781578
"description": "由 DeepSeek 推理模型提供支持的新 API 产品。"
15791579
},
1580+
"sonar-reasoning-pro": {
1581+
"description": "由 DeepSeek 推理模型提供支持的新 API 产品。"
1582+
},
15801583
"step-1-128k": {
15811584
"description": "平衡性能与成本,适合一般场景。"
15821585
},

‎locales/zh-TW/models.json

+3
Original file line numberDiff line numberDiff line change
@@ -1577,6 +1577,9 @@
15771577
"sonar-reasoning": {
15781578
"description": "由 DeepSeek 推理模型提供支持的新 API 產品。"
15791579
},
1580+
"sonar-reasoning-pro": {
1581+
"description": "由 DeepSeek 推理模型提供支援的新 API 產品。"
1582+
},
15801583
"step-1-128k": {
15811584
"description": "平衡性能與成本,適合一般場景。"
15821585
},

‎src/config/aiModels/perplexity.ts

+16-6
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,36 @@ const perplexityChatModels: AIChatModelCard[] = [
66
reasoning: true,
77
},
88
contextWindowTokens: 127_072,
9-
description:
10-
'由 DeepSeek 推理模型提供支持的新 API 产品。',
9+
description: '由 DeepSeek 推理模型提供支持的新 API 产品。',
10+
displayName: 'Sonar Reasoning Pro',
11+
enabled: true,
12+
id: 'sonar-reasoning-pro',
13+
maxOutput: 8192,
14+
type: 'chat',
15+
},
16+
{
17+
abilities: {
18+
reasoning: true,
19+
},
20+
contextWindowTokens: 127_072,
21+
description: '由 DeepSeek 推理模型提供支持的新 API 产品。',
1122
displayName: 'Sonar Reasoning',
1223
enabled: true,
1324
id: 'sonar-reasoning',
25+
maxOutput: 8192,
1426
type: 'chat',
1527
},
1628
{
1729
contextWindowTokens: 200_000,
18-
description:
19-
'支持搜索上下文的高级搜索产品,支持高级查询和跟进。',
30+
description: '支持搜索上下文的高级搜索产品,支持高级查询和跟进。',
2031
displayName: 'Sonar Pro',
2132
enabled: true,
2233
id: 'sonar-pro',
2334
type: 'chat',
2435
},
2536
{
2637
contextWindowTokens: 127_072,
27-
description:
28-
'基于搜索上下文的轻量级搜索产品,比 Sonar Pro 更快、更便宜。',
38+
description: '基于搜索上下文的轻量级搜索产品,比 Sonar Pro 更快、更便宜。',
2939
displayName: 'Sonar',
3040
enabled: true,
3141
id: 'sonar',

‎src/config/modelProviders/perplexity.ts

+9-6
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,21 @@ const Perplexity: ModelProviderCard = {
55
chatModels: [
66
{
77
contextWindowTokens: 127_072,
8-
description:
9-
'由 DeepSeek 推理模型提供支持的新 API 产品。',
8+
description: '由 DeepSeek 推理模型提供支持的新 API 产品。',
109
displayName: 'Sonar Reasoning',
1110
enabled: true,
1211
id: 'sonar-reasoning',
1312
},
1413
{
1514
contextWindowTokens: 200_000,
16-
description:
17-
'支持搜索上下文的高级搜索产品,支持高级查询和跟进。',
15+
description: '支持搜索上下文的高级搜索产品,支持高级查询和跟进。',
1816
displayName: 'Sonar Pro',
1917
enabled: true,
2018
id: 'sonar-pro',
2119
},
2220
{
2321
contextWindowTokens: 127_072,
24-
description:
25-
'基于搜索上下文的轻量级搜索产品,比 Sonar Pro 更快、更便宜。',
22+
description: '基于搜索上下文的轻量级搜索产品,比 Sonar Pro 更快、更便宜。',
2623
displayName: 'Sonar',
2724
enabled: true,
2825
id: 'sonar',
@@ -60,10 +57,16 @@ const Perplexity: ModelProviderCard = {
6057
placeholder: 'https://api.perplexity.ai',
6158
},
6259
settings: {
60+
// perplexity doesn't support CORS
61+
disableBrowserRequest: true,
6362
proxyUrl: {
6463
placeholder: 'https://api.perplexity.ai',
6564
},
6665
sdkType: 'openai',
66+
smoothing: {
67+
speed: 2,
68+
text: true,
69+
},
6770
},
6871
url: 'https://www.perplexity.ai',
6972
};

0 commit comments

Comments
 (0)
Please sign in to comment.