diff --git a/app/components/chat.tsx b/app/components/chat.tsx
index 36928af9c..c87791109 100644
--- a/app/components/chat.tsx
+++ b/app/components/chat.tsx
@@ -512,17 +512,18 @@ export function ChatActions(props: {
icon={}
/>
- {config.pluginConfig.enable && !/03\d{2}$/.test(currentModel) && (
- : }
- />
- )}
+ {config.pluginConfig.enable &&
+ /^gpt(?!.*03\d{2}$).*$/.test(currentModel) && (
+ : }
+ />
+ )}
{showModelSelector && (
{
session.mask.modelConfig.model = s[0] as ModelType;
session.mask.syncGlobalConfig = false;
- session.mask.usePlugins = !/03\d{2}$/.test(
+ session.mask.usePlugins = /^gpt(?!.*03\d{2}$).*$/.test(
session.mask.modelConfig.model,
);
});
diff --git a/app/store/mask.ts b/app/store/mask.ts
index 19509e1b3..9c07d52b4 100644
--- a/app/store/mask.ts
+++ b/app/store/mask.ts
@@ -38,8 +38,10 @@ export const createEmptyMask = () =>
lang: getLang(),
builtin: false,
createdAt: Date.now(),
- usePlugins: !/03\d{2}$/.test(useAppConfig.getState().modelConfig.model),
- } as Mask);
+ usePlugins: /^gpt(?!.*03\d{2}$).*$/.test(
+ useAppConfig.getState().modelConfig.model,
+ ),
+ }) as Mask;
export const useMaskStore = createPersistStore(
{ ...DEFAULT_MASK_STATE },
@@ -94,7 +96,7 @@ export const useMaskStore = createPersistStore(
...config.modelConfig,
...m.modelConfig,
},
- } as Mask),
+ }) as Mask,
);
return userMasks.concat(buildinMasks);
},