Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

💄 style: update models for Longcat, support api fetch model list (#15134)

Zhijie Hee98ad7edca34
diff --git a/packages/model-bank/src/aiModels/longcat.ts b/packages/model-bank/src/aiModels/longcat.ts
index 76a168e80b2..957cabe7889 100644
--- a/packages/model-bank/src/aiModels/longcat.ts
+++ b/packages/model-bank/src/aiModels/longcat.ts
@@ -11,6 +11,7 @@ const longcatModels: AIChatModelCard[] = [
displayName: 'LongCat-2.0-Preview',
enabled: true,
family: 'longcat',
+ generation: 'longcat-2.0',
id: 'LongCat-2.0-Preview',
maxOutput: 128_000,
pricing: {
@@ -22,91 +23,6 @@ const longcatModels: AIChatModelCard[] = [
releasedAt: '2026-04-20',
type: 'chat',
},
- {
- abilities: {
- functionCall: true,
- },
- contextWindowTokens: 327_680,
- description:
- 'The LongCat-Flash-Lite model has been officially released. It adopts an efficient Mixture-of-Experts (MoE) architecture, with 68.5 billion total parameters and approximately 3 billion activated parameters. Through the use of an N-gram embedding table, it achieves highly efficient parameter utilization, and it is deeply optimized for inference efficiency and specific application scenarios. Compared to models of a similar scale, its core features are as follows:Outstanding Inference Efficiency: By leveraging the N-gram embedding table to fundamentally alleviate the I/O bottleneck inherent in MoE architectures, combined with dedicated caching mechanisms and kernel-level optimizations, it significantly reduces inference latency and improves overall efficiency. Strong Agent and Code Performance: It demonstrates highly competitive capabilities in tool invocation and software development tasks, delivering exceptional performance relative to its model size.',
- displayName: 'LongCat-Flash-Lite',
- enabled: true,
- family: 'longcat',
- id: 'LongCat-Flash-Lite',
- maxOutput: 262_144,
- pricing: {
- units: [
- { name: 'textInput', rate: 0, strategy: 'fixed', unit: 'millionTokens' },
- { name: 'textOutput', rate: 0, strategy: 'fixed', unit: 'millionTokens' },
- ],
- },
- releasedAt: '2026-02-05',
- type: 'chat',
- },
- {
- abilities: {
- functionCall: true,
- reasoning: true,
- },
- contextWindowTokens: 262_144,
- description:
- 'To ensure you receive top-tier reasoning performance, the LongCat API platform has unified and upgraded calls to the LongCat-Flash-Thinking model. All existing requests using `model=LongCat-Flash-Thinking` will be automatically routed to the latest version, LongCat-Flash-Thinking-2601, with no code changes required.',
- displayName: 'LongCat-Flash-Thinking',
- enabled: true,
- family: 'longcat',
- id: 'LongCat-Flash-Thinking',
- maxOutput: 262_144,
- pricing: {
- units: [
- { name: 'textInput', rate: 0, strategy: 'fixed', unit: 'millionTokens' },
- { name: 'textOutput', rate: 0, strategy: 'fixed', unit: 'millionTokens' },
- ],
- },
- releasedAt: '2026-01-14',
- type: 'chat',
- },
- {
- abilities: {
- functionCall: true,
- reasoning: true,
- },
- contextWindowTokens: 262_144,
- description:
- 'The LongCat-Flash-Thinking-2601 model has been officially released. As an upgraded reasoning model built on a Mixture-of-Experts (MoE) architecture, it features a total of 560 billion parameters. While maintaining strong competitiveness across traditional reasoning benchmarks, it systematically enhances Agent-level reasoning capabilities through large-scale multi-environment reinforcement learning. Compared to the LongCat-Flash-Thinking model, the key upgrades are as follows: Extreme Robustness in Noisy Environments: Through systematic curriculum-style training targeting noise and uncertainty in real-world settings, the model demonstrates outstanding performance in Agent tool invocation, Agent-based search, and tool-integrated reasoning, with significantly improved generalization. Powerful Agent Capabilities: By constructing a tightly coupled dependency graph encompassing more than 60 tools, and scaling training through multi-environment expansion and large-scale exploratory learning, the model markedly improves its ability to generalize to complex and out-of-distribution real-world scenarios. Advanced Deep Thinking Mode: It expands the breadth of reasoning via parallel inference and deepens analytical capability through recursive feedback-driven summarization and abstraction mechanisms, effectively addressing highly challenging problems.',
- displayName: 'LongCat-Flash-Thinking-2601',
- family: 'longcat',
- id: 'LongCat-Flash-Thinking-2601',
- maxOutput: 262_144,
- pricing: {
- units: [
- { name: 'textInput', rate: 0, strategy: 'fixed', unit: 'millionTokens' },
- { name: 'textOutput', rate: 0, strategy: 'fixed', unit: 'millionTokens' },
- ],
- },
- releasedAt: '2026-01-14',
- type: 'chat',
- },
- {
- abilities: {
- functionCall: true,
- },
- contextWindowTokens: 262_144,
- description:
- 'The LongCat-Flash-Chat model has been upgraded to a new version. This update involves enhancements to model capabilities only; the model name and API invocation method remain unchanged. Building upon its hallmark “extreme efficiency” and “lightning-fast response,” the new version further strengthens contextual understanding and real-world programming performance: Significantly Enhanced Coding Capabilities: Deeply optimized for developer-centric scenarios, the model delivers substantial improvements in code generation, debugging, and explanation tasks. Developers are strongly encouraged to evaluate and benchmark these enhancements. Support for 256K Ultra-Long Context: The context window has doubled from the previous generation (128K) to 256K, enabling efficient processing of massive documents and long-sequence tasks. Comprehensively Improved Multilingual Performance: Provides strong support for nine languages, including Spanish, French, Arabic, Portuguese, Russian, and Indonesian. More Powerful Agent Capabilities: Demonstrates greater robustness and efficiency in complex tool invocation and multi-step task execution.',
- displayName: 'LongCat-Flash-Chat',
- enabled: true,
- family: 'longcat',
- id: 'LongCat-Flash-Chat',
- maxOutput: 262_144,
- pricing: {
- units: [
- { name: 'textInput', rate: 0, strategy: 'fixed', unit: 'millionTokens' },
- { name: 'textOutput', rate: 0, strategy: 'fixed', unit: 'millionTokens' },
- ],
- },
- releasedAt: '2025-12-12',
- type: 'chat',
- },
];
export const allModels = [...longcatModels];
diff --git a/packages/model-bank/src/modelProviders/longcat.ts b/packages/model-bank/src/modelProviders/longcat.ts
index 29b6d65a4c2..e05c2d178df 100644
--- a/packages/model-bank/src/modelProviders/longcat.ts
+++ b/packages/model-bank/src/modelProviders/longcat.ts
@@ -2,7 +2,7 @@ import { type ModelProviderCard } from '@/types/llm';
const LongCat: ModelProviderCard = {
chatModels: [],
- checkModel: 'LongCat-Flash-Lite',
+ checkModel: 'LongCat-2.0-Preview',
description:
'LongCat is a series of generative AI large models independently developed by Meituan. It is designed to enhance internal enterprise productivity and enable innovative applications through an efficient computational architecture and strong multimodal capabilities.',
id: 'longcat',
@@ -14,7 +14,7 @@ const LongCat: ModelProviderCard = {
placeholder: 'https://api.longcat.chat/openai/v1',
},
sdkType: 'openai',
- showModelFetcher: false,
+ showModelFetcher: true,
},
url: 'https://longcat.chat/platform/usage',
};
diff --git a/packages/model-runtime/src/providers/longcat/index.ts b/packages/model-runtime/src/providers/longcat/index.ts
index a3fd9ea7cef..f152c5f4d5a 100644
--- a/packages/model-runtime/src/providers/longcat/index.ts
+++ b/packages/model-runtime/src/providers/longcat/index.ts
@@ -2,6 +2,11 @@ import { longcat as longchatCahtModels, ModelProvider } from 'model-bank';
import { createOpenAICompatibleRuntime } from '../../core/openaiCompatibleFactory';
import { getModelMaxOutputs } from '../../utils/getModelMaxOutputs';
+import { MODEL_LIST_CONFIGS, processModelList } from '../../utils/modelParse';
+
+export interface LongCatModelCard {
+ id: string;
+}
export const LobeLongCatAI = createOpenAICompatibleRuntime({
baseURL: 'https://api.longcat.chat/openai/v1',
@@ -24,5 +29,14 @@ export const LobeLongCatAI = createOpenAICompatibleRuntime({
debug: {
chatCompletion: () => process.env.DEBUG_LONGCAT_CHAT_COMPLETION === '1',
},
+ models: async ({ client }) => {
+ const modelsPage = (await client.models.list()) as any;
+ const modelList: LongCatModelCard[] = modelsPage.data;
+
+ const standardModelList = modelList.map((model) => ({
+ id: model.id,
+ }));
+ return processModelList(standardModelList, MODEL_LIST_CONFIGS.longcat, 'longcat');
+ },
provider: ModelProvider.LongCat,
});
diff --git a/packages/model-runtime/src/utils/modelParse.ts b/packages/model-runtime/src/utils/modelParse.ts
index 03c6240e5df..c20fdada41d 100644
--- a/packages/model-runtime/src/utils/modelParse.ts
+++ b/packages/model-runtime/src/utils/modelParse.ts
@@ -69,7 +69,7 @@ export const MODEL_LIST_CONFIGS = {
longcat: {
functionCallKeywords: ['longcat'],
reasoningKeywords: ['thinking'],
- visionKeywords: [],
+ visionKeywords: ['omni'],
},
minimax: {
functionCallKeywords: ['minimax'],