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:
@@ -258,6 +258,10 @@ export type HarnessModelOption = {
|
||||
name: string;
|
||||
free: boolean;
|
||||
voices?: string[];
|
||||
/**
|
||||
* The generation settings the model takes; undefined: all of them.
|
||||
*/
|
||||
supported_parameters?: string[];
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -325,6 +329,11 @@ export type HarnessFormValue = {
|
||||
fallback: boolean;
|
||||
enabled: boolean;
|
||||
voice?: string;
|
||||
/**
|
||||
* Generation settings (temperature, reasoning effort, ...), only the
|
||||
* ones the picked model takes.
|
||||
*/
|
||||
params?: Record<string, number | string>;
|
||||
};
|
||||
|
||||
export type HarnessSettingsFormObject = Partial<
|
||||
|
||||
Reference in New Issue
Block a user