@lobehub/chat 1.105.0 → 1.105.2

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.
Files changed (62) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/changelog/v1.json +18 -0
  3. package/locales/ar/auth.json +54 -0
  4. package/locales/bg-BG/auth.json +54 -0
  5. package/locales/de-DE/auth.json +54 -0
  6. package/locales/en-US/auth.json +54 -0
  7. package/locales/es-ES/auth.json +54 -0
  8. package/locales/fa-IR/auth.json +54 -0
  9. package/locales/fr-FR/auth.json +54 -0
  10. package/locales/it-IT/auth.json +54 -0
  11. package/locales/ja-JP/auth.json +54 -0
  12. package/locales/ko-KR/auth.json +54 -0
  13. package/locales/nl-NL/auth.json +54 -0
  14. package/locales/pl-PL/auth.json +54 -0
  15. package/locales/pt-BR/auth.json +54 -0
  16. package/locales/ru-RU/auth.json +54 -0
  17. package/locales/tr-TR/auth.json +54 -0
  18. package/locales/vi-VN/auth.json +54 -0
  19. package/locales/zh-CN/auth.json +54 -0
  20. package/locales/zh-TW/auth.json +54 -0
  21. package/package.json +2 -2
  22. package/src/app/(backend)/middleware/auth/index.test.ts +5 -5
  23. package/src/app/(backend)/middleware/auth/index.ts +6 -6
  24. package/src/app/(backend)/webapi/chat/[provider]/route.test.ts +11 -9
  25. package/src/app/(backend)/webapi/plugin/gateway/route.ts +2 -2
  26. package/src/app/sitemap.tsx +1 -10
  27. package/src/config/aiModels/giteeai.ts +269 -2
  28. package/src/config/aiModels/qwen.ts +207 -2
  29. package/src/config/aiModels/siliconcloud.ts +24 -2
  30. package/src/config/aiModels/stepfun.ts +67 -2
  31. package/src/config/aiModels/volcengine.ts +56 -2
  32. package/src/config/aiModels/wenxin.ts +62 -2
  33. package/src/config/aiModels/xai.ts +19 -2
  34. package/src/const/auth.ts +2 -3
  35. package/src/libs/model-runtime/ModelRuntime.test.ts +3 -3
  36. package/src/libs/model-runtime/qwen/createImage.ts +29 -9
  37. package/src/libs/trpc/async/context.ts +3 -3
  38. package/src/libs/trpc/edge/context.ts +7 -2
  39. package/src/libs/trpc/edge/middleware/jwtPayload.test.ts +4 -4
  40. package/src/libs/trpc/edge/middleware/jwtPayload.ts +2 -2
  41. package/src/libs/trpc/lambda/context.ts +2 -2
  42. package/src/libs/trpc/lambda/middleware/keyVaults.ts +2 -2
  43. package/src/server/modules/AgentRuntime/index.test.ts +28 -25
  44. package/src/server/modules/AgentRuntime/index.ts +3 -3
  45. package/src/server/routers/async/caller.ts +2 -2
  46. package/src/server/routers/lambda/market/index.ts +0 -14
  47. package/src/server/routers/tools/search.test.ts +2 -2
  48. package/src/server/services/chunk/index.ts +3 -3
  49. package/src/server/services/discover/index.ts +0 -13
  50. package/src/server/sitemap.test.ts +0 -52
  51. package/src/server/sitemap.ts +1 -38
  52. package/src/services/_auth.ts +3 -3
  53. package/src/services/discover.ts +0 -4
  54. package/src/store/discover/slices/mcp/action.ts +0 -8
  55. package/src/utils/client/xor-obfuscation.test.ts +370 -0
  56. package/src/utils/client/xor-obfuscation.ts +39 -0
  57. package/src/utils/server/xor.test.ts +123 -0
  58. package/src/utils/server/xor.ts +42 -0
  59. package/src/utils/jwt.test.ts +0 -27
  60. package/src/utils/jwt.ts +0 -37
  61. package/src/utils/server/jwt.test.ts +0 -62
  62. package/src/utils/server/jwt.ts +0 -28
@@ -2,7 +2,7 @@ import { AuthObject } from '@clerk/backend';
2
2
  import { NextRequest } from 'next/server';
3
3
 
