fix(models): support atomic preset renames

This commit is contained in:
Xubin Ren
2026-08-16 11:50:56 +08:00
parent 3dc38f6396
commit c15e6f2a37
12 changed files with 203 additions and 49 deletions
+1
View File
@@ -927,6 +927,7 @@ export async function updateModelConfiguration(
"settings.model_configuration.update",
{
name: configuration.name,
...(configuration.newName !== undefined ? { new_name: configuration.newName } : {}),
...(configuration.provider !== undefined ? { provider: configuration.provider } : {}),
...(configuration.model !== undefined ? { model: configuration.model } : {}),
...modelGenerationSettingsPayload(configuration),
+1
View File
@@ -1097,6 +1097,7 @@ export interface ModelConfigurationCreate {
export interface ModelConfigurationUpdate {
name: string;
newName?: string;
provider?: string;
model?: string;
maxTokens?: number;