@lobehub/chat 1.88.2 → 1.88.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/changelog/v1.json +12 -0
- package/locales/ar/models.json +6 -0
- package/locales/ar/plugin.json +1 -0
- package/locales/bg-BG/models.json +6 -0
- package/locales/bg-BG/plugin.json +1 -0
- package/locales/de-DE/models.json +6 -0
- package/locales/de-DE/plugin.json +1 -0
- package/locales/en-US/models.json +6 -0
- package/locales/en-US/plugin.json +1 -0
- package/locales/es-ES/models.json +6 -0
- package/locales/es-ES/plugin.json +1 -0
- package/locales/fa-IR/models.json +6 -0
- package/locales/fa-IR/plugin.json +1 -0
- package/locales/fr-FR/models.json +6 -0
- package/locales/fr-FR/plugin.json +1 -0
- package/locales/it-IT/models.json +6 -0
- package/locales/it-IT/plugin.json +1 -0
- package/locales/ja-JP/models.json +6 -0
- package/locales/ja-JP/plugin.json +1 -0
- package/locales/ko-KR/models.json +6 -0
- package/locales/ko-KR/plugin.json +1 -0
- package/locales/nl-NL/models.json +6 -0
- package/locales/nl-NL/plugin.json +1 -0
- package/locales/pl-PL/models.json +6 -0
- package/locales/pl-PL/plugin.json +1 -0
- package/locales/pt-BR/models.json +6 -0
- package/locales/pt-BR/plugin.json +1 -0
- package/locales/ru-RU/models.json +6 -0
- package/locales/ru-RU/plugin.json +1 -0
- package/locales/tr-TR/models.json +6 -0
- package/locales/tr-TR/plugin.json +3 -2
- package/locales/vi-VN/models.json +6 -0
- package/locales/vi-VN/plugin.json +1 -0
- package/locales/zh-CN/models.json +7 -1
- package/locales/zh-CN/plugin.json +1 -0
- package/locales/zh-TW/models.json +6 -0
- package/locales/zh-TW/plugin.json +1 -0
- package/package.json +1 -1
- package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem/WelcomeMessage.tsx +5 -1
- package/src/config/aiModels/anthropic.ts +41 -41
- package/src/config/aiModels/google.ts +70 -1
- package/src/config/aiModels/hunyuan.ts +15 -2
- package/src/config/aiModels/novita.ts +12 -12
- package/src/libs/model-runtime/anthropic/index.test.ts +23 -10
- package/src/libs/model-runtime/anthropic/index.ts +20 -8
- package/src/libs/model-runtime/google/index.ts +5 -0
- package/src/libs/oidc-provider/provider.ts +1 -1
- package/src/locales/default/plugin.ts +1 -0
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,39 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.88.3](https://github.com/lobehub/lobe-chat/compare/v1.88.2...v1.88.3)
|
6
|
+
|
7
|
+
<sup>Released on **2025-05-25**</sup>
|
8
|
+
|
9
|
+
#### 🐛 Bug Fixes
|
10
|
+
|
11
|
+
- **misc**: Fix message refresh 401 on desktop.
|
12
|
+
|
13
|
+
#### 💄 Styles
|
14
|
+
|
15
|
+
- **misc**: Add gemini & hunyuan & Claude models.
|
16
|
+
|
17
|
+
<br/>
|
18
|
+
|
19
|
+
<details>
|
20
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
21
|
+
|
22
|
+
#### What's fixed
|
23
|
+
|
24
|
+
- **misc**: Fix message refresh 401 on desktop, closes [#7958](https://github.com/lobehub/lobe-chat/issues/7958) ([b4b426f](https://github.com/lobehub/lobe-chat/commit/b4b426f))
|
25
|
+
|
26
|
+
#### Styles
|
27
|
+
|
28
|
+
- **misc**: Add gemini & hunyuan & Claude models, closes [#7908](https://github.com/lobehub/lobe-chat/issues/7908) ([5244f22](https://github.com/lobehub/lobe-chat/commit/5244f22))
|
29
|
+
|
30
|
+
</details>
|
31
|
+
|
32
|
+
<div align="right">
|
33
|
+
|
34
|
+
[](#readme-top)
|
35
|
+
|
36
|
+
</div>
|
37
|
+
|
5
38
|
### [Version 1.88.2](https://github.com/lobehub/lobe-chat/compare/v1.88.1...v1.88.2)
|
6
39
|
|
7
40
|
<sup>Released on **2025-05-24**</sup>
|
package/changelog/v1.json
CHANGED
package/locales/ar/models.json
CHANGED
@@ -617,6 +617,12 @@
|
|
617
617
|
"claude-3-sonnet-20240229": {
|
618
618
|
"description": "Claude 3 Sonnet يوفر توازنًا مثاليًا بين الذكاء والسرعة لحمولات العمل المؤسسية. يقدم أقصى فائدة بسعر أقل، موثوق ومناسب للنشر على نطاق واسع."
|
619
619
|
},
|
620
|
+
"claude-opus-4-20250514": {
|
621
|
+
"description": "Claude Opus 4 هو أقوى نموذج من Anthropic لمعالجة المهام المعقدة للغاية. إنه يتفوق في الأداء والذكاء والسلاسة والفهم."
|
622
|
+
},
|
623
|
+
"claude-sonnet-4-20250514": {
|
624
|
+
"description": "يمكن لClaude 4 Sonnet أن ينتج استجابات شبه فورية أو تفكير تدريجي ممتد، حيث يمكن للمستخدمين رؤية هذه العمليات بوضوح. يمكن لمستخدمي API أيضًا التحكم بدقة في وقت تفكير النموذج."
|
625
|
+
},
|
620
626
|
"codegeex-4": {
|
621
627
|
"description": "CodeGeeX-4 هو مساعد برمجي قوي، يدعم مجموعة متنوعة من لغات البرمجة في الإجابة الذكية وإكمال الشيفرة، مما يعزز من كفاءة التطوير."
|
622
628
|
},
|
package/locales/ar/plugin.json
CHANGED
@@ -617,6 +617,12 @@
|
|
617
617
|
"claude-3-sonnet-20240229": {
|
618
618
|
"description": "Claude 3 Sonnet предлага идеален баланс между интелигентност и скорост за корпоративни работни натоварвания. Той предлага максимална полезност на по-ниска цена, надежден и подходящ за мащабно внедряване."
|
619
619
|
},
|
620
|
+
"claude-opus-4-20250514": {
|
621
|
+
"description": "Claude Opus 4 е най-мощният модел на Anthropic, предназначен за обработка на изключително сложни задачи. Той се отличава с изключителна производителност, интелигентност, плавност и разбиране."
|
622
|
+
},
|
623
|
+
"claude-sonnet-4-20250514": {
|
624
|
+
"description": "Claude 4 Sonnet може да генерира почти мигновени отговори или удължено постепенно мислене, като потребителите могат ясно да видят тези процеси. Потребителите на API също могат да упражняват прецизен контрол върху времето за мислене на модела."
|
625
|
+
},
|
620
626
|
"codegeex-4": {
|
621
627
|
"description": "CodeGeeX-4 е мощен AI помощник за програмиране, който поддържа интелигентни въпроси и отговори и автоматично допълване на код за различни програмни езици, повишавайки ефективността на разработката."
|
622
628
|
},
|
@@ -617,6 +617,12 @@
|
|
617
617
|
"claude-3-sonnet-20240229": {
|
618
618
|
"description": "Claude 3 Sonnet bietet eine ideale Balance zwischen Intelligenz und Geschwindigkeit für Unternehmensarbeitslasten. Es bietet maximalen Nutzen zu einem niedrigeren Preis, ist zuverlässig und für großflächige Bereitstellungen geeignet."
|
619
619
|
},
|
620
|
+
"claude-opus-4-20250514": {
|
621
|
+
"description": "Claude Opus 4 ist das leistungsstärkste Modell von Anthropic zur Bewältigung hochkomplexer Aufgaben. Es zeichnet sich durch hervorragende Leistung, Intelligenz, Flüssigkeit und Verständnis aus."
|
622
|
+
},
|
623
|
+
"claude-sonnet-4-20250514": {
|
624
|
+
"description": "Claude 4 Sonnet kann nahezu sofortige Antworten oder verlängerte, schrittweise Überlegungen erzeugen, wobei die Benutzer diesen Prozess klar nachvollziehen können. API-Nutzer haben zudem die Möglichkeit, die Denkzeit des Modells detailliert zu steuern."
|
625
|
+
},
|
620
626
|
"codegeex-4": {
|
621
627
|
"description": "CodeGeeX-4 ist ein leistungsstarker AI-Programmierassistent, der intelligente Fragen und Codevervollständigung in verschiedenen Programmiersprachen unterstützt und die Entwicklungseffizienz steigert."
|
622
628
|
},
|
@@ -617,6 +617,12 @@
|
|
617
617
|
"claude-3-sonnet-20240229": {
|
618
618
|
"description": "Claude 3 Sonnet provides an ideal balance of intelligence and speed for enterprise workloads. It offers maximum utility at a lower price, reliable and suitable for large-scale deployment."
|
619
619
|
},
|
620
|
+
"claude-opus-4-20250514": {
|
621
|
+
"description": "Claude Opus 4 is Anthropic's most powerful model for handling highly complex tasks. It excels in performance, intelligence, fluency, and comprehension."
|
622
|
+
},
|
623
|
+
"claude-sonnet-4-20250514": {
|
624
|
+
"description": "Claude 4 Sonnet can generate near-instant responses or extended, step-by-step reasoning, allowing users to clearly observe these processes. API users can also have fine control over the time the model takes to think."
|
625
|
+
},
|
620
626
|
"codegeex-4": {
|
621
627
|
"description": "CodeGeeX-4 is a powerful AI programming assistant that supports intelligent Q&A and code completion in various programming languages, enhancing development efficiency."
|
622
628
|
},
|
@@ -617,6 +617,12 @@
|
|
617
617
|
"claude-3-sonnet-20240229": {
|
618
618
|
"description": "Claude 3 Sonnet proporciona un equilibrio ideal entre inteligencia y velocidad para cargas de trabajo empresariales. Ofrece la máxima utilidad a un costo más bajo, siendo fiable y adecuado para implementaciones a gran escala."
|
619
619
|
},
|
620
|
+
"claude-opus-4-20250514": {
|
621
|
+
"description": "Claude Opus 4 es el modelo más potente de Anthropic para manejar tareas altamente complejas. Se destaca en rendimiento, inteligencia, fluidez y comprensión."
|
622
|
+
},
|
623
|
+
"claude-sonnet-4-20250514": {
|
624
|
+
"description": "Claude 4 Sonnet puede generar respuestas casi instantáneas o un pensamiento gradual prolongado, permitiendo a los usuarios ver claramente estos procesos. Los usuarios de la API también pueden tener un control detallado sobre el tiempo de pensamiento del modelo."
|
625
|
+
},
|
620
626
|
"codegeex-4": {
|
621
627
|
"description": "CodeGeeX-4 es un potente asistente de programación AI, que admite preguntas y respuestas inteligentes y autocompletado de código en varios lenguajes de programación, mejorando la eficiencia del desarrollo."
|
622
628
|
},
|
@@ -617,6 +617,12 @@
|
|
617
617
|
"claude-3-sonnet-20240229": {
|
618
618
|
"description": "Claude 3 Sonnet تعادلی ایدهآل بین هوش و سرعت برای بارهای کاری سازمانی فراهم میکند. این محصول با قیمتی پایینتر حداکثر بهرهوری را ارائه میدهد، قابل اعتماد است و برای استقرار در مقیاس بزرگ مناسب میباشد."
|
619
619
|
},
|
620
|
+
"claude-opus-4-20250514": {
|
621
|
+
"description": "Claude Opus 4 قدرتمندترین مدل Anthropic برای پردازش وظایف بسیار پیچیده است. این مدل در زمینههای عملکرد، هوش، روانی و درک فوقالعاده عمل میکند."
|
622
|
+
},
|
623
|
+
"claude-sonnet-4-20250514": {
|
624
|
+
"description": "Claude 4 Sonnet میتواند پاسخهای تقریباً آنی یا تفکر تدریجی و طولانیمدت را تولید کند، کاربران میتوانند این فرآیندها را به وضوح مشاهده کنند. کاربران API همچنین میتوانند زمان تفکر مدل را به دقت کنترل کنند."
|
625
|
+
},
|
620
626
|
"codegeex-4": {
|
621
627
|
"description": "CodeGeeX-4 یک دستیار برنامهنویسی قدرتمند مبتنی بر هوش مصنوعی است که از پرسش و پاسخ هوشمند و تکمیل کد در زبانهای برنامهنویسی مختلف پشتیبانی میکند و بهرهوری توسعه را افزایش میدهد."
|
622
628
|
},
|
@@ -617,6 +617,12 @@
|
|
617
617
|
"claude-3-sonnet-20240229": {
|
618
618
|
"description": "Claude 3 Sonnet offre un équilibre idéal entre intelligence et vitesse pour les charges de travail d'entreprise. Il fournit une utilité maximale à un coût inférieur, fiable et adapté à un déploiement à grande échelle."
|
619
619
|
},
|
620
|
+
"claude-opus-4-20250514": {
|
621
|
+
"description": "Claude Opus 4 est le modèle le plus puissant d'Anthropic pour traiter des tâches hautement complexes. Il excelle en performance, intelligence, fluidité et compréhension."
|
622
|
+
},
|
623
|
+
"claude-sonnet-4-20250514": {
|
624
|
+
"description": "Claude 4 Sonnet peut générer des réponses presque instantanées ou des réflexions prolongées, permettant aux utilisateurs de voir clairement ces processus. Les utilisateurs de l'API peuvent également contrôler avec précision le temps de réflexion du modèle."
|
625
|
+
},
|
620
626
|
"codegeex-4": {
|
621
627
|
"description": "CodeGeeX-4 est un puissant assistant de programmation AI, prenant en charge des questions intelligentes et l'achèvement de code dans divers langages de programmation, améliorant l'efficacité du développement."
|
622
628
|
},
|
@@ -617,6 +617,12 @@
|
|
617
617
|
"claude-3-sonnet-20240229": {
|
618
618
|
"description": "Claude 3 Sonnet offre un equilibrio ideale tra intelligenza e velocità per i carichi di lavoro aziendali. Fornisce la massima utilità a un prezzo inferiore, affidabile e adatto per distribuzioni su larga scala."
|
619
619
|
},
|
620
|
+
"claude-opus-4-20250514": {
|
621
|
+
"description": "Claude Opus 4 è il modello più potente di Anthropic per gestire compiti altamente complessi. Eccelle in prestazioni, intelligenza, fluidità e comprensione."
|
622
|
+
},
|
623
|
+
"claude-sonnet-4-20250514": {
|
624
|
+
"description": "Claude 4 Sonnet può generare risposte quasi istantanee o pensieri graduali prolungati, consentendo agli utenti di vedere chiaramente questi processi. Gli utenti dell'API possono anche controllare in modo dettagliato il tempo di riflessione del modello."
|
625
|
+
},
|
620
626
|
"codegeex-4": {
|
621
627
|
"description": "CodeGeeX-4 è un potente assistente di programmazione AI, supporta domande intelligenti e completamento del codice in vari linguaggi di programmazione, migliorando l'efficienza dello sviluppo."
|
622
628
|
},
|
@@ -617,6 +617,12 @@
|
|
617
617
|
"claude-3-sonnet-20240229": {
|
618
618
|
"description": "Claude 3 Sonnetは、企業のワークロードに理想的なバランスを提供し、より低価格で最大の効用を提供し、信頼性が高く、大規模な展開に適しています。"
|
619
619
|
},
|
620
|
+
"claude-opus-4-20250514": {
|
621
|
+
"description": "Claude Opus 4は、Anthropicが高度に複雑なタスクを処理するために開発した最も強力なモデルです。性能、知性、流暢さ、理解力において卓越したパフォーマンスを発揮します。"
|
622
|
+
},
|
623
|
+
"claude-sonnet-4-20250514": {
|
624
|
+
"description": "Claude 4 Sonnetは、ほぼ瞬時の応答や段階的な思考を生成でき、ユーザーはこれらのプロセスを明確に見ることができます。APIユーザーは、モデルの思考時間を詳細に制御することも可能です。"
|
625
|
+
},
|
620
626
|
"codegeex-4": {
|
621
627
|
"description": "CodeGeeX-4は強力なAIプログラミングアシスタントで、さまざまなプログラミング言語のインテリジェントな質問応答とコード補完をサポートし、開発効率を向上させます。"
|
622
628
|
},
|
@@ -617,6 +617,12 @@
|
|
617
617
|
"claude-3-sonnet-20240229": {
|
618
618
|
"description": "Claude 3 Sonnet은 기업 작업 부하에 이상적인 균형을 제공하며, 더 낮은 가격으로 최대 효용을 제공합니다. 신뢰성이 높고 대규모 배포에 적합합니다."
|
619
619
|
},
|
620
|
+
"claude-opus-4-20250514": {
|
621
|
+
"description": "Claude Opus 4는 Anthropic이 매우 복잡한 작업을 처리하기 위해 개발한 가장 강력한 모델입니다. 성능, 지능, 유창성 및 이해력 면에서 뛰어난 성과를 보입니다."
|
622
|
+
},
|
623
|
+
"claude-sonnet-4-20250514": {
|
624
|
+
"description": "Claude 4 Sonnet은 거의 즉각적인 응답 또는 점진적인 사고 과정을 생성할 수 있으며, 사용자는 이러한 과정을 명확하게 볼 수 있습니다. API 사용자는 모델의 사고 시간을 세밀하게 제어할 수 있습니다."
|
625
|
+
},
|
620
626
|
"codegeex-4": {
|
621
627
|
"description": "CodeGeeX-4는 강력한 AI 프로그래밍 도우미로, 다양한 프로그래밍 언어에 대한 스마트 Q&A 및 코드 완성을 지원하여 개발 효율성을 높입니다."
|
622
628
|
},
|
@@ -617,6 +617,12 @@
|
|
617
617
|
"claude-3-sonnet-20240229": {
|
618
618
|
"description": "Claude 3 Sonnet biedt een ideale balans tussen intelligentie en snelheid voor bedrijfswerkbelastingen. Het biedt maximale bruikbaarheid tegen een lagere prijs, betrouwbaar en geschikt voor grootschalige implementatie."
|
619
619
|
},
|
620
|
+
"claude-opus-4-20250514": {
|
621
|
+
"description": "Claude Opus 4 is het krachtigste model van Anthropic voor het verwerken van zeer complexe taken. Het presteert uitstekend op het gebied van prestaties, intelligentie, vloeiendheid en begrip."
|
622
|
+
},
|
623
|
+
"claude-sonnet-4-20250514": {
|
624
|
+
"description": "Claude 4 Sonnet kan bijna onmiddellijke reacties of verlengde, geleidelijke overpeinzingen genereren, waarbij gebruikers deze processen duidelijk kunnen zien. API-gebruikers kunnen ook gedetailleerde controle uitoefenen over de denktijd van het model."
|
625
|
+
},
|
620
626
|
"codegeex-4": {
|
621
627
|
"description": "CodeGeeX-4 is een krachtige AI-programmeerassistent die slimme vraag- en antwoordmogelijkheden en code-aanvulling ondersteunt voor verschillende programmeertalen, waardoor de ontwikkelingssnelheid wordt verhoogd."
|
622
628
|
},
|
@@ -617,6 +617,12 @@
|
|
617
617
|
"claude-3-sonnet-20240229": {
|
618
618
|
"description": "Claude 3 Sonnet zapewnia idealną równowagę między inteligencją a szybkością dla obciążeń roboczych w przedsiębiorstwach. Oferuje maksymalną użyteczność przy niższej cenie, jest niezawodny i odpowiedni do dużych wdrożeń."
|
619
619
|
},
|
620
|
+
"claude-opus-4-20250514": {
|
621
|
+
"description": "Claude Opus 4 to najpotężniejszy model Anthropic, zaprojektowany do obsługi wysoce złożonych zadań. Wyróżnia się doskonałymi osiągami, inteligencją, płynnością i zdolnością rozumienia."
|
622
|
+
},
|
623
|
+
"claude-sonnet-4-20250514": {
|
624
|
+
"description": "Claude 4 Sonnet może generować niemal natychmiastowe odpowiedzi lub wydłużone, stopniowe myślenie, co pozwala użytkownikom wyraźnie zobaczyć te procesy. Użytkownicy API mogą również szczegółowo kontrolować czas myślenia modelu."
|
625
|
+
},
|
620
626
|
"codegeex-4": {
|
621
627
|
"description": "CodeGeeX-4 to potężny asystent programowania AI, obsługujący inteligentne pytania i odpowiedzi oraz uzupełnianie kodu w różnych językach programowania, zwiększając wydajność programistów."
|
622
628
|
},
|
@@ -617,6 +617,12 @@
|
|
617
617
|
"claude-3-sonnet-20240229": {
|
618
618
|
"description": "Claude 3 Sonnet oferece um equilíbrio ideal entre inteligência e velocidade para cargas de trabalho empresariais. Ele fornece máxima utilidade a um custo mais baixo, sendo confiável e adequado para implantação em larga escala."
|
619
619
|
},
|
620
|
+
"claude-opus-4-20250514": {
|
621
|
+
"description": "Claude Opus 4 é o modelo mais poderoso da Anthropic para lidar com tarefas altamente complexas. Ele se destaca em desempenho, inteligência, fluência e compreensão."
|
622
|
+
},
|
623
|
+
"claude-sonnet-4-20250514": {
|
624
|
+
"description": "Claude 4 Sonnet pode gerar respostas quase instantâneas ou um pensamento gradual prolongado, permitindo que os usuários vejam claramente esses processos. Os usuários da API também podem ter um controle detalhado sobre o tempo de reflexão do modelo."
|
625
|
+
},
|
620
626
|
"codegeex-4": {
|
621
627
|
"description": "O CodeGeeX-4 é um poderoso assistente de programação AI, suportando perguntas e respostas inteligentes e autocompletar em várias linguagens de programação, aumentando a eficiência do desenvolvimento."
|
622
628
|
},
|
@@ -617,6 +617,12 @@
|
|
617
617
|
"claude-3-sonnet-20240229": {
|
618
618
|
"description": "Claude 3 Sonnet обеспечивает идеальный баланс между интеллектом и скоростью для корпоративных рабочих нагрузок. Он предлагает максимальную полезность по более низкой цене, надежен и подходит для масштабного развертывания."
|
619
619
|
},
|
620
|
+
"claude-opus-4-20250514": {
|
621
|
+
"description": "Claude Opus 4 — это самая мощная модель Anthropic для решения высококомплексных задач. Она превосходно проявляет себя в производительности, интеллекте, плавности и понимании."
|
622
|
+
},
|
623
|
+
"claude-sonnet-4-20250514": {
|
624
|
+
"description": "Claude 4 Sonnet может генерировать почти мгновенные ответы или продуманные шаги, позволяя пользователям четко видеть эти процессы. Пользователи API также могут детально контролировать время размышлений модели."
|
625
|
+
},
|
620
626
|
"codegeex-4": {
|
621
627
|
"description": "CodeGeeX-4 — это мощный AI помощник по программированию, поддерживающий интеллектуальные ответы и автозаполнение кода на различных языках программирования, повышая эффективность разработки."
|
622
628
|
},
|
@@ -617,6 +617,12 @@
|
|
617
617
|
"claude-3-sonnet-20240229": {
|
618
618
|
"description": "Claude 3 Sonnet, akıllı ve hızlı bir denge sunarak kurumsal iş yükleri için idealdir. Daha düşük bir fiyatla maksimum fayda sağlar, güvenilir ve büyük ölçekli dağıtım için uygundur."
|
619
619
|
},
|
620
|
+
"claude-opus-4-20250514": {
|
621
|
+
"description": "Claude Opus 4, Anthropic'in son derece karmaşık görevleri işlemek için geliştirdiği en güçlü modeldir. Performans, zeka, akıcılık ve anlama açısından mükemmel bir şekilde öne çıkmaktadır."
|
622
|
+
},
|
623
|
+
"claude-sonnet-4-20250514": {
|
624
|
+
"description": "Claude 4 Sonnet, neredeyse anlık yanıtlar veya uzatılmış aşamalı düşünme süreçleri üretebilir; kullanıcılar bu süreçleri net bir şekilde görebilir. API kullanıcıları, modelin düşünme süresini ayrıntılı bir şekilde kontrol edebilir."
|
625
|
+
},
|
620
626
|
"codegeex-4": {
|
621
627
|
"description": "CodeGeeX-4, çeşitli programlama dillerinde akıllı soru-cevap ve kod tamamlama desteği sunan güçlü bir AI programlama asistanıdır, geliştirme verimliliğini artırır."
|
622
628
|
},
|
@@ -227,11 +227,13 @@
|
|
227
227
|
"renameLocalFile": "Yeniden adlandır",
|
228
228
|
"searchLocalFiles": "Dosyaları ara",
|
229
229
|
"writeLocalFile": "Dosyaya yaz"
|
230
|
-
}
|
230
|
+
},
|
231
|
+
"title": "Yerel Dosya"
|
231
232
|
},
|
232
233
|
"pluginList": "Eklenti Listesi",
|
233
234
|
"search": {
|
234
235
|
"apiName": {
|
236
|
+
"crawlMultiPages": "Birden Fazla Sayfa İçeriğini Okuma",
|
235
237
|
"crawlSinglePage": "Sayfa içeriğini oku",
|
236
238
|
"search": "Sayfayı ara"
|
237
239
|
},
|
@@ -294,7 +296,6 @@
|
|
294
296
|
},
|
295
297
|
"title": "Eklenti Mağazası"
|
296
298
|
},
|
297
|
-
"title": "Yerel Dosyalar",
|
298
299
|
"unknownError": "Bilinmeyen hata",
|
299
300
|
"unknownPlugin": "Bilinmeyen eklenti"
|
300
301
|
}
|
@@ -617,6 +617,12 @@
|
|
617
617
|
"claude-3-sonnet-20240229": {
|
618
618
|
"description": "Claude 3 Sonnet cung cấp sự cân bằng lý tưởng giữa trí thông minh và tốc độ cho khối lượng công việc doanh nghiệp. Nó cung cấp hiệu suất tối đa với mức giá thấp hơn, đáng tin cậy và phù hợp cho triển khai quy mô lớn."
|
619
619
|
},
|
620
|
+
"claude-opus-4-20250514": {
|
621
|
+
"description": "Claude Opus 4 là mô hình mạnh mẽ nhất của Anthropic được sử dụng để xử lý các nhiệm vụ phức tạp cao. Nó thể hiện xuất sắc về hiệu suất, trí tuệ, sự trôi chảy và khả năng hiểu biết."
|
622
|
+
},
|
623
|
+
"claude-sonnet-4-20250514": {
|
624
|
+
"description": "Claude 4 Sonnet có thể tạo ra phản hồi gần như ngay lập tức hoặc suy nghĩ dần dần kéo dài, người dùng có thể thấy rõ những quá trình này. Người dùng API cũng có thể kiểm soát chi tiết thời gian suy nghĩ của mô hình."
|
625
|
+
},
|
620
626
|
"codegeex-4": {
|
621
627
|
"description": "CodeGeeX-4 là trợ lý lập trình AI mạnh mẽ, hỗ trợ nhiều ngôn ngữ lập trình với câu hỏi thông minh và hoàn thành mã, nâng cao hiệu suất phát triển."
|
622
628
|
},
|
@@ -617,6 +617,12 @@
|
|
617
617
|
"claude-3-sonnet-20240229": {
|
618
618
|
"description": "Claude 3 Sonnet 在智能和速度方面为企业工作负载提供了理想的平衡。它以更低的价格提供最大效用,可靠且适合大规模部署。"
|
619
619
|
},
|
620
|
+
"claude-opus-4-20250514": {
|
621
|
+
"description": "Claude Opus 4 是 Anthropic 用于处理高度复杂任务的最强大模型。它在性能、智能、流畅性和理解力方面表现卓越。"
|
622
|
+
},
|
623
|
+
"claude-sonnet-4-20250514": {
|
624
|
+
"description": "Claude 4 Sonnet 可以产生近乎即时的响应或延长的逐步思考,用户可以清晰地看到这些过程。API 用户还可以对模型思考的时间进行细致的控制"
|
625
|
+
},
|
620
626
|
"codegeex-4": {
|
621
627
|
"description": "CodeGeeX-4 是强大的AI编程助手,支持多种编程语言的智能问答与代码补全,提升开发效率。"
|
622
628
|
},
|
@@ -1167,7 +1173,7 @@
|
|
1167
1173
|
"description": "GPT 3.5 Turbo,适用于各种文本生成和理解任务,Currently points to gpt-3.5-turbo-0125"
|
1168
1174
|
},
|
1169
1175
|
"gpt-3.5-turbo-instruct": {
|
1170
|
-
"description": "GPT 3.5 Turbo
|
1176
|
+
"description": "GPT 3.5 Turbo,适用于各种文本生成和理解任务,对指令遵循的优化"
|
1171
1177
|
},
|
1172
1178
|
"gpt-35-turbo": {
|
1173
1179
|
"description": "GPT 3.5 Turbo,OpenAI提供的高效模型,适用于聊天和文本生成任务,支持并行函数调用。"
|
@@ -617,6 +617,12 @@
|
|
617
617
|
"claude-3-sonnet-20240229": {
|
618
618
|
"description": "Claude 3 Sonnet 在智能和速度方面為企業工作負載提供了理想的平衡。它以更低的價格提供最大效用,可靠且適合大規模部署。"
|
619
619
|
},
|
620
|
+
"claude-opus-4-20250514": {
|
621
|
+
"description": "Claude Opus 4 是 Anthropic 用於處理高度複雜任務的最強大模型。它在性能、智能、流暢性和理解力方面表現卓越。"
|
622
|
+
},
|
623
|
+
"claude-sonnet-4-20250514": {
|
624
|
+
"description": "Claude 4 Sonnet 可以產生近乎即時的回應或延長的逐步思考,使用者可以清晰地看到這些過程。API 使用者還可以對模型思考的時間進行細緻的控制"
|
625
|
+
},
|
620
626
|
"codegeex-4": {
|
621
627
|
"description": "CodeGeeX-4是一個強大的AI編程助手,支持多種編程語言的智能問答與代碼補全,提升開發效率。"
|
622
628
|
},
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.88.
|
3
|
+
"version": "1.88.3",
|
4
4
|
"description": "Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
|
5
5
|
"keywords": [
|
6
6
|
"framework",
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import isEqual from 'fast-deep-equal';
|
2
|
+
import qs from 'query-string';
|
2
3
|
import React, { useMemo } from 'react';
|
3
4
|
import { useTranslation } from 'react-i18next';
|
4
5
|
import { Flexbox } from 'react-layout-kit';
|
@@ -31,7 +32,10 @@ const WelcomeMessage = () => {
|
|
31
32
|
|
32
33
|
const agentMsg = t(isAgentEditable ? 'agentDefaultMessage' : 'agentDefaultMessageWithoutEdit', {
|
33
34
|
name: meta.title || t('defaultAgent'),
|
34
|
-
url:
|
35
|
+
url: qs.stringifyUrl({
|
36
|
+
query: mobile ? { session: activeId, showMobileWorkspace: mobile } : { session: activeId },
|
37
|
+
url: '/chat/settings',
|
38
|
+
}),
|
35
39
|
});
|
36
40
|
|
37
41
|
const message = useMemo(() => {
|
@@ -9,16 +9,16 @@ const anthropicChatModels: AIChatModelCard[] = [
|
|
9
9
|
},
|
10
10
|
contextWindowTokens: 200_000,
|
11
11
|
description:
|
12
|
-
'Claude 4
|
13
|
-
displayName: 'Claude 4
|
12
|
+
'Claude Opus 4 是 Anthropic 用于处理高度复杂任务的最强大模型。它在性能、智能、流畅性和理解力方面表现卓越。',
|
13
|
+
displayName: 'Claude Opus 4',
|
14
14
|
enabled: true,
|
15
|
-
id: 'claude-
|
16
|
-
maxOutput:
|
15
|
+
id: 'claude-opus-4-20250514',
|
16
|
+
maxOutput: 32_000,
|
17
17
|
pricing: {
|
18
|
-
cachedInput:
|
19
|
-
input:
|
20
|
-
output:
|
21
|
-
writeCacheInput:
|
18
|
+
cachedInput: 1.5,
|
19
|
+
input: 15,
|
20
|
+
output: 75,
|
21
|
+
writeCacheInput: 18.75,
|
22
22
|
},
|
23
23
|
releasedAt: '2025-05-23',
|
24
24
|
settings: {
|
@@ -29,20 +29,21 @@ const anthropicChatModels: AIChatModelCard[] = [
|
|
29
29
|
{
|
30
30
|
abilities: {
|
31
31
|
functionCall: true,
|
32
|
+
reasoning: true,
|
32
33
|
vision: true,
|
33
34
|
},
|
34
35
|
contextWindowTokens: 200_000,
|
35
36
|
description:
|
36
|
-
'Claude
|
37
|
-
displayName: 'Claude
|
37
|
+
'Claude Sonnet 4 可以产生近乎即时的响应或延长的逐步思考,用户可以清晰地看到这些过程。API 用户还可以对模型思考的时间进行细致的控制',
|
38
|
+
displayName: 'Claude Sonnet 4',
|
38
39
|
enabled: true,
|
39
|
-
id: 'claude-
|
40
|
-
maxOutput:
|
40
|
+
id: 'claude-sonnet-4-20250514',
|
41
|
+
maxOutput: 64_000,
|
41
42
|
pricing: {
|
42
|
-
cachedInput:
|
43
|
-
input:
|
44
|
-
output:
|
45
|
-
writeCacheInput:
|
43
|
+
cachedInput: 0.3,
|
44
|
+
input: 3,
|
45
|
+
output: 15,
|
46
|
+
writeCacheInput: 3.75,
|
46
47
|
},
|
47
48
|
releasedAt: '2025-05-23',
|
48
49
|
settings: {
|
@@ -59,10 +60,10 @@ const anthropicChatModels: AIChatModelCard[] = [
|
|
59
60
|
contextWindowTokens: 200_000,
|
60
61
|
description:
|
61
62
|
'Claude 3.7 Sonnet 是 Anthropic 迄今为止最智能的模型,也是市场上首个混合推理模型。Claude 3.7 Sonnet 可以产生近乎即时的响应或延长的逐步思考,用户可以清晰地看到这些过程。Sonnet 特别擅长编程、数据科学、视觉处理、代理任务。',
|
62
|
-
displayName: 'Claude 3.7 Sonnet
|
63
|
+
displayName: 'Claude 3.7 Sonnet',
|
63
64
|
enabled: true,
|
64
65
|
id: 'claude-3-7-sonnet-20250219',
|
65
|
-
maxOutput:
|
66
|
+
maxOutput: 64_000,
|
66
67
|
pricing: {
|
67
68
|
cachedInput: 0.3,
|
68
69
|
input: 3,
|
@@ -82,18 +83,17 @@ const anthropicChatModels: AIChatModelCard[] = [
|
|
82
83
|
},
|
83
84
|
contextWindowTokens: 200_000,
|
84
85
|
description:
|
85
|
-
'Claude 3.5
|
86
|
-
displayName: 'Claude 3.5
|
87
|
-
|
88
|
-
id: 'claude-3-5-haiku-20241022',
|
86
|
+
'Claude 3.5 Sonnet 提供了超越 Opus 的能力和比 Sonnet 更快的速度,同时保持与 Sonnet 相同的价格。Sonnet 特别擅长编程、数据科学、视觉处理、代理任务。',
|
87
|
+
displayName: 'Claude 3.5 Sonnet v2',
|
88
|
+
id: 'claude-3-5-sonnet-20241022',
|
89
89
|
maxOutput: 8192,
|
90
90
|
pricing: {
|
91
|
-
cachedInput: 0.
|
92
|
-
input:
|
93
|
-
output:
|
94
|
-
writeCacheInput:
|
91
|
+
cachedInput: 0.3,
|
92
|
+
input: 3,
|
93
|
+
output: 15,
|
94
|
+
writeCacheInput: 3.75,
|
95
95
|
},
|
96
|
-
releasedAt: '2024-
|
96
|
+
releasedAt: '2024-10-22',
|
97
97
|
settings: {
|
98
98
|
extendParams: ['disableContextCaching'],
|
99
99
|
},
|
@@ -108,8 +108,7 @@ const anthropicChatModels: AIChatModelCard[] = [
|
|
108
108
|
description:
|
109
109
|
'Claude 3.5 Sonnet 提供了超越 Opus 的能力和比 Sonnet 更快的速度,同时保持与 Sonnet 相同的价格。Sonnet 特别擅长编程、数据科学、视觉处理、代理任务。',
|
110
110
|
displayName: 'Claude 3.5 Sonnet',
|
111
|
-
|
112
|
-
id: 'claude-3-5-sonnet-20241022',
|
111
|
+
id: 'claude-3-5-sonnet-20240620',
|
113
112
|
maxOutput: 8192,
|
114
113
|
pricing: {
|
115
114
|
cachedInput: 0.3,
|
@@ -117,7 +116,7 @@ const anthropicChatModels: AIChatModelCard[] = [
|
|
117
116
|
output: 15,
|
118
117
|
writeCacheInput: 3.75,
|
119
118
|
},
|
120
|
-
releasedAt: '2024-
|
119
|
+
releasedAt: '2024-06-20',
|
121
120
|
settings: {
|
122
121
|
extendParams: ['disableContextCaching'],
|
123
122
|
},
|
@@ -130,17 +129,18 @@ const anthropicChatModels: AIChatModelCard[] = [
|
|
130
129
|
},
|
131
130
|
contextWindowTokens: 200_000,
|
132
131
|
description:
|
133
|
-
'Claude 3.5
|
134
|
-
displayName: 'Claude 3.5
|
135
|
-
|
132
|
+
'Claude 3.5 Haiku 是 Anthropic 最快的下一代模型。与 Claude 3 Haiku 相比,Claude 3.5 Haiku 在各项技能上都有所提升,并在许多智力基准测试中超越了上一代最大的模型 Claude 3 Opus。',
|
133
|
+
displayName: 'Claude 3.5 Haiku',
|
134
|
+
enabled: true,
|
135
|
+
id: 'claude-3-5-haiku-20241022',
|
136
136
|
maxOutput: 8192,
|
137
137
|
pricing: {
|
138
|
-
cachedInput: 0.
|
139
|
-
input:
|
140
|
-
output:
|
141
|
-
writeCacheInput:
|
138
|
+
cachedInput: 0.1,
|
139
|
+
input: 1,
|
140
|
+
output: 5,
|
141
|
+
writeCacheInput: 1.25,
|
142
142
|
},
|
143
|
-
releasedAt: '2024-
|
143
|
+
releasedAt: '2024-11-05',
|
144
144
|
settings: {
|
145
145
|
extendParams: ['disableContextCaching'],
|
146
146
|
},
|
@@ -176,7 +176,7 @@ const anthropicChatModels: AIChatModelCard[] = [
|
|
176
176
|
description:
|
177
177
|
'Claude 3 Sonnet 在智能和速度方面为企业工作负载提供了理想的平衡。它以更低的价格提供最大效用,可靠且适合大规模部署。',
|
178
178
|
displayName: 'Claude 3 Sonnet',
|
179
|
-
id: 'claude-3-sonnet-20240229',
|
179
|
+
id: 'claude-3-sonnet-20240229', // 弃用日期 2025年7月21日
|
180
180
|
maxOutput: 4096,
|
181
181
|
pricing: {
|
182
182
|
input: 3,
|
@@ -211,7 +211,7 @@ const anthropicChatModels: AIChatModelCard[] = [
|
|
211
211
|
description:
|
212
212
|
'Claude 2 为企业提供了关键能力的进步,包括业界领先的 200K token 上下文、大幅降低模型幻觉的发生率、系统提示以及一个新的测试功能:工具调用。',
|
213
213
|
displayName: 'Claude 2.1',
|
214
|
-
id: 'claude-2.1',
|
214
|
+
id: 'claude-2.1', // 弃用日期 2025年7月21日
|
215
215
|
maxOutput: 4096,
|
216
216
|
pricing: {
|
217
217
|
input: 8,
|
@@ -225,7 +225,7 @@ const anthropicChatModels: AIChatModelCard[] = [
|
|
225
225
|
description:
|
226
226
|
'Claude 2 为企业提供了关键能力的进步,包括业界领先的 200K token 上下文、大幅降低模型幻觉的发生率、系统提示以及一个新的测试功能:工具调用。',
|
227
227
|
displayName: 'Claude 2.0',
|
228
|
-
id: 'claude-2.0',
|
228
|
+
id: 'claude-2.0', // 弃用日期 2025年7月21日
|
229
229
|
maxOutput: 4096,
|
230
230
|
pricing: {
|
231
231
|
input: 8,
|
@@ -58,8 +58,31 @@ const googleChatModels: AIChatModelCard[] = [
|
|
58
58
|
},
|
59
59
|
contextWindowTokens: 1_048_576 + 65_536,
|
60
60
|
description: 'Gemini 2.5 Flash Preview 是 Google 性价比最高的模型,提供全面的功能。',
|
61
|
-
displayName: 'Gemini 2.5 Flash Preview
|
61
|
+
displayName: 'Gemini 2.5 Flash Preview 05-20',
|
62
62
|
enabled: true,
|
63
|
+
id: 'gemini-2.5-flash-preview-05-20',
|
64
|
+
maxOutput: 65_536,
|
65
|
+
pricing: {
|
66
|
+
input: 0.15,
|
67
|
+
output: 3.5, // Thinking
|
68
|
+
},
|
69
|
+
releasedAt: '2025-05-20',
|
70
|
+
settings: {
|
71
|
+
searchImpl: 'params',
|
72
|
+
searchProvider: 'google',
|
73
|
+
},
|
74
|
+
type: 'chat',
|
75
|
+
},
|
76
|
+
{
|
77
|
+
abilities: {
|
78
|
+
functionCall: true,
|
79
|
+
reasoning: true,
|
80
|
+
search: true,
|
81
|
+
vision: true,
|
82
|
+
},
|
83
|
+
contextWindowTokens: 1_048_576 + 65_536,
|
84
|
+
description: 'Gemini 2.5 Flash Preview 是 Google 性价比最高的模型,提供全面的功能。',
|
85
|
+
displayName: 'Gemini 2.5 Flash Preview 04-17',
|
63
86
|
id: 'gemini-2.5-flash-preview-04-17',
|
64
87
|
maxOutput: 65_536,
|
65
88
|
pricing: {
|
@@ -73,6 +96,28 @@ const googleChatModels: AIChatModelCard[] = [
|
|
73
96
|
},
|
74
97
|
type: 'chat',
|
75
98
|
},
|
99
|
+
{
|
100
|
+
abilities: {
|
101
|
+
functionCall: true,
|
102
|
+
reasoning: true,
|
103
|
+
search: true,
|
104
|
+
vision: true,
|
105
|
+
},
|
106
|
+
contextWindowTokens: 1_048_576 + 65_536,
|
107
|
+
description: 'Gemini 2.5 Flash Preview 是 Google 性价比最高的模型,提供全面的功能。',
|
108
|
+
displayName: 'Gemini 2.5 Flash Preview 04-17 for cursor testing',
|
109
|
+
id: 'gemini-2.5-flash-preview-04-17-thinking',
|
110
|
+
maxOutput: 65_536,
|
111
|
+
pricing: {
|
112
|
+
input: 0.15,
|
113
|
+
output: 3.5, // Thinking
|
114
|
+
},
|
115
|
+
settings: {
|
116
|
+
searchImpl: 'params',
|
117
|
+
searchProvider: 'google',
|
118
|
+
},
|
119
|
+
type: 'chat',
|
120
|
+
},
|
76
121
|
{
|
77
122
|
abilities: {
|
78
123
|
functionCall: true,
|
@@ -368,6 +413,30 @@ const googleChatModels: AIChatModelCard[] = [
|
|
368
413
|
},
|
369
414
|
type: 'chat',
|
370
415
|
},
|
416
|
+
{
|
417
|
+
contextWindowTokens: 131_072 + 8192,
|
418
|
+
displayName: 'Gemma 3 27B',
|
419
|
+
id: 'gemma-3-27b-it',
|
420
|
+
maxOutput: 8192,
|
421
|
+
pricing: {
|
422
|
+
cachedInput: 0,
|
423
|
+
input: 0,
|
424
|
+
output: 0,
|
425
|
+
},
|
426
|
+
type: 'chat',
|
427
|
+
},
|
428
|
+
{
|
429
|
+
contextWindowTokens: 2048 + 8192,
|
430
|
+
displayName: 'Gemma 3n E4B',
|
431
|
+
id: 'gemma-3n-e4b-it',
|
432
|
+
maxOutput: 2048,
|
433
|
+
pricing: {
|
434
|
+
cachedInput: 0,
|
435
|
+
input: 0,
|
436
|
+
output: 0,
|
437
|
+
},
|
438
|
+
type: 'chat',
|
439
|
+
},
|
371
440
|
];
|
372
441
|
|
373
442
|
export const allModels = [...googleChatModels];
|
@@ -231,7 +231,7 @@ const hunyuanChatModels: AIChatModelCard[] = [
|
|
231
231
|
input: 0.8,
|
232
232
|
output: 2,
|
233
233
|
},
|
234
|
-
releasedAt: '2025-
|
234
|
+
releasedAt: '2025-05-20',
|
235
235
|
settings: {
|
236
236
|
searchImpl: 'params',
|
237
237
|
},
|
@@ -302,7 +302,6 @@ const hunyuanChatModels: AIChatModelCard[] = [
|
|
302
302
|
contextWindowTokens: 8000,
|
303
303
|
description: '混元最新多模态模型,支持多语种作答,中英文能力均衡。',
|
304
304
|
displayName: 'Hunyuan Standard Vision',
|
305
|
-
enabled: true,
|
306
305
|
id: 'hunyuan-standard-vision',
|
307
306
|
maxOutput: 2000,
|
308
307
|
releasedAt: '2024-12-31',
|
@@ -363,6 +362,20 @@ const hunyuanChatModels: AIChatModelCard[] = [
|
|
363
362
|
releasedAt: '2025-01-03',
|
364
363
|
type: 'chat',
|
365
364
|
},
|
365
|
+
{
|
366
|
+
abilities: {
|
367
|
+
reasoning: true,
|
368
|
+
vision: true,
|
369
|
+
},
|
370
|
+
contextWindowTokens: 8192 + 24_576,
|
371
|
+
description: '混元多模态理解深度思考模型,支持多模态原生长思维链,擅长处理各种图片推理场景,在理科难题上相比快思考模型全面提升。',
|
372
|
+
displayName: 'Hunyuan T1 Vision',
|
373
|
+
enabled: true,
|
374
|
+
id: 'hunyuan-t1-vision',
|
375
|
+
maxOutput: 8192,
|
376
|
+
releasedAt: '2025-05-16',
|
377
|
+
type: 'chat',
|
378
|
+
},
|
366
379
|
{
|
367
380
|
contextWindowTokens: 8000,
|
368
381
|
description:
|
@@ -1,6 +1,16 @@
|
|
1
1
|
import { AIChatModelCard } from '@/types/aiModel';
|
2
2
|
// https://novita.ai/pricing
|
3
3
|
const novitaChatModels: AIChatModelCard[] = [
|
4
|
+
{
|
5
|
+
contextWindowTokens: 200_000,
|
6
|
+
displayName: 'Claude Opus 4',
|
7
|
+
id: 'pa/cd-op-4-20250514',
|
8
|
+
pricing: {
|
9
|
+
input: 15,
|
10
|
+
output: 75
|
11
|
+
},
|
12
|
+
type: 'chat',
|
13
|
+
},
|
4
14
|
{
|
5
15
|
contextWindowTokens: 32_000,
|
6
16
|
displayName: 'Qwen3 0.6B FP8',
|
@@ -191,12 +201,12 @@ const novitaChatModels: AIChatModelCard[] = [
|
|
191
201
|
type: 'chat',
|
192
202
|
},
|
193
203
|
{
|
194
|
-
contextWindowTokens:
|
204
|
+
contextWindowTokens: 64_000,
|
195
205
|
description: 'Mistral Nemo 是多语言支持和高性能编程的7.3B参数模型。',
|
196
206
|
displayName: 'Mistral Nemo',
|
197
207
|
id: 'mistralai/mistral-nemo',
|
198
208
|
pricing: {
|
199
|
-
input: 0.
|
209
|
+
input: 0.04,
|
200
210
|
output: 0.17,
|
201
211
|
},
|
202
212
|
type: 'chat',
|
@@ -406,16 +416,6 @@ const novitaChatModels: AIChatModelCard[] = [
|
|
406
416
|
},
|
407
417
|
type: 'chat',
|
408
418
|
},
|
409
|
-
{
|
410
|
-
contextWindowTokens: 4096,
|
411
|
-
displayName: 'Airoboros L2 70B',
|
412
|
-
id: 'jondurbin/airoboros-l2-70b',
|
413
|
-
pricing: {
|
414
|
-
input: 0.5,
|
415
|
-
output: 0.5,
|
416
|
-
},
|
417
|
-
type: 'chat',
|
418
|
-
},
|
419
419
|
{
|
420
420
|
contextWindowTokens: 4096,
|
421
421
|
displayName: 'Midnight Rose 70B',
|
@@ -130,7 +130,7 @@ describe('LobeAnthropicAI', () => {
|
|
130
130
|
// Assert
|
131
131
|
expect(instance['client'].messages.create).toHaveBeenCalledWith(
|
132
132
|
{
|
133
|
-
max_tokens:
|
133
|
+
max_tokens: 64000,
|
134
134
|
messages: [
|
135
135
|
{
|
136
136
|
content: [{ cache_control: { type: 'ephemeral' }, text: 'Hello', type: 'text' }],
|
@@ -147,8 +147,13 @@ describe('LobeAnthropicAI', () => {
|
|
147
147
|
},
|
148
148
|
],
|
149
149
|
temperature: 0,
|
150
|
+
metadata: undefined,
|
151
|
+
tools: undefined,
|
152
|
+
top_p: undefined,
|
153
|
+
},
|
154
|
+
{
|
155
|
+
signal: undefined,
|
150
156
|
},
|
151
|
-
{},
|
152
157
|
);
|
153
158
|
expect(result).toBeInstanceOf(Response);
|
154
159
|
});
|
@@ -617,7 +622,7 @@ describe('LobeAnthropicAI', () => {
|
|
617
622
|
const result = await instance['buildAnthropicPayload'](payload);
|
618
623
|
|
619
624
|
expect(result).toEqual({
|
620
|
-
max_tokens:
|
625
|
+
max_tokens: 4096,
|
621
626
|
messages: [
|
622
627
|
{
|
623
628
|
content: [
|
@@ -627,7 +632,9 @@ describe('LobeAnthropicAI', () => {
|
|
627
632
|
},
|
628
633
|
],
|
629
634
|
model: 'claude-3-haiku-20240307',
|
630
|
-
|
635
|
+
system: undefined,
|
636
|
+
thinking: { type: 'enabled', budget_tokens: 1024 },
|
637
|
+
tools: undefined,
|
631
638
|
});
|
632
639
|
});
|
633
640
|
|
@@ -653,7 +660,9 @@ describe('LobeAnthropicAI', () => {
|
|
653
660
|
},
|
654
661
|
],
|
655
662
|
model: 'claude-3-haiku-20240307',
|
656
|
-
|
663
|
+
system: undefined,
|
664
|
+
thinking: { type: 'enabled', budget_tokens: 1024 },
|
665
|
+
tools: undefined,
|
657
666
|
});
|
658
667
|
});
|
659
668
|
|
@@ -669,7 +678,7 @@ describe('LobeAnthropicAI', () => {
|
|
669
678
|
const result = await instance['buildAnthropicPayload'](payload);
|
670
679
|
|
671
680
|
expect(result).toEqual({
|
672
|
-
max_tokens:
|
681
|
+
max_tokens: 1000,
|
673
682
|
messages: [
|
674
683
|
{
|
675
684
|
content: [
|
@@ -679,7 +688,9 @@ describe('LobeAnthropicAI', () => {
|
|
679
688
|
},
|
680
689
|
],
|
681
690
|
model: 'claude-3-haiku-20240307',
|
682
|
-
|
691
|
+
system: undefined,
|
692
|
+
thinking: { type: 'enabled', budget_tokens: 999 },
|
693
|
+
tools: undefined,
|
683
694
|
});
|
684
695
|
});
|
685
696
|
|
@@ -695,7 +706,7 @@ describe('LobeAnthropicAI', () => {
|
|
695
706
|
const result = await instance['buildAnthropicPayload'](payload);
|
696
707
|
|
697
708
|
expect(result).toEqual({
|
698
|
-
max_tokens:
|
709
|
+
max_tokens: 10000,
|
699
710
|
messages: [
|
700
711
|
{
|
701
712
|
content: [
|
@@ -705,7 +716,9 @@ describe('LobeAnthropicAI', () => {
|
|
705
716
|
},
|
706
717
|
],
|
707
718
|
model: 'claude-3-haiku-20240307',
|
708
|
-
|
719
|
+
system: undefined,
|
720
|
+
thinking: { type: 'enabled', budget_tokens: 9999 },
|
721
|
+
tools: undefined,
|
709
722
|
});
|
710
723
|
});
|
711
724
|
|
@@ -730,7 +743,7 @@ describe('LobeAnthropicAI', () => {
|
|
730
743
|
|
731
744
|
const result = await instance['buildAnthropicPayload'](payload);
|
732
745
|
|
733
|
-
expect(result.max_tokens).toBe(
|
746
|
+
expect(result.max_tokens).toBe(4096);
|
734
747
|
});
|
735
748
|
|
736
749
|
it('should respect max_tokens when explicitly provided', async () => {
|
@@ -100,6 +100,18 @@ export class LobeAnthropicAI implements LobeRuntimeAI {
|
|
100
100
|
thinking,
|
101
101
|
enabledContextCaching = true,
|
102
102
|
} = payload;
|
103
|
+
|
104
|
+
const { default: anthropicModels } = await import('@/config/aiModels/anthropic');
|
105
|
+
const modelConfig = anthropicModels.find(m => m.id === model);
|
106
|
+
const defaultMaxOutput = modelConfig?.maxOutput;
|
107
|
+
|
108
|
+
// 配置优先级:用户设置 > 模型配置 > 硬编码默认值
|
109
|
+
const getMaxTokens = () => {
|
110
|
+
if (max_tokens) return max_tokens;
|
111
|
+
if (defaultMaxOutput) return defaultMaxOutput;
|
112
|
+
return undefined;
|
113
|
+
};
|
114
|
+
|
103
115
|
const system_message = messages.find((m) => m.role === 'system');
|
104
116
|
const user_messages = messages.filter((m) => m.role !== 'system');
|
105
117
|
|
@@ -118,12 +130,7 @@ export class LobeAnthropicAI implements LobeRuntimeAI {
|
|
118
130
|
const postTools = buildAnthropicTools(tools, { enabledContextCaching });
|
119
131
|
|
120
132
|
if (!!thinking && thinking.type === 'enabled') {
|
121
|
-
|
122
|
-
const maxTokens = !!max_tokens
|
123
|
-
? thinking?.budget_tokens && thinking?.budget_tokens > max_tokens
|
124
|
-
? Math.min(thinking?.budget_tokens + max_tokens, 64_000)
|
125
|
-
: max_tokens
|
126
|
-
: 64_000;
|
133
|
+
const maxTokens = getMaxTokens() || 32_000; // Claude Opus 4 has minimum maxOutput
|
127
134
|
|
128
135
|
// `temperature` may only be set to 1 when thinking is enabled.
|
129
136
|
// `top_p` must be unset when thinking is enabled.
|
@@ -132,7 +139,12 @@ export class LobeAnthropicAI implements LobeRuntimeAI {
|
|
132
139
|
messages: postMessages,
|
133
140
|
model,
|
134
141
|
system: systemPrompts,
|
135
|
-
thinking
|
142
|
+
thinking: {
|
143
|
+
...thinking,
|
144
|
+
budget_tokens: thinking?.budget_tokens
|
145
|
+
? Math.min(thinking.budget_tokens, maxTokens - 1) // `max_tokens` must be greater than `thinking.budget_tokens`.
|
146
|
+
: 1024,
|
147
|
+
},
|
136
148
|
tools: postTools,
|
137
149
|
} satisfies Anthropic.MessageCreateParams;
|
138
150
|
}
|
@@ -140,7 +152,7 @@ export class LobeAnthropicAI implements LobeRuntimeAI {
|
|
140
152
|
return {
|
141
153
|
// claude 3 series model hax max output token of 4096, 3.x series has 8192
|
142
154
|
// https://docs.anthropic.com/en/docs/about-claude/models/all-models#:~:text=200K-,Max%20output,-Normal%3A
|
143
|
-
max_tokens:
|
155
|
+
max_tokens: getMaxTokens() || (modelsWithSmallContextWindow.has(model) ? 4096 : 8192),
|
144
156
|
messages: postMessages,
|
145
157
|
model,
|
146
158
|
system: systemPrompts,
|
@@ -45,6 +45,11 @@ const modelsDisableInstuction = new Set([
|
|
45
45
|
'gemini-2.0-flash-exp',
|
46
46
|
'gemini-2.0-flash-exp-image-generation',
|
47
47
|
'gemini-2.0-flash-preview-image-generation',
|
48
|
+
'gemma-3-1b-it',
|
49
|
+
'gemma-3-4b-it',
|
50
|
+
'gemma-3-12b-it',
|
51
|
+
'gemma-3-27b-it',
|
52
|
+
'gemma-3n-e4b-it',
|
48
53
|
]);
|
49
54
|
|
50
55
|
export interface GoogleModelCard {
|
@@ -256,7 +256,7 @@ export const createOIDCProvider = async (db: LobeChatDatabase): Promise<Provider
|
|
256
256
|
|
257
257
|
// 8. 令牌有效期
|
258
258
|
ttl: {
|
259
|
-
AccessToken:
|
259
|
+
AccessToken: 7 * 24 * 60 * 60, // 1 week temporarily,need to revert 1 hour with better implement
|
260
260
|
AuthorizationCode: 600, // 10 minutes
|
261
261
|
DeviceCode: 600, // 10 minutes (if enabled)
|
262
262
|
|