4
4
  import {
5
- JWTPayload,
5
+ ClientSecretPayload,
6
6
  LOBE_CHAT_AUTH_HEADER,
7
7
  LOBE_CHAT_OIDC_AUTH_HEADER,
8
8
  OAUTH_AUTHORIZED,
@@ -13,18 +13,18 @@ import { AgentRuntime, AgentRuntimeError, ChatCompletionErrorPayload } from '@/l
13
13
  import { validateOIDCJWT } from '@/libs/oidc-provider/jwt';
14
14
  import { ChatErrorType } from '@/types/fetch';
15
15
  import { createErrorResponse } from '@/utils/errorResponse';
16
- import { getJWTPayload } from '@/utils/server/jwt';
16
+ import { getXorPayload } from '@/utils/server/xor';
17
17
 
18
18
  import { checkAuthMethod } from './utils';
19
19
 
20
- type CreateRuntime = (jwtPayload: JWTPayload) => AgentRuntime;
20
+ type CreateRuntime = (jwtPayload: ClientSecretPayload) => AgentRuntime;
21
21
  type RequestOptions = { createRuntime?: CreateRuntime; params: Promise<{ provider: string }> };
22
22
 
23
23
  export type RequestHandler = (
24
24
  req: Request,
25
25
  options: RequestOptions & {
26
26
  createRuntime?: CreateRuntime;
27
- jwtPayload: JWTPayload;
27
+ jwtPayload: ClientSecretPayload;
28
28
  },
29
29
  ) => Promise<Response>;
30
30
 
@@ -36,7 +36,7 @@ export const checkAuth =
36
36
  return handler(req, { ...options, jwtPayload: { userId: 'DEV_USER' } });
37
37
  }
38
38
 
39
- let jwtPayload: JWTPayload;
39
+ let jwtPayload: ClientSecretPayload;
40
40
 
41
41
  try {
42
42
  // get Authorization from header
@@ -55,7 +55,7 @@ export const checkAuth =
55
55
  clerkAuth = data.clerkAuth;
56
56
  }
57
57
 
58
- jwtPayload = await getJWTPayload(authorization);
58
+ jwtPayload = getXorPayload(authorization);
59
59
 
60
60
  const oidcAuthorization = req.headers.get(LOBE_CHAT_OIDC_AUTH_HEADER);
61
61
  let isUseOidcAuth = false;
@@ -6,7 +6,7 @@ import { checkAuthMethod } from '@/app/(backend)/middleware/auth/utils';
6
6
  import { LOBE_CHAT_AUTH_HEADER, OAUTH_AUTHORIZED } from '@/const/auth';
7
7
  import { AgentRuntime, LobeRuntimeAI } from '@/libs/model-runtime';
8
8
  import { ChatErrorType } from '@/types/fetch';
9
- import { getJWTPayload } from '@/utils/server/jwt';
9
+ import { getXorPayload } from '@/utils/server/xor';
10
10
 
11
11
  import { POST } from './route';
12
12
 
@@ -18,8 +18,8 @@ vi.mock('@/app/(backend)/middleware/auth/utils', () => ({
18
18
  checkAuthMethod: vi.fn(),
19
19
  }));
20
20
 
21
- vi.mock('@/utils/server/jwt', () => ({
22
- getJWTPayload: vi.fn(),
21
+ vi.mock('@/utils/server/xor', () => ({
22
+ getXorPayload: vi.fn(),
23
23
  }));
24
24
 
25
25
  // 定义一个变量来存储 enableAuth 的值
@@ -61,7 +61,7 @@ describe('POST handler', () => {
61
61
  const mockParams = Promise.resolve({ provider: 'test-provider' });
62
62
 
63
63
  // 设置 getJWTPayload 和 initAgentRuntimeWithUserPayload 的模拟返回值
64
- vi.mocked(getJWTPayload).mockResolvedValueOnce({
64
+ vi.mocked(getXorPayload).mockReturnValueOnce({
65
65
  accessCode: 'test-access-code',
66
66
  apiKey: 'test-api-key',
67
67
  azureApiVersion: 'v1',
@@ -78,7 +78,7 @@ describe('POST handler', () => {
78
78
  await POST(request as unknown as Request, { params: mockParams });
79
79
 
80
80
  // 验证是否正确调用了模拟函数
81
- expect(getJWTPayload).toHaveBeenCalledWith('Bearer some-valid-token');
81
+ expect(getXorPayload).toHaveBeenCalledWith('Bearer some-valid-token');
82
82
  expect(spy).toHaveBeenCalledWith('test-provider', expect.anything());
83
83
  });
84
84
 
@@ -104,7 +104,7 @@ describe('POST handler', () => {
104
104
  it('should have pass clerk Auth when enable clerk', async () => {
105
105
  enableClerk = true;
106
106
 
107
- vi.mocked(getJWTPayload).mockResolvedValueOnce({
107
+ vi.mocked(getXorPayload).mockReturnValueOnce({
108
108
  accessCode: 'test-access-code',
109
109
  apiKey: 'test-api-key',
110
110
  azureApiVersion: 'v1',
@@ -142,7 +142,9 @@ describe('POST handler', () => {
142
142
 
143
143
  it('should return InternalServerError error when throw a unknown error', async () => {
144
144
  const mockParams = Promise.resolve({ provider: 'test-provider' });
145
- vi.mocked(getJWTPayload).mockRejectedValueOnce(new Error('unknown error'));
145
+ vi.mocked(getXorPayload).mockImplementationOnce(() => {
146
+ throw new Error('unknown error');
147
+ });
146
148
 
147
149
  const response = await POST(request, { params: mockParams });
148
150
 
@@ -159,7 +161,7 @@ describe('POST handler', () => {
159
161
 
160
162
  describe('chat', () => {
161
163
  it('should correctly handle chat completion with valid payload', async () => {
162
- vi.mocked(getJWTPayload).mockResolvedValueOnce({
164
+ vi.mocked(getXorPayload).mockReturnValueOnce({
163
165
  accessCode: 'test-access-code',
164
166
  apiKey: 'test-api-key',
165
167
  azureApiVersion: 'v1',
@@ -189,7 +191,7 @@ describe('POST handler', () => {
189
191
 
190
192
  it('should return an error response when chat completion fails', async () => {
191
193
  // 设置 getJWTPayload 和 initAgentRuntimeWithUserPayload 的模拟返回值
192
- vi.mocked(getJWTPayload).mockResolvedValueOnce({
194
+ vi.mocked(getXorPayload).mockReturnValueOnce({
193
195
  accessCode: 'test-access-code',
194
196
  apiKey: 'test-api-key',
195
197
  azureApiVersion: 'v1',
@@ -8,7 +8,7 @@ import { AgentRuntimeError } from '@/libs/model-runtime';
8
8
  import { TraceClient } from '@/libs/traces';
9
9
  import { ChatErrorType, ErrorType } from '@/types/fetch';
10
10
  import { createErrorResponse } from '@/utils/errorResponse';
11
- import { getJWTPayload } from '@/utils/server/jwt';
11
+ import { getXorPayload } from '@/utils/server/xor';
12
12
  import { getTracePayload } from '@/utils/trace';
13
13
 
14
14
  import { parserPluginSettings } from './settings';
@@ -44,7 +44,7 @@ export const POST = async (req: Request) => {
44
44
  if (!authorization) throw AgentRuntimeError.createError(ChatErrorType.Unauthorized);
45
45
 
46
46
  const oauthAuthorized = !!req.headers.get(OAUTH_AUTHORIZED);
47
- const payload = await getJWTPayload(authorization);
47
+ const payload = getXorPayload(authorization);
48
48
 
49
49
  const result = checkAuth(payload.accessCode!, oauthAuthorized);
50
50
 
@@ -17,10 +17,9 @@ export async function generateSitemaps() {
17
17
  const staticSitemaps = sitemapModule.sitemapIndexs;
18
18
 
19
19
  // 获取需要分页的类型的页数
20
- const [pluginPages, assistantPages, mcpPages, modelPages] = await Promise.all([
20
+ const [pluginPages, assistantPages, modelPages] = await Promise.all([
21
21
  sitemapModule.getPluginPageCount(),
22
22
  sitemapModule.getAssistantPageCount(),
23
- sitemapModule.getMcpPageCount(),
24
23
  sitemapModule.getModelPageCount(),
25
24
  ]);
26
25
 
@@ -30,7 +29,6 @@ export async function generateSitemaps() {
30
29
  ...Array.from({ length: assistantPages }, (_, i) => ({
31
30
  id: `assistants-${i + 1}` as SitemapType,
32
31
  })),
33
- ...Array.from({ length: mcpPages }, (_, i) => ({ id: `mcp-${i + 1}` as SitemapType })),
34
32
  ...Array.from({ length: modelPages }, (_, i) => ({ id: `models-${i + 1}` as SitemapType })),
35
33
  ];
36
34
 
@@ -60,9 +58,6 @@ export default async function sitemap({ id }: { id: string }): Promise<MetadataR
60
58
  case SitemapType.Assistants: {
61
59
  return sitemapModule.getAssistants(page);
62
60
  }
63
- case SitemapType.Mcp: {
64
- return sitemapModule.getMcp(page);
65
- }
66
61
  case SitemapType.Plugins: {
67
62
  return sitemapModule.getPlugins(page);
68
63
  }
@@ -82,10 +77,6 @@ export default async function sitemap({ id }: { id: string }): Promise<MetadataR
82
77
  const pageNum = parseInt(id.split('-')[1], 10);
83
78
  return sitemapModule.getAssistants(pageNum);
84
79
  }
85
- if (id.startsWith('mcp-')) {
86
- const pageNum = parseInt(id.split('-')[1], 10);
87
- return sitemapModule.getMcp(pageNum);
88
- }
89
80
  if (id.startsWith('models-')) {
90
81
  const pageNum = parseInt(id.split('-')[1], 10);
91
82
  return sitemapModule.getModels(pageNum);
@@ -1,4 +1,4 @@
1
- import { AIChatModelCard } from '@/types/aiModel';
1
+ import { AIChatModelCard, AIImageModelCard } from '@/types/aiModel';
2
2
 
3
3
  const giteeaiChatModels: AIChatModelCard[] = [
4
4
  {
@@ -222,6 +222,273 @@ const giteeaiChatModels: AIChatModelCard[] = [
222
222
  },
223
223
  ];
224
224
 
225
- export const allModels = [...giteeaiChatModels];
225
+ const giteeaiImageModels: AIImageModelCard[] = [
226
+ {
227
+ description:
228
+ 'FLUX.1-dev 是由 Black Forest Labs 开发的一款开源 多模态语言模型(Multimodal Language Model, MLLM),专为图文任务优化,融合了图像和文本的理解与生成能力。它建立在先进的大语言模型(如 Mistral-7B)基础上,通过精心设计的视觉编码器与多阶段指令微调,实现了图文协同处理与复杂任务推理的能力。',
229
+ displayName: 'FLUX.1-dev',
230
+ enabled: true,
231
+ id: 'FLUX.1-dev',
232
+ parameters: {
233
+ imageUrl: { default: null },
234
+ prompt: {
235
+ default: '',
236
+ },
237
+ size: {
238
+ default: '1024x1024',
239
+ enum: ['1024x1024', '1536x1536'],
240
+ },
241
+ },
242
+ type: 'image',
243
+ },
244
+ {
245
+ description:
246
+ '由 Black Forest Labs 开发的 120 亿参数文生图模型,采用潜在对抗扩散蒸馏技术,能够在 1 到 4 步内生成高质量图像。该模型性能媲美闭源替代品,并在 Apache-2.0 许可证下发布,适用于个人、科研和商业用途。',
247
+ displayName: 'flux-1-schnell',
248
+ enabled: true,
249
+ id: 'flux-1-schnell',
250
+ parameters: {
251
+ prompt: {
252
+ default: '',
253
+ },
254
+ size: {
255
+ default: '1024x1024',
256
+ enum: ['1024x1024', '1536x1536', '2048x2048'],
257
+ },
258
+ },
259
+ type: 'image',
260
+ },
261
+ {
262
+ description:
263
+ 'FLUX.1-Kontext-dev 是由 Black Forest Labs 开发的一款基于 Rectified Flow Transformer 架构 的多模态图像生成与编辑模型,拥有 12B(120 亿)参数规模,专注于在给定上下文条件下生成、重构、增强或编辑图像。该模型结合了扩散模型的可控生成优势与 Transformer 的上下文建模能力,支持高质量图像输出,广泛适用于图像修复、图像补全、视觉场景重构等任务。',
264
+ displayName: 'FLUX.1-Kontext-dev',
265
+ enabled: true,
266
+ id: 'FLUX.1-Kontext-dev',
267
+ parameters: {
268
+ imageUrl: { default: null },
269
+ prompt: {
270
+ default: '',
271
+ },
272
+ size: {
273
+ default: '1024x1024',
274
+ enum: ['1024x1024', '1536x1536', '2048x2048'],
275
+ },
276
+ },
277
+ type: 'image',
278
+ },
279
+ {
280
+ description:
281
+ 'Stable Diffusion 3.5 Large Turbo 专注于高质量图像生成,具备强大的细节表现力和场景还原能力。',
282
+ displayName: 'stable-diffusion-3.5-large-turbo',
283
+ enabled: true,
284
+ id: 'stable-diffusion-3.5-large-turbo',
285
+ parameters: {
286
+ prompt: {
287
+ default: '',
288
+ },
289
+ size: {
290
+ default: '1024x1024',
291
+ enum: ['1024x1024'],
292
+ },
293
+ },
294
+ type: 'image',
295
+ },
296
+ {
297
+ description:
298
+ '由 Stability AI 推出的最新文生图大模型。这一版本在继承了前代的优点上,对图像质量、文本理解和风格多样性等方面进行了显著改进,能够更准确地解读复杂的自然语言提示,并生成更为精确和多样化的图像。',
299
+ displayName: 'stable-diffusion-3-medium',
300
+ enabled: true,
301
+ id: 'stable-diffusion-3-medium',
302
+ parameters: {
303
+ prompt: {
304
+ default: '',
305
+ },
306
+ size: {
307
+ default: '1024x1024',
308
+ enum: ['1024x1024'],
309
+ },
310
+ },
311
+ type: 'image',
312
+ },
313
+ {
314
+ description:
315
+ '由 Stability AI 开发并开源的文生图大模型,其创意图像生成能力位居行业前列。具备出色的指令理解能力,能够支持反向 Prompt 定义来精确生成内容。',
316
+ displayName: 'stable-diffusion-xl-base-1.0',
317
+ enabled: true,
318
+ id: 'stable-diffusion-xl-base-1.0',
319
+ parameters: {
320
+ prompt: {
321
+ default: '',
322
+ },
323
+ size: {
324
+ default: '1024x1024',
325
+ enum: ['1024x1024'],
326
+ },
327
+ },
328
+ type: 'image',
329
+ },
330
+ {
331
+ description:
332
+ 'Kolors 是由快手 Kolors 团队开发的文生图模型。由数十亿的参数训练,在视觉质量、中文语义理解和文本渲染方面有显著优势。',
333
+ displayName: 'Kolors',
334
+ enabled: true,
335
+ id: 'Kolors',
336
+ parameters: {
337
+ imageUrl: { default: null },
338
+ prompt: {
339
+ default: '',
340
+ },
341
+ size: {
342
+ default: '1024x1024',
343
+ enum: ['1024x1024'],
344
+ },
345
+ },
346
+ type: 'image',
347
+ },
348
+ {
349
+ description:
350
+ 'hunyuandit-v1.2-distilled 是一款轻量级的文生图模型,经过蒸馏优化,能够快速生成高质量的图像,特别适用于低资源环境和实时生成任务。',
351
+ displayName: 'HunyuanDiT-v1.2-Diffusers-Distilled',
352
+ enabled: true,
353
+ id: 'HunyuanDiT-v1.2-Diffusers-Distilled',
354
+ parameters: {
355
+ prompt: {
356
+ default: '',
357
+ },
358
+ size: {
359
+ default: '1024x1024',
360
+ enum: ['1024x1024'],
361
+ },
362
+ },
363
+ type: 'image',
364
+ },
365
+ {
366
+ description:
367
+ 'HiDream-I1 是一个全新的开源图像生成基础模型,是由国内企业智象未来开源的。拥有 170 亿参数(Flux是12B参数),能够在几秒内实现行业领先的图像生成质量。',
368
+ displayName: 'HiDream-I1-Full',
369
+ enabled: true,
370
+ id: 'HiDream-I1-Full',
371
+ parameters: {
372
+ prompt: {
373
+ default: '',
374
+ },
375
+ size: {
376
+ default: '1024x1024',
377
+ enum: ['1024x1024'],
378
+ },
379
+ },
380
+ type: 'image',
381
+ },
382
+ {
383
+ description:
384
+ 'HiDream-E1-Full 是由智象未来(HiDream.ai)推出的一款 开源多模态图像编辑大模型,基于先进的 Diffusion Transformer 架构,并结合强大的语言理解能力(内嵌 LLaMA 3.1-8B-Instruct),支持通过自然语言指令进行图像生成、风格迁移、局部编辑和内容重绘,具备出色的图文理解与执行能力。',
385
+ displayName: 'HiDream-E1-Full',
386
+ enabled: true,
387
+ id: 'HiDream-I1-Full',
388
+ parameters: {
389
+ imageUrl: { default: null },
390
+ prompt: {
391
+ default: '',
392
+ },
393
+ size: {
394
+ default: '1024x1024',
395
+ enum: ['1024x1024'],
396
+ },
397
+ },
398
+ type: 'image',
399
+ },
400
+ {
401
+ description:
402
+ 'HelloMeme 是一个可以根据你提供的图片或动作,自动生成表情包、动图或短视频的 AI 工具。它不需要你有任何绘画或编程基础,只需要准备好参考图片,它就能帮你做出好看、有趣、风格一致的内容。',
403
+ displayName: 'HelloMeme',
404
+ enabled: true,
405
+ id: 'HelloMeme',
406
+ parameters: {
407
+ imageUrl: { default: null },
408
+ prompt: {
409
+ default: '',
410
+ },
411
+ size: {
412
+ default: '1024x1024',
413
+ enum: ['1024x1024'],
414
+ },
415
+ },
416
+ type: 'image',
417
+ },
418
+ {
419
+ description:
420
+ 'OmniConsistency 通过引入大规模 Diffusion Transformers(DiTs)和配对风格化数据,提升图像到图像(Image-to-Image)任务中的风格一致性和泛化能力,避免风格退化。',
421
+ displayName: 'OmniConsistency',
422
+ enabled: true,
423
+ id: 'OmniConsistency',
424
+ parameters: {
425
+ imageUrl: { default: null },
426
+ prompt: {
427
+ default: '',
428
+ },
429
+ size: {
430
+ default: '1024x1024',
431
+ enum: ['1024x1024'],
432
+ },
433
+ },
434
+ type: 'image',
435
+ },
436
+ {
437
+ description:
438
+ 'InstantCharacter 是由腾讯 AI 团队在 2025 年发布的一款 无需微调(tuning-free) 的个性化角色生成模型,旨在实现高保真、跨场景的一致角色生成。该模型支持仅基于 一张参考图像 对角色进行建模,并能够将该角色灵活迁移到各种风格、动作和背景中。',
439
+ displayName: 'InstantCharacter',
440
+ enabled: true,
441
+ id: 'InstantCharacter',
442
+ parameters: {
443
+ imageUrl: { default: null },
444
+ prompt: {
445
+ default: '',
446
+ },
447
+ size: {
448
+ default: '1024x1024',
449
+ enum: ['1024x1024'],
450
+ },
451
+ },
452
+ type: 'image',
453
+ },
454
+ {
455
+ description:
456
+ 'DreamO 是由字节跳动与北京大学联合研发的开源图像定制生成模型,旨在通过统一架构支持多任务图像生成。它采用高效的组合建模方法,可根据用户指定的身份、主体、风格、背景等多个条件生成高度一致且定制化的图像。',
457
+ displayName: 'DreamO',
458
+ enabled: true,
459
+ id: 'DreamO',
460
+ parameters: {
461
+ imageUrl: { default: null },
462
+ prompt: {
463
+ default: '',
464
+ },
465
+ size: {
466
+ default: '1024x1024',
467
+ enum: ['1024x1024'],
468
+ },
469
+ },
470
+ type: 'image',
471
+ },
472
+ {
473
+ description:
474
+ 'AnimeSharp(又名 “4x‑AnimeSharp”) 是 Kim2091 基于 ESRGAN 架构开发的开源超分辨率模型,专注于动漫风格图像的放大与锐化。它于 2022 年 2 月重命名自 “4x-TextSharpV1”,原本也适用于文字图像但性能针对动漫内容进行了大幅优化',
475
+ displayName: 'AnimeSharp',
476
+ enabled: true,
477
+ id: 'AnimeSharp',
478
+ parameters: {
479
+ imageUrl: { default: null },
480
+ prompt: {
481
+ default: '',
482
+ },
483
+ size: {
484
+ default: '1024x1024',
485
+ enum: ['1024x1024'],
486
+ },
487
+ },
488
+ type: 'image',
489
+ },
490
+ ];
491
+
492
+ export const allModels = [...giteeaiChatModels, ...giteeaiImageModels];
226
493
 
227
494
  export default allModels;
@@ -958,9 +958,42 @@ const qwenChatModels: AIChatModelCard[] = [
958
958
 
959
959
  const qwenImageModels: AIImageModelCard[] = [
960
960
  {
961
- description: '阿里云通义旗下的文生图模型',
962
- displayName: 'Wanxiang T2I Turbo',
961
+ description: '万相2.2极速版,当前最新模型。在创意性、稳定性、写实质感上全面升级,生成速度快,性价比高。',
962
+ displayName: 'Wanxiang2.2 T2I Flash',
963
963
  enabled: true,
964
+ id: 'wan2.2-t2i-flash',
965
+ organization: 'Qwen',
966
+ parameters: {
967
+ height: { default: 1024, max: 1440, min: 512, step: 1 },
968
+ prompt: {
969
+ default: '',
970
+ },
971
+ seed: { default: null },
972
+ width: { default: 1024, max: 1440, min: 512, step: 1 },
973
+ },
974
+ releasedAt: '2025-07-28',
975
+ type: 'image',
976
+ },
977
+ {
978
+ description: '万相2.2专业版,当前最新模型。在创意性、稳定性、写实质感上全面升级,生成细节丰富。',
979
+ displayName: 'Wanxiang2.2 T2I Plus',
980
+ enabled: true,
981
+ id: 'wan2.2-t2i-plus',
982
+ organization: 'Qwen',
983
+ parameters: {
984
+ height: { default: 1024, max: 1440, min: 512, step: 1 },
985
+ prompt: {
986
+ default: '',
987
+ },
988
+ seed: { default: null },
989
+ width: { default: 1024, max: 1440, min: 512, step: 1 },
990
+ },
991
+ releasedAt: '2025-07-28',
992
+ type: 'image',
993
+ },
994
+ {
995
+ description: '全面升级版本。生成速度快、效果全面、综合性价比高。对应通义万相官网2.1极速模型。',
996
+ displayName: 'Wanxiang2.1 T2I Turbo',
964
997
  id: 'wanx2.1-t2i-turbo',
965
998
  organization: 'Qwen',
966
999
  parameters: {
@@ -974,6 +1007,178 @@ const qwenImageModels: AIImageModelCard[] = [
974
1007
  releasedAt: '2025-01-08',
975
1008
  type: 'image',
976
1009
  },
1010
+ {
1011
+ description: '全面升级版本。生成图像细节更丰富,速度稍慢。对应通义万相官网2.1专业模型。',
1012
+ displayName: 'Wanxiang2.1 T2I Plus',
1013
+ id: 'wanx2.1-t2i-plus',
1014
+ organization: 'Qwen',
1015
+ parameters: {
1016
+ height: { default: 1024, max: 1440, min: 512, step: 1 },
1017
+ prompt: {
1018
+ default: '',
1019
+ },
1020
+ seed: { default: null },
1021
+ width: { default: 1024, max: 1440, min: 512, step: 1 },
1022
+ },
1023
+ releasedAt: '2025-01-08',
1024
+ type: 'image',
1025
+ },
1026
+ {
1027
+ description: '擅长质感人像,速度中等、成本较低。对应通义万相官网2.0极速模型。',
1028
+ displayName: 'Wanxiang2.0 T2I Turbo',
1029
+ id: 'wanx2.0-t2i-turbo',
1030
+ organization: 'Qwen',
1031
+ parameters: {
1032
+ height: { default: 1024, max: 1440, min: 512, step: 1 },
1033
+ prompt: {
1034
+ default: '',
1035
+ },
1036
+ seed: { default: null },
1037
+ width: { default: 1024, max: 1440, min: 512, step: 1 },
1038
+ },
1039
+ releasedAt: '2025-01-17',
1040
+ type: 'image',
1041
+ },
1042
+ {
1043
+ description: '基础文生图模型。对应通义万相官网1.0通用模型。',
1044
+ displayName: 'Wanxiang v1',
1045
+ id: 'wanx-v1',
1046
+ organization: 'Qwen',
1047
+ parameters: {
1048
+ height: { default: 1024, max: 1440, min: 512, step: 1 },
1049
+ prompt: {
1050
+ default: '',
1051
+ },
1052
+ seed: { default: null },
1053
+ width: { default: 1024, max: 1440, min: 512, step: 1 },
1054
+ },
1055
+ releasedAt: '2024-05-22',
1056
+ type: 'image',
1057
+ },
1058
+ {
1059
+ description: 'FLUX.1 [schnell] 作为目前开源最先进的少步模型,不仅超越了同类竞争者,甚至还优于诸如 Midjourney v6.0 和 DALL·E 3 (HD) 等强大的非精馏模型。该模型经过专门微调,以保留预训练阶段的全部输出多样性,相较于当前市场上的最先进模型,FLUX.1 [schnell] 显著提升了在视觉质量、指令遵从、尺寸/比例变化、字体处理及输出多样性等方面的可能,为用户带来更为丰富多样的创意图像生成体验。',
1060
+ displayName: 'FLUX.1 [schnell]',
1061
+ enabled: true,
1062
+ id: 'flux-schnell',
1063
+ organization: 'Qwen',
1064
+ parameters: {
1065
+ prompt: {
1066
+ default: '',
1067
+ },
1068
+ seed: { default: null },
1069
+ size: {
1070
+ default: '1024x1024',
1071
+ enum: ['512x1024', '768x512', '768x1024', '1024x576', '576x1024', '1024x1024'],
1072
+ },
1073
+ steps: { default: 4, max: 12, min: 1 },
1074
+ },
1075
+ releasedAt: '2024-08-07',
1076
+ type: 'image',
1077
+ },
1078
+ {
1079
+ description: 'FLUX.1 [dev] 是一款面向非商业应用的开源权重、精炼模型。FLUX.1 [dev] 在保持了与FLUX专业版相近的图像质量和指令遵循能力的同时,具备更高的运行效率。相较于同尺寸的标准模型,它在资源利用上更为高效。',
1080
+ displayName: 'FLUX.1 [dev]',
1081
+ enabled: true,
1082
+ id: 'flux-dev',
1083
+ organization: 'Qwen',
1084
+ parameters: {
1085
+ prompt: {
1086
+ default: '',
1087
+ },
1088
+ seed: { default: null },
1089
+ size: {
1090
+ default: '1024x1024',
1091
+ enum: ['512x1024', '768x512', '768x1024', '1024x576', '576x1024', '1024x1024'],
1092
+ },
1093
+ steps: { default: 50, max: 50, min: 1 },
1094
+ },
1095
+ releasedAt: '2024-08-07',
1096
+ type: 'image',
1097
+ },
1098
+ {
1099
+ description: 'FLUX.1-merged 模型结合了 "DEV" 在开发阶段探索的深度特性和 "Schnell" 所代表的高速执行优势。通过这一举措,FLUX.1-merged 不仅提升了模型的性能界限,还拓宽了其应用范围。',
1100
+ displayName: 'FLUX.1-merged',
1101
+ enabled: true,
1102
+ id: 'flux-merged',
1103
+ organization: 'Qwen',
1104
+ parameters: {
1105
+ prompt: {
1106
+ default: '',
1107
+ },
1108
+ seed: { default: null },
1109
+ size: {
1110
+ default: '1024x1024',
1111
+ enum: ['512x1024', '768x512', '768x1024', '1024x576', '576x1024', '1024x1024'],
1112
+ },
1113
+ steps: { default: 30, max: 30, min: 1 },
1114
+ },
1115
+ releasedAt: '2024-08-22',
1116
+ type: 'image',
1117
+ },
1118
+ {
1119
+ description: 'stable-diffusion-3.5-large 是一个具有8亿参数的多模态扩散变压器(MMDiT)文本到图像生成模型,具备卓越的图像质量和提示词匹配度,支持生成 100 万像素的高分辨率图像,且能够在普通消费级硬件上高效运行。',
1120
+ displayName: 'StableDiffusion 3.5 Large',
1121
+ id: 'stable-diffusion-3.5-large',
1122
+ organization: 'Qwen',
1123
+ parameters: {
1124
+ height: { default: 1024, max: 1024, min: 512, step: 128 },
1125
+ prompt: {
1126
+ default: '',
1127
+ },
1128
+ steps: { default: 40, max: 500, min: 1 },
1129
+ width: { default: 1024, max: 1024, min: 512, step: 128 },
1130
+ },
1131
+ releasedAt: '2024-10-25',
1132
+ type: 'image',
1133
+ },
1134
+ {
1135
+ description: 'stable-diffusion-3.5-large-turbo 是在 stable-diffusion-3.5-large 的基础上采用对抗性扩散蒸馏(ADD)技术的模型,具备更快的速度。',
1136
+ displayName: 'StableDiffusion 3.5 Large Turbo',
1137
+ id: 'stable-diffusion-3.5-large-turbo',
1138
+ organization: 'Qwen',
1139
+ parameters: {
1140
+ height: { default: 1024, max: 1024, min: 512, step: 128 },
1141
+ prompt: {
1142
+ default: '',
1143
+ },
1144
+ steps: { default: 40, max: 500, min: 1 },
1145
+ width: { default: 1024, max: 1024, min: 512, step: 128 },
1146
+ },
1147
+ releasedAt: '2024-10-25',
1148
+ type: 'image',
1149
+ },
1150
+ {
1151
+ description: 'stable-diffusion-xl 相比于 v1.5 做了重大的改进,并且与当前开源的文生图 SOTA 模型 midjourney 效果相当。具体改进之处包括: 更大的 unet backbone,是之前的 3 倍; 增加了 refinement 模块用于改善生成图片的质量;更高效的训练技巧等。',
1152
+ displayName: 'StableDiffusion xl',
1153
+ id: 'stable-diffusion-xl',
1154
+ organization: 'Qwen',
1155
+ parameters: {
1156
+ height: { default: 1024, max: 1024, min: 512, step: 128 },
1157
+ prompt: {
1158
+ default: '',
1159
+ },
1160
+ steps: { default: 50, max: 500, min: 1 },
1161
+ width: { default: 1024, max: 1024, min: 512, step: 128 },
1162
+ },
1163
+ releasedAt: '2024-04-09',
1164
+ type: 'image',
1165
+ },
1166
+ {
1167
+ description: 'stable-diffusion-v1.5 是以 stable-diffusion-v1.2 检查点的权重进行初始化,并在 "laion-aesthetics v2 5+" 上以 512x512 的分辨率进行了595k步的微调,减少了 10% 的文本条件化,以提高无分类器的引导采样。',
1168
+ displayName: 'StableDiffusion v1.5',
1169
+ id: 'stable-diffusion-v1.5',
1170
+ organization: 'Qwen',
1171
+ parameters: {
1172
+ height: { default: 512, max: 1024, min: 512, step: 128 },
1173
+ prompt: {
1174
+ default: '',
1175
+ },
1176
+ steps: { default: 50, max: 500, min: 1 },
1177
+ width: { default: 512, max: 1024, min: 512, step: 128 },
1178
+ },
1179
+ releasedAt: '2024-04-09',
1180
+ type: 'image',
1181
+ },
977
1182
  ];
978
1183
 
979
1184
  export const allModels = [...qwenChatModels, ...qwenImageModels];