@lobehub/chat 1.113.2 → 1.114.0
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 +51 -0
- package/changelog/v1.json +14 -0
- package/package.json +1 -1
- package/packages/const/src/models.ts +0 -2
- package/packages/model-runtime/src/RouterRuntime/baseRuntimeMap.ts +2 -0
- package/packages/model-runtime/src/RouterRuntime/createRuntime.ts +10 -5
- package/packages/model-runtime/src/aihubmix/index.ts +7 -0
- package/packages/model-runtime/src/openai/__snapshots__/index.test.ts.snap +29 -0
- package/packages/model-runtime/src/openai/index.ts +14 -2
- package/packages/model-runtime/src/utils/modelParse.ts +28 -14
- package/packages/model-runtime/src/utils/openaiHelpers.ts +7 -2
- package/packages/types/src/aiModel.ts +2 -2
- package/packages/types/src/llm.ts +3 -0
- package/src/app/[variants]/(main)/settings/provider/(detail)/[id]/index.tsx +5 -0
- package/src/app/[variants]/(main)/settings/provider/features/ProviderConfig/index.tsx +2 -4
- package/src/config/aiModels/fal.ts +26 -1
- package/src/config/aiModels/groq.ts +2 -2
- package/src/config/aiModels/qwen.ts +78 -14
- package/src/config/aiModels/siliconcloud.ts +21 -0
- package/src/services/discover.ts +6 -1
- package/src/store/aiInfra/slices/aiProvider/__tests__/action.test.ts +8 -2
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,57 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
## [Version 1.114.0](https://github.com/lobehub/lobe-chat/compare/v1.113.3...v1.114.0)
|
6
|
+
|
7
|
+
<sup>Released on **2025-08-19**</sup>
|
8
|
+
|
9
|
+
#### ✨ Features
|
10
|
+
|
11
|
+
- **models**: Add Qwen Image Edit model.
|
12
|
+
|
13
|
+
<br/>
|
14
|
+
|
15
|
+
<details>
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
17
|
+
|
18
|
+
#### What's improved
|
19
|
+
|
20
|
+
- **models**: Add Qwen Image Edit model, closes [#8851](https://github.com/lobehub/lobe-chat/issues/8851) ([4d7a060](https://github.com/lobehub/lobe-chat/commit/4d7a060))
|
21
|
+
|
22
|
+
</details>
|
23
|
+
|
24
|
+
<div align="right">
|
25
|
+
|
26
|
+
[](#readme-top)
|
27
|
+
|
28
|
+
</div>
|
29
|
+
|
30
|
+
### [Version 1.113.3](https://github.com/lobehub/lobe-chat/compare/v1.113.2...v1.113.3)
|
31
|
+
|
32
|
+
<sup>Released on **2025-08-19**</sup>
|
33
|
+
|
34
|
+
#### 🐛 Bug Fixes
|
35
|
+
|
36
|
+
- **misc**: Support Grok thinking models in AiHubMix, The 'stream_options' parameter is only allowed when 'stream' is enabled.
|
37
|
+
|
38
|
+
<br/>
|
39
|
+
|
40
|
+
<details>
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
42
|
+
|
43
|
+
#### What's fixed
|
44
|
+
|
45
|
+
- **misc**: Support Grok thinking models in AiHubMix, closes [#8713](https://github.com/lobehub/lobe-chat/issues/8713) ([ffa9b1b](https://github.com/lobehub/lobe-chat/commit/ffa9b1b))
|
46
|
+
- **misc**: The 'stream_options' parameter is only allowed when 'stream' is enabled, closes [#8778](https://github.com/lobehub/lobe-chat/issues/8778) ([fcc32d5](https://github.com/lobehub/lobe-chat/commit/fcc32d5))
|
47
|
+
|
48
|
+
</details>
|
49
|
+
|
50
|
+
<div align="right">
|
51
|
+
|
52
|
+
[](#readme-top)
|
53
|
+
|
54
|
+
</div>
|
55
|
+
|
5
56
|
### [Version 1.113.2](https://github.com/lobehub/lobe-chat/compare/v1.113.1...v1.113.2)
|
6
57
|
|
7
58
|
<sup>Released on **2025-08-18**</sup>
|
package/changelog/v1.json
CHANGED
@@ -1,4 +1,18 @@
|
|
1
1
|
[
|
2
|
+
{
|
3
|
+
"children": {},
|
4
|
+
"date": "2025-08-19",
|
5
|
+
"version": "1.114.0"
|
6
|
+
},
|
7
|
+
{
|
8
|
+
"children": {
|
9
|
+
"fixes": [
|
10
|
+
"Support Grok thinking models in AiHubMix, The 'stream_options' parameter is only allowed when 'stream' is enabled."
|
11
|
+
]
|
12
|
+
},
|
13
|
+
"date": "2025-08-19",
|
14
|
+
"version": "1.113.3"
|
15
|
+
},
|
2
16
|
{
|
3
17
|
"children": {},
|
4
18
|
"date": "2025-08-18",
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.114.0",
|
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",
|
@@ -4,6 +4,7 @@ import { LobeCloudflareAI } from '../cloudflare';
|
|
4
4
|
import { LobeFalAI } from '../fal';
|
5
5
|
import { LobeGoogleAI } from '../google';
|
6
6
|
import { LobeOpenAI } from '../openai';
|
7
|
+
import { LobeXAI } from '../xai';
|
7
8
|
|
8
9
|
export const baseRuntimeMap = {
|
9
10
|
anthropic: LobeAnthropicAI,
|
@@ -12,4 +13,5 @@ export const baseRuntimeMap = {
|
|
12
13
|
fal: LobeFalAI,
|
13
14
|
google: LobeGoogleAI,
|
14
15
|
openai: LobeOpenAI,
|
16
|
+
xai: LobeXAI,
|
15
17
|
};
|
@@ -195,6 +195,11 @@ export const createRouterRuntime = ({
|
|
195
195
|
}
|
196
196
|
}
|
197
197
|
|
198
|
+
async createImage(payload: CreateImagePayload) {
|
199
|
+
const runtime = await this.getRuntimeByModel(payload.model);
|
200
|
+
return runtime.createImage!(payload);
|
201
|
+
}
|
202
|
+
|
198
203
|
async textToImage(payload: TextToImagePayload) {
|
199
204
|
const runtime = await this.getRuntimeByModel(payload.model);
|
200
205
|
|
@@ -203,12 +208,12 @@ export const createRouterRuntime = ({
|
|
203
208
|
|
204
209
|
async models() {
|
205
210
|
if (models && typeof models === 'function') {
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
}
|
211
|
+
// 如果是函数式配置,使用最后一个 runtime 的 client 调用函数
|
212
|
+
const lastRuntime = this._runtimes.at(-1)?.runtime;
|
213
|
+
if (lastRuntime && 'client' in lastRuntime) {
|
214
|
+
return await models({ client: (lastRuntime as any).client });
|
211
215
|
}
|
216
|
+
}
|
212
217
|
return this._runtimes.at(-1)?.runtime.models?.();
|
213
218
|
}
|
214
219
|
|
@@ -65,6 +65,13 @@ export const LobeAiHubMixAI = createRouterRuntime({
|
|
65
65
|
),
|
66
66
|
options: { baseURL: urlJoin(baseURL, '/gemini') },
|
67
67
|
},
|
68
|
+
{
|
69
|
+
apiType: 'xai',
|
70
|
+
models: LOBE_DEFAULT_MODEL_LIST.map((m) => m.id).filter(
|
71
|
+
(id) => detectModelProvider(id) === 'xai',
|
72
|
+
),
|
73
|
+
options: { baseURL: urlJoin(baseURL, '/v1') },
|
74
|
+
},
|
68
75
|
{
|
69
76
|
apiType: 'openai',
|
70
77
|
options: {
|
@@ -49,6 +49,22 @@ exports[`LobeOpenAI > models > should get models 1`] = `
|
|
49
49
|
"functionCall": false,
|
50
50
|
"id": "dall-e-2",
|
51
51
|
"maxOutput": undefined,
|
52
|
+
"parameters": {
|
53
|
+
"imageUrl": {
|
54
|
+
"default": null,
|
55
|
+
},
|
56
|
+
"prompt": {
|
57
|
+
"default": "",
|
58
|
+
},
|
59
|
+
"size": {
|
60
|
+
"default": "1024x1024",
|
61
|
+
"enum": [
|
62
|
+
"256x256",
|
63
|
+
"512x512",
|
64
|
+
"1024x1024",
|
65
|
+
],
|
66
|
+
},
|
67
|
+
},
|
52
68
|
"reasoning": false,
|
53
69
|
"releasedAt": "2023-11-01",
|
54
70
|
"type": "image",
|
@@ -231,6 +247,19 @@ exports[`LobeOpenAI > models > should get models 1`] = `
|
|
231
247
|
"functionCall": false,
|
232
248
|
"id": "dall-e-3",
|
233
249
|
"maxOutput": undefined,
|
250
|
+
"parameters": {
|
251
|
+
"prompt": {
|
252
|
+
"default": "",
|
253
|
+
},
|
254
|
+
"size": {
|
255
|
+
"default": "1024x1024",
|
256
|
+
"enum": [
|
257
|
+
"1024x1024",
|
258
|
+
"1792x1024",
|
259
|
+
"1024x1792",
|
260
|
+
],
|
261
|
+
},
|
262
|
+
},
|
234
263
|
"reasoning": false,
|
235
264
|
"releasedAt": "2023-10-31",
|
236
265
|
"type": "image",
|
@@ -11,6 +11,16 @@ export interface OpenAIModelCard {
|
|
11
11
|
|
12
12
|
const prunePrefixes = ['o1', 'o3', 'o4', 'codex', 'computer-use', 'gpt-5'];
|
13
13
|
const oaiSearchContextSize = process.env.OPENAI_SEARCH_CONTEXT_SIZE; // low, medium, high
|
14
|
+
const enableServiceTierFlex = process.env.OPENAI_SERVICE_TIER_FLEX === '1';
|
15
|
+
const flexSupportedModels = ['gpt-5', 'o3', 'o4-mini']; // Flex 处理仅适用于这些模型
|
16
|
+
|
17
|
+
const supportsFlexTier = (model: string) => {
|
18
|
+
// 排除 o3-mini,其不支持 Flex 处理
|
19
|
+
if (model.startsWith('o3-mini')) {
|
20
|
+
return false;
|
21
|
+
}
|
22
|
+
return flexSupportedModels.some(supportedModel => model.startsWith(supportedModel));
|
23
|
+
};
|
14
24
|
|
15
25
|
export const LobeOpenAI = createOpenAICompatibleRuntime({
|
16
26
|
baseURL: 'https://api.openai.com/v1',
|
@@ -32,6 +42,7 @@ export const LobeOpenAI = createOpenAICompatibleRuntime({
|
|
32
42
|
frequency_penalty: undefined,
|
33
43
|
model,
|
34
44
|
presence_penalty: undefined,
|
45
|
+
...(enableServiceTierFlex && supportsFlexTier(model) && { service_tier: 'flex' }),
|
35
46
|
stream: payload.stream ?? true,
|
36
47
|
temperature: undefined,
|
37
48
|
top_p: undefined,
|
@@ -43,7 +54,7 @@ export const LobeOpenAI = createOpenAICompatibleRuntime({
|
|
43
54
|
} as any;
|
44
55
|
}
|
45
56
|
|
46
|
-
return { ...rest, model, stream: payload.stream ?? true };
|
57
|
+
return { ...rest, model, ...(enableServiceTierFlex && supportsFlexTier(model) && { service_tier: 'flex' }), stream: payload.stream ?? true };
|
47
58
|
},
|
48
59
|
},
|
49
60
|
debug: {
|
@@ -81,6 +92,7 @@ export const LobeOpenAI = createOpenAICompatibleRuntime({
|
|
81
92
|
reasoning: payload.reasoning
|
82
93
|
? { ...payload.reasoning, summary: 'auto' }
|
83
94
|
: { summary: 'auto' },
|
95
|
+
...(enableServiceTierFlex && supportsFlexTier(model) && { service_tier: 'flex' }),
|
84
96
|
stream: payload.stream ?? true,
|
85
97
|
tools: openaiTools as any,
|
86
98
|
// computer-use series must set truncation as auto
|
@@ -91,7 +103,7 @@ export const LobeOpenAI = createOpenAICompatibleRuntime({
|
|
91
103
|
}) as any;
|
92
104
|
}
|
93
105
|
|
94
|
-
return { ...rest, model, stream: payload.stream ?? true, tools: openaiTools } as any;
|
106
|
+
return { ...rest, model, ...(enableServiceTierFlex && supportsFlexTier(model) && { service_tier: 'flex' }), stream: payload.stream ?? true, tools: openaiTools } as any;
|
95
107
|
},
|
96
108
|
},
|
97
109
|
});
|
@@ -85,7 +85,7 @@ export const MODEL_LIST_CONFIGS = {
|
|
85
85
|
export const PROVIDER_DETECTION_CONFIG = {
|
86
86
|
anthropic: ['claude'],
|
87
87
|
deepseek: ['deepseek'],
|
88
|
-
google: ['gemini'],
|
88
|
+
google: ['gemini', 'imagen'],
|
89
89
|
llama: ['llama', 'llava'],
|
90
90
|
moonshot: ['moonshot', 'kimi'],
|
91
91
|
openai: ['o1', 'o3', 'o4', 'gpt-'],
|
@@ -251,7 +251,7 @@ const processModelCard = (
|
|
251
251
|
model: { [key: string]: any; id: string },
|
252
252
|
config: ModelProcessorConfig,
|
253
253
|
knownModel?: any,
|
254
|
-
): ChatModelCard => {
|
254
|
+
): ChatModelCard | undefined => {
|
255
255
|
const {
|
256
256
|
functionCallKeywords = [],
|
257
257
|
visionKeywords = [],
|
@@ -260,6 +260,20 @@ const processModelCard = (
|
|
260
260
|
} = config;
|
261
261
|
|
262
262
|
const isExcludedModel = isKeywordListMatch(model.id.toLowerCase(), excludeKeywords);
|
263
|
+
const modelType =
|
264
|
+
model.type ||
|
265
|
+
knownModel?.type ||
|
266
|
+
(isKeywordListMatch(
|
267
|
+
model.id.toLowerCase(),
|
268
|
+
IMAGE_MODEL_KEYWORDS.map((k) => k.toLowerCase()),
|
269
|
+
)
|
270
|
+
? 'image'
|
271
|
+
: 'chat');
|
272
|
+
|
273
|
+
// image model can't find parameters
|
274
|
+
if (modelType === 'image' && !model.parameters && !knownModel?.parameters) {
|
275
|
+
return undefined;
|
276
|
+
}
|
263
277
|
|
264
278
|
return {
|
265
279
|
contextWindowTokens: model.contextWindowTokens ?? knownModel?.contextWindowTokens ?? undefined,
|
@@ -281,15 +295,11 @@ const processModelCard = (
|
|
281
295
|
knownModel?.abilities?.reasoning ??
|
282
296
|
(isKeywordListMatch(model.id.toLowerCase(), reasoningKeywords) || false),
|
283
297
|
releasedAt: processReleasedAt(model, knownModel),
|
284
|
-
type:
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
IMAGE_MODEL_KEYWORDS.map((k) => k.toLowerCase()),
|
290
|
-
)
|
291
|
-
? 'image'
|
292
|
-
: 'chat'),
|
298
|
+
type: modelType,
|
299
|
+
// current, only image model use the parameters field
|
300
|
+
...(modelType === 'image' && {
|
301
|
+
parameters: model.parameters ?? knownModel?.parameters,
|
302
|
+
}),
|
293
303
|
vision:
|
294
304
|
model.vision ??
|
295
305
|
knownModel?.abilities?.vision ??
|
@@ -329,7 +339,7 @@ export const processModelList = async (
|
|
329
339
|
|
330
340
|
return processModelCard(model, config, knownModel);
|
331
341
|
}),
|
332
|
-
).then((results) => results.filter(
|
342
|
+
).then((results) => results.filter((result) => !!result));
|
333
343
|
};
|
334
344
|
|
335
345
|
/**
|
@@ -381,11 +391,15 @@ export const processMultiProviderModelList = async (
|
|
381
391
|
const processedModel = processModelCard(model, config, knownModel);
|
382
392
|
|
383
393
|
// 如果找到了本地配置中的模型,使用其 enabled 状态
|
384
|
-
if (
|
394
|
+
if (
|
395
|
+
processedModel &&
|
396
|
+
providerLocalModelConfig &&
|
397
|
+
typeof providerLocalModelConfig.enabled === 'boolean'
|
398
|
+
) {
|
385
399
|
processedModel.enabled = providerLocalModelConfig.enabled;
|
386
400
|
}
|
387
401
|
|
388
402
|
return processedModel;
|
389
403
|
}),
|
390
|
-
).then((results) => results.filter(
|
404
|
+
).then((results) => results.filter((result) => !!result));
|
391
405
|
};
|
@@ -101,8 +101,11 @@ export const convertOpenAIResponseInputs = async (
|
|
101
101
|
};
|
102
102
|
|
103
103
|
export const pruneReasoningPayload = (payload: ChatStreamPayload) => {
|
104
|
+
const shouldStream = !disableStreamModels.has(payload.model);
|
105
|
+
const { stream_options, ...cleanedPayload } = payload as any;
|
106
|
+
|
104
107
|
return {
|
105
|
-
...
|
108
|
+
...cleanedPayload,
|
106
109
|
frequency_penalty: 0,
|
107
110
|
messages: payload.messages.map((message: OpenAIChatMessage) => ({
|
108
111
|
...message,
|
@@ -114,7 +117,9 @@ export const pruneReasoningPayload = (payload: ChatStreamPayload) => {
|
|
114
117
|
: message.role,
|
115
118
|
})),
|
116
119
|
presence_penalty: 0,
|
117
|
-
stream:
|
120
|
+
stream: shouldStream,
|
121
|
+
// Only include stream_options when stream is enabled
|
122
|
+
...(shouldStream && stream_options && { stream_options }),
|
118
123
|
temperature: 1,
|
119
124
|
top_p: 1,
|
120
125
|
};
|
@@ -326,7 +326,7 @@ export interface AiProviderModelListItem {
|
|
326
326
|
displayName?: string;
|
327
327
|
enabled: boolean;
|
328
328
|
id: string;
|
329
|
-
parameters?:
|
329
|
+
parameters?: ModelParamsSchema;
|
330
330
|
pricing?: Pricing;
|
331
331
|
releasedAt?: string;
|
332
332
|
settings?: AiModelSettings;
|
@@ -378,7 +378,7 @@ export interface EnabledAiModel {
|
|
378
378
|
displayName?: string;
|
379
379
|
enabled?: boolean;
|
380
380
|
id: string;
|
381
|
-
parameters?:
|
381
|
+
parameters?: ModelParamsSchema;
|
382
382
|
providerId: string;
|
383
383
|
settings?: AiModelSettings;
|
384
384
|
sort?: number;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { ReactNode } from 'react';
|
2
2
|
|
3
|
+
import { ModelParamsSchema } from '@/libs/standard-parameters';
|
3
4
|
import { AiModelType, Pricing } from '@/types/aiModel';
|
4
5
|
import { AiProviderSettings } from '@/types/aiProvider';
|
5
6
|
|
@@ -41,6 +42,8 @@ export interface ChatModelCard {
|
|
41
42
|
*/
|
42
43
|
legacy?: boolean;
|
43
44
|
maxOutput?: number;
|
45
|
+
parameters?: ModelParamsSchema;
|
46
|
+
|
44
47
|
pricing?: Pricing;
|
45
48
|
|
46
49
|
/**
|
@@ -3,6 +3,8 @@
|
|
3
3
|
import { memo } from 'react';
|
4
4
|
import { Flexbox } from 'react-layout-kit';
|
5
5
|
|
6
|
+
import { useAiInfraStore } from '@/store/aiInfra';
|
7
|
+
|
6
8
|
import ModelList from '../../features/ModelList';
|
7
9
|
import ProviderConfig, { ProviderConfigProps } from '../../features/ProviderConfig';
|
8
10
|
|
@@ -10,6 +12,9 @@ interface ProviderDetailProps extends ProviderConfigProps {
|
|
10
12
|
showConfig?: boolean;
|
11
13
|
}
|
12
14
|
const ProviderDetail = memo<ProviderDetailProps>(({ showConfig = true, ...card }) => {
|
15
|
+
const useFetchAiProviderItem = useAiInfraStore((s) => s.useFetchAiProviderItem);
|
16
|
+
useFetchAiProviderItem(card.id);
|
17
|
+
|
13
18
|
return (
|
14
19
|
<Flexbox gap={24} paddingBlock={8}>
|
15
20
|
{/* ↓ cloud slot ↓ */}
|
@@ -143,7 +143,7 @@ const ProviderConfig = memo<ProviderConfigProps>(
|
|
143
143
|
const { cx, styles, theme } = useStyles();
|
144
144
|
|
145
145
|
const [
|
146
|
-
|
146
|
+
data,
|
147
147
|
updateAiProviderConfig,
|
148
148
|
enabled,
|
149
149
|
isLoading,
|
@@ -153,7 +153,7 @@ const ProviderConfig = memo<ProviderConfigProps>(
|
|
153
153
|
isProviderEndpointNotEmpty,
|
154
154
|
isProviderApiKeyNotEmpty,
|
155
155
|
] = useAiInfraStore((s) => [
|
156
|
-
s
|
156
|
+
aiProviderSelectors.activeProviderConfig(s),
|
157
157
|
s.updateAiProviderConfig,
|
158
158
|
aiProviderSelectors.isProviderEnabled(id)(s),
|
159
159
|
aiProviderSelectors.isAiProviderConfigLoading(id)(s),
|
@@ -164,8 +164,6 @@ const ProviderConfig = memo<ProviderConfigProps>(
|
|
164
164
|
aiProviderSelectors.isActiveProviderApiKeyNotEmpty(s),
|
165
165
|
]);
|
166
166
|
|
167
|
-
const { data } = useFetchAiProviderItem(id);
|
168
|
-
|
169
167
|
useLayoutEffect(() => {
|
170
168
|
if (isLoading) return;
|
171
169
|
|
@@ -20,6 +20,8 @@ export const fluxKreaParamsSchema: ModelParamsSchema = {
|
|
20
20
|
|
21
21
|
export const qwenImageParamsSchema: ModelParamsSchema = {
|
22
22
|
cfg: { default: 2.5, max: 20, min: 0, step: 0.1 },
|
23
|
+
// 实测 fal 宽高 最大就支持到 1536
|
24
|
+
// 默认值取自 https://chat.qwen.ai/ 官网的默认值
|
23
25
|
height: { default: 1328, max: 1536, min: 512, step: 1 },
|
24
26
|
prompt: { default: '' },
|
25
27
|
seed: { default: null },
|
@@ -27,6 +29,16 @@ export const qwenImageParamsSchema: ModelParamsSchema = {
|
|
27
29
|
width: { default: 1328, max: 1536, min: 512, step: 1 },
|
28
30
|
};
|
29
31
|
|
32
|
+
export const qwenEditParamsSchema: ModelParamsSchema = {
|
33
|
+
cfg: { default: 4, max: 20, min: 0, step: 0.1 },
|
34
|
+
height: { default: 1328, max: 1536, min: 512, step: 1 },
|
35
|
+
imageUrl: { default: null },
|
36
|
+
prompt: { default: '' },
|
37
|
+
seed: { default: null },
|
38
|
+
steps: { default: 30, max: 50, min: 2, step: 1 },
|
39
|
+
width: { default: 1328, max: 1536, min: 512, step: 1 },
|
40
|
+
};
|
41
|
+
|
30
42
|
const falImageModels: AIImageModelCard[] = [
|
31
43
|
{
|
32
44
|
description: '专注于图像编辑任务的FLUX.1模型,支持文本和图像输入。',
|
@@ -112,7 +124,20 @@ const falImageModels: AIImageModelCard[] = [
|
|
112
124
|
},
|
113
125
|
{
|
114
126
|
description:
|
115
|
-
'Qwen
|
127
|
+
'Qwen 团队发布的专业图像编辑模型,支持语义编辑和外观编辑,能够精确编辑中英文文字,实现风格转换、对象旋转等高质量图像编辑。',
|
128
|
+
displayName: 'Qwen Edit',
|
129
|
+
enabled: true,
|
130
|
+
id: 'qwen-image-edit',
|
131
|
+
parameters: qwenEditParamsSchema,
|
132
|
+
pricing: {
|
133
|
+
units: [{ name: 'imageGeneration', rate: 0.025, strategy: 'fixed', unit: 'image' }],
|
134
|
+
},
|
135
|
+
releasedAt: '2025-08-19',
|
136
|
+
type: 'image',
|
137
|
+
},
|
138
|
+
{
|
139
|
+
description:
|
140
|
+
'Qwen 团队带来的强大生图模型,具有令人印象深刻的中文文字生成能力和多样图片视觉风格。',
|
116
141
|
displayName: 'Qwen Image',
|
117
142
|
enabled: true,
|
118
143
|
id: 'qwen-image',
|
@@ -33,7 +33,7 @@ const groqChatModels: AIChatModelCard[] = [
|
|
33
33
|
'OpenAI GPT-OSS 120B 是一款拥有 1200 亿参数的顶尖语言模型,内置浏览器搜索和代码执行功能,并具备推理能力。',
|
34
34
|
displayName: 'GPT OSS 120B',
|
35
35
|
id: 'openai/gpt-oss-120b',
|
36
|
-
maxOutput:
|
36
|
+
maxOutput: 65_536,
|
37
37
|
pricing: {
|
38
38
|
units: [
|
39
39
|
{ name: 'textInput', rate: 0.15, strategy: 'fixed', unit: 'millionTokens' },
|
@@ -53,7 +53,7 @@ const groqChatModels: AIChatModelCard[] = [
|
|
53
53
|
'OpenAI GPT-OSS 20B 是一款拥有 200 亿参数的顶尖语言模型,内置浏览器搜索和代码执行功能,并具备推理能力。',
|
54
54
|
displayName: 'GPT OSS 20B',
|
55
55
|
id: 'openai/gpt-oss-20b',
|
56
|
-
maxOutput:
|
56
|
+
maxOutput: 65_536,
|
57
57
|
pricing: {
|
58
58
|
units: [
|
59
59
|
{ name: 'textInput', rate: 0.1, strategy: 'fixed', unit: 'millionTokens' },
|
@@ -519,21 +519,61 @@ const qwenChatModels: AIChatModelCard[] = [
|
|
519
519
|
search: true,
|
520
520
|
},
|
521
521
|
config: {
|
522
|
-
deploymentName: 'qwen-plus-2025-07-
|
522
|
+
deploymentName: 'qwen-plus-2025-07-28',
|
523
523
|
},
|
524
|
-
contextWindowTokens:
|
524
|
+
contextWindowTokens: 1_000_000,
|
525
525
|
description: '通义千问超大规模语言模型增强版,支持中文、英文等不同语言输入。',
|
526
526
|
displayName: 'Qwen Plus',
|
527
527
|
enabled: true,
|
528
528
|
id: 'qwen-plus',
|
529
|
-
maxOutput:
|
529
|
+
maxOutput: 32_768,
|
530
530
|
organization: 'Qwen',
|
531
531
|
pricing: {
|
532
532
|
currency: 'CNY',
|
533
533
|
units: [
|
534
|
-
{
|
535
|
-
|
536
|
-
|
534
|
+
{
|
535
|
+
lookup: {
|
536
|
+
prices: {
|
537
|
+
'[0, 128_000]': 0.8 * 0.4,
|
538
|
+
'[128_000, 256_000]': 2.4 * 0.4,
|
539
|
+
'[256_000, infinity]': 4.8 * 0.4,
|
540
|
+
},
|
541
|
+
pricingParams: ['textInputRange'],
|
542
|
+
},
|
543
|
+
name: 'textInput_cacheRead',
|
544
|
+
strategy: 'lookup',
|
545
|
+
unit: 'millionTokens',
|
546
|
+
},
|
547
|
+
{
|
548
|
+
lookup: {
|
549
|
+
prices: {
|
550
|
+
'[0, 128_000]': 0.8,
|
551
|
+
'[128_000, 256_000]': 2.4,
|
552
|
+
'[256_000, infinity]': 4.8,
|
553
|
+
},
|
554
|
+
pricingParams: ['textInputRange'],
|
555
|
+
},
|
556
|
+
name: 'textInput',
|
557
|
+
strategy: 'lookup',
|
558
|
+
unit: 'millionTokens',
|
559
|
+
},
|
560
|
+
{
|
561
|
+
lookup: {
|
562
|
+
prices: {
|
563
|
+
'[0, 128_000]_[false]': 2,
|
564
|
+
'[0, 128_000]_[true]': 8,
|
565
|
+
'[128_000, 256_000]_[false]': 20,
|
566
|
+
|
567
|
+
'[128_000, 256_000]_[true]': 24,
|
568
|
+
'[256_000, infinity]_[false]': 48,
|
569
|
+
'[256_000, infinity]_[true]': 64,
|
570
|
+
},
|
571
|
+
pricingParams: ['textInputRange', 'thinkingMode'],
|
572
|
+
},
|
573
|
+
name: 'textOutput',
|
574
|
+
strategy: 'lookup',
|
575
|
+
unit: 'millionTokens',
|
576
|
+
},
|
537
577
|
],
|
538
578
|
},
|
539
579
|
releasedAt: '2025-07-14',
|
@@ -643,7 +683,7 @@ const qwenChatModels: AIChatModelCard[] = [
|
|
643
683
|
vision: true,
|
644
684
|
},
|
645
685
|
config: {
|
646
|
-
deploymentName: 'qwen-vl-plus-2025-
|
686
|
+
deploymentName: 'qwen-vl-plus-2025-08-15',
|
647
687
|
},
|
648
688
|
contextWindowTokens: 131_072,
|
649
689
|
description:
|
@@ -655,9 +695,9 @@ const qwenChatModels: AIChatModelCard[] = [
|
|
655
695
|
pricing: {
|
656
696
|
currency: 'CNY',
|
657
697
|
units: [
|
658
|
-
{ name: 'textInput_cacheRead', rate: 0.
|
659
|
-
{ name: 'textInput', rate:
|
660
|
-
{ name: 'textOutput', rate:
|
698
|
+
{ name: 'textInput_cacheRead', rate: 0.8 * 0.4, strategy: 'fixed', unit: 'millionTokens' },
|
699
|
+
{ name: 'textInput', rate: 0.8, strategy: 'fixed', unit: 'millionTokens' },
|
700
|
+
{ name: 'textOutput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
|
661
701
|
],
|
662
702
|
},
|
663
703
|
type: 'chat',
|
@@ -667,7 +707,7 @@ const qwenChatModels: AIChatModelCard[] = [
|
|
667
707
|
vision: true,
|
668
708
|
},
|
669
709
|
config: {
|
670
|
-
deploymentName: 'qwen-vl-max-2025-
|
710
|
+
deploymentName: 'qwen-vl-max-2025-08-13',
|
671
711
|
},
|
672
712
|
contextWindowTokens: 131_072,
|
673
713
|
description:
|
@@ -679,9 +719,9 @@ const qwenChatModels: AIChatModelCard[] = [
|
|
679
719
|
pricing: {
|
680
720
|
currency: 'CNY',
|
681
721
|
units: [
|
682
|
-
{ name: 'textInput_cacheRead', rate: 1.
|
683
|
-
{ name: 'textInput', rate:
|
684
|
-
{ name: 'textOutput', rate:
|
722
|
+
{ name: 'textInput_cacheRead', rate: 1.6 * 0.4, strategy: 'fixed', unit: 'millionTokens' },
|
723
|
+
{ name: 'textInput', rate: 1.6, strategy: 'fixed', unit: 'millionTokens' },
|
724
|
+
{ name: 'textOutput', rate: 4, strategy: 'fixed', unit: 'millionTokens' },
|
685
725
|
],
|
686
726
|
},
|
687
727
|
type: 'chat',
|
@@ -1304,6 +1344,30 @@ const qwenChatModels: AIChatModelCard[] = [
|
|
1304
1344
|
];
|
1305
1345
|
|
1306
1346
|
const qwenImageModels: AIImageModelCard[] = [
|
1347
|
+
{
|
1348
|
+
description:
|
1349
|
+
'Qwen-Image 是一款通用图像生成模型,支持多种艺术风格,尤其擅长复杂文本渲染,特别是中英文文本渲染。模型支持多行布局、段落级文本生成以及细粒度细节刻画,可实现复杂的图文混合布局设计。',
|
1350
|
+
displayName: 'Qwen Image',
|
1351
|
+
enabled: true,
|
1352
|
+
id: 'qwen-image',
|
1353
|
+
organization: 'Qwen',
|
1354
|
+
parameters: {
|
1355
|
+
prompt: {
|
1356
|
+
default: '',
|
1357
|
+
},
|
1358
|
+
seed: { default: null },
|
1359
|
+
size: {
|
1360
|
+
default: '1328*1328',
|
1361
|
+
enum: ['1664*928', '1472*1140', '1328*1328', '1140*1472', '928*1664'],
|
1362
|
+
},
|
1363
|
+
},
|
1364
|
+
pricing: {
|
1365
|
+
currency: 'CNY',
|
1366
|
+
units: [{ name: 'imageGeneration', rate: 0.25, strategy: 'fixed', unit: 'image' }],
|
1367
|
+
},
|
1368
|
+
releasedAt: '2025-08-13',
|
1369
|
+
type: 'image',
|
1370
|
+
},
|
1307
1371
|
{
|
1308
1372
|
description:
|
1309
1373
|
'万相2.2极速版,当前最新模型。在创意性、稳定性、写实质感上全面升级,生成速度快,性价比高。',
|
@@ -61,6 +61,27 @@ const siliconcloudChatModels: AIChatModelCard[] = [
|
|
61
61
|
releasedAt: '2025-07-31',
|
62
62
|
type: 'chat',
|
63
63
|
},
|
64
|
+
{
|
65
|
+
abilities: {
|
66
|
+
functionCall: true,
|
67
|
+
reasoning: true,
|
68
|
+
vision: true,
|
69
|
+
},
|
70
|
+
contextWindowTokens: 65_536,
|
71
|
+
description:
|
72
|
+
'GLM-4.5V 是由智谱 AI(Zhipu AI)发布的最新一代视觉语言模型(VLM)该模型基于拥有 106B 总参数和 12B 激活参数的旗舰文本模型 GLM-4.5-Air 构建,采用了混合专家(MoE)架构,旨在以更低的推理成本实现卓越性能 GLM-4.5V 在技术上延续了 GLM-4.1V-Thinking 的路线,并引入了三维旋转位置编码(3D-RoPE)等创新,显著增强了对三维空间关系的感知与推理能力。通过在预训练、监督微调和强化学习阶段的优化,该模型具备了处理图像、视频、长文档等多种视觉内容的能力,在 41 个公开的多模态基准测试中达到了同级别开源模型的顶尖水平此外,模型还新增了“思考模式”开关,允许用户在快速响应和深度推理之间灵活选择,以平衡效率与效果。',
|
73
|
+
displayName: 'GLM-4.5V',
|
74
|
+
id: 'zai-org/GLM-4.5V',
|
75
|
+
pricing: {
|
76
|
+
currency: 'CNY',
|
77
|
+
units: [
|
78
|
+
{ name: 'textInput', rate: 1, strategy: 'fixed', unit: 'millionTokens' },
|
79
|
+
{ name: 'textOutput', rate: 6, strategy: 'fixed', unit: 'millionTokens' },
|
80
|
+
],
|
81
|
+
},
|
82
|
+
releasedAt: '2025-08-11',
|
83
|
+
type: 'chat',
|
84
|
+
},
|
64
85
|
{
|
65
86
|
abilities: {
|
66
87
|
functionCall: true,
|
package/src/services/discover.ts
CHANGED
@@ -143,6 +143,10 @@ class DiscoverService {
|
|
143
143
|
errorCode,
|
144
144
|
...params
|
145
145
|
}: InstallReportRequest) => {
|
146
|
+
// if user don't allow tracing, just not report installation
|
147
|
+
const allow = preferenceSelectors.userAllowTrace(useUserStore.getState());
|
148
|
+
|
149
|
+
if (!allow) return;
|
146
150
|
await this.injectMPToken();
|
147
151
|
|
148
152
|
const reportData = {
|
@@ -164,7 +168,8 @@ class DiscoverService {
|
|
164
168
|
* 上报插件调用结果
|
165
169
|
*/
|
166
170
|
reportPluginCall = async (reportData: CallReportRequest) => {
|
167
|
-
|
171
|
+
// if user don't allow tracing , just not report calling
|
172
|
+
const allow = preferenceSelectors.userAllowTrace(useUserStore.getState());
|
168
173
|
|
169
174
|
if (!allow) return;
|
170
175
|
|
@@ -48,7 +48,10 @@ describe('getModelListByType', () => {
|
|
48
48
|
abilities: {} as ModelAbilities,
|
49
49
|
displayName: 'DALL-E 3',
|
50
50
|
enabled: true,
|
51
|
-
parameters: {
|
51
|
+
parameters: {
|
52
|
+
prompt: { default: '' },
|
53
|
+
size: { default: '1024x1024', enum: ['512x512', '1024x1024', '1536x1536'] }
|
54
|
+
},
|
52
55
|
},
|
53
56
|
{
|
54
57
|
id: 'midjourney',
|
@@ -89,7 +92,10 @@ describe('getModelListByType', () => {
|
|
89
92
|
contextWindowTokens: undefined,
|
90
93
|
displayName: 'DALL-E 3',
|
91
94
|
id: 'dall-e-3',
|
92
|
-
parameters: {
|
95
|
+
parameters: {
|
96
|
+
prompt: { default: '' },
|
97
|
+
size: { default: '1024x1024', enum: ['512x512', '1024x1024', '1536x1536'] }
|
98
|
+
},
|
93
99
|
});
|
94
100
|
});
|
95
101
|
|