Add per-model generation settings to the model selector

Each text and vision harness setting now carries the generation settings
its model takes (temperature, sampling limits, penalties, seed, reasoning
effort), edited in a modal under the model pick so the harness block stays
short. Nothing is set by default, so models keep their provider's own
values until a super admin or admin changes them.

A setting is only offered and only sent when the catalog says the model
takes it: OpenRouter's supported_parameters is now stored on
harness_models and refreshed by the hourly sync. Other providers list no
parameters, so their models get them all.
This commit is contained in:
2026-10-22 04:52:55 +01:00
parent fe502b38fe
commit c2553a4746
25 changed files with 644 additions and 13 deletions
+5
View File
@@ -45,6 +45,11 @@ export const SaveHarnessSettingsRequestSchema = z.object({
fallback: z.boolean(),
enabled: z.boolean(),
voice: z.string().trim().max(200).optional(),
/**
* Generation settings (temperature, reasoning effort, ...).
* Only the ones in `HarnessParameters` are kept.
*/
params: z.record(z.string(), z.union([z.number(), z.string()])).optional(),
}),
)
.min(1, "Nothing to save")