Add on-demand start configuration to instance options and basic fields

This commit is contained in:
2025-08-20 14:56:11 +02:00
parent 4bc9362f7a
commit 8265a94bf7
2 changed files with 6 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
import { type CreateInstanceOptions, getAllFieldKeys } from '@/schemas/instanceOptions' import { type CreateInstanceOptions, getAllFieldKeys } from '@/schemas/instanceOptions'
import { on } from 'events'
// Only define the basic fields we want to show by default // Only define the basic fields we want to show by default
export const basicFieldsConfig: Record<string, { export const basicFieldsConfig: Record<string, {
@@ -26,6 +27,10 @@ export const basicFieldsConfig: Record<string, {
placeholder: '60', placeholder: '60',
description: 'Time in minutes before instance is considered idle and stopped' description: 'Time in minutes before instance is considered idle and stopped'
}, },
on_demand_start: {
label: 'On-Demand Start',
description: 'Start instance upon receiving OpenAI-compatible API request'
},
model: { model: {
label: 'Model Path', label: 'Model Path',
placeholder: '/path/to/model.gguf', placeholder: '/path/to/model.gguf',

View File

@@ -7,6 +7,7 @@ export const CreateInstanceOptionsSchema = z.object({
max_restarts: z.number().optional(), max_restarts: z.number().optional(),
restart_delay: z.number().optional(), restart_delay: z.number().optional(),
idle_timeout: z.number().optional(), idle_timeout: z.number().optional(),
on_demand_start: z.boolean().optional(),
// Common params // Common params
verbose_prompt: z.boolean().optional(), verbose_prompt: z.boolean().optional(),