Skip to content

Commit 6f301c4

Browse files
authored
🐛 Fixed an issue where batch modification of the maximum token count was not synchronized in a single model setting. #1575
2 parents 8f1bd2f + 2faff07 commit 6f301c4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

frontend/app/[locale]/setup/models/components/model/ModelDeleteDialog.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,14 @@ export const ModelDeleteDialog = ({
460460
// Show success message since no exception was thrown
461461
message.success(t("model.dialog.success.updateSuccess"));
462462

463+
// Synchronize providerModels state with the updated maxTokens
464+
setProviderModels((prev) =>
465+
prev.map((model) => ({
466+
...model,
467+
max_tokens: maxTokens || model.max_tokens || 4096,
468+
}))
469+
);
470+
463471
// Optionally use currentModelPayloads for subsequent API calls if needed
464472
} catch (e) {
465473
message.error(t("model.dialog.error.noModelsFetched"));

0 commit comments

Comments
 (0)