Skip to content

Commit 3f29aa3

Browse files
committed
fix(language-model-selector): skip save API call for o1 and r1 models
1 parent af17572 commit 3f29aa3

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/plugins/_core/ui-groups/query-box/shared-store.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,13 @@ const useSharedQueryBoxStore = createWithEqualityFn<SharedQueryBoxStore>()(
6262
selectedLanguageModel: "turbo",
6363
setSelectedLanguageModel: async (selectedLanguageModel) => {
6464
set({ selectedLanguageModel });
65-
await PplxApiService.setDefaultLanguageModel(selectedLanguageModel);
66-
queryClient.invalidateQueries({
67-
queryKey: pplxApiQueries.userSettings.queryKey,
68-
});
65+
66+
if (!["o1", "r1"].includes(selectedLanguageModel)) {
67+
await PplxApiService.setDefaultLanguageModel(selectedLanguageModel);
68+
queryClient.invalidateQueries({
69+
queryKey: pplxApiQueries.userSettings.queryKey,
70+
});
71+
}
6972
},
7073
forceExternalSourcesOff: false,
7174
setForceExternalSourcesOff: (forceExternalSourcesOff) => {

0 commit comments

Comments
 (0)