From 46d3e7884b82b591d6f0204ee4083384864d95e6 Mon Sep 17 00:00:00 2001 From: lloydzhou Date: Fri, 12 Jul 2024 22:53:39 +0800 Subject: [PATCH 1/2] hotfix: bytedance custom models --- app/utils/model.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/utils/model.ts b/app/utils/model.ts index 2681882ef37..55a5ee0d67d 100644 --- a/app/utils/model.ts +++ b/app/utils/model.ts @@ -71,10 +71,14 @@ export function collectModelTable( } // 2. if model not exists, create new model with available value if (count === 0) { - const [customModelName, customProviderName] = name.split("@"); + let [customModelName, customProviderName] = name.split("@"); const provider = customProvider( customProviderName || customModelName, ); + // swap name and displayName for bytedance + if (displayName && provider.providerName == "ByteDance") { + [customModelName, displayName] = [displayName, customModelName]; + } modelTable[`${customModelName}@${provider?.id}`] = { name: customModelName, displayName: displayName || customModelName, From 53c1176cbf30c4f302d10b467df2fac5645932f2 Mon Sep 17 00:00:00 2001 From: lloydzhou Date: Fri, 12 Jul 2024 23:06:37 +0800 Subject: [PATCH 2/2] update labels in setting page --- app/components/settings.tsx | 3 +-- app/locales/cn.ts | 2 +- app/locales/en.ts | 10 +++++----- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/app/components/settings.tsx b/app/components/settings.tsx index 3c5ab5e0617..00306b393af 100644 --- a/app/components/settings.tsx +++ b/app/components/settings.tsx @@ -1195,8 +1195,7 @@ export function Settings() {