Skip to content

Commit 2d3bc51

Browse files
committed
fix: fix regression where model sync was skipped when switching back to OpenAI
- Introduced a new `force` parameter to bypass the provider compatibility check for "openai-compatible". - Updated the logic in the App component to utilize the `force` option when setting the active model, enhancing flexibility in provider management.
1 parent f289614 commit 2d3bc51

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/App.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,14 @@ const App = () => {
9797
baseURLOverride,
9898
apiKeyOverride,
9999
silent = false,
100+
force = false,
100101
}: {
101102
baseURLOverride?: string;
102103
apiKeyOverride?: string;
103104
silent?: boolean;
105+
force?: boolean;
104106
} = {}) => {
105-
if (providerKind !== "openai-compatible") {
107+
if (!force && providerKind !== "openai-compatible") {
106108
return [];
107109
}
108110
const targetBaseURL = (baseURLOverride ?? baseURL).trim();
@@ -627,6 +629,7 @@ const App = () => {
627629
baseURLOverride: nextBaseURL,
628630
apiKeyOverride: nextAPIKey,
629631
silent: true,
632+
force: true,
630633
});
631634
} else {
632635
setActiveModel(null);

0 commit comments

Comments
 (0)