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:
+11
-1
@@ -82,6 +82,12 @@ export type HarnessModelInfo = {
|
||||
context_length?: number;
|
||||
max_output_tokens?: number;
|
||||
voices?: string[];
|
||||
/**
|
||||
* The request fields the provider says it takes (OpenRouter's
|
||||
* `supported_parameters`). Undefined when the provider doesn't say:
|
||||
* then every generation setting is sent.
|
||||
*/
|
||||
supported_parameters?: string[];
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -137,7 +143,11 @@ export type HarnessChatParams = {
|
||||
messages: HarnessMessage[];
|
||||
tools?: HarnessToolDefinition[];
|
||||
max_tokens?: number;
|
||||
temperature?: number;
|
||||
/**
|
||||
* Sampling and reasoning fields, keyed by their wire name. The caller
|
||||
* only includes what the model advertises.
|
||||
*/
|
||||
params?: Record<string, number | string | { effort: string }>;
|
||||
signal: AbortSignal;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user