import { z } from 'zod'; import type { TConversation, TSetOption, TPreset } from './schemas'; import { googleSettings as google } from './schemas'; export type GoogleSettings = Partial; export type OpenAISettings = Partial; export type ComponentType = 'input' | 'textarea' | 'slider' | 'checkbox' | 'switch' | 'dropdown' | 'combobox' | 'tags'; export type OptionType = 'conversation' | 'model' | 'custom'; export type Option = Record & { label?: string; value: string | number | null; }; export type OptionWithIcon = Option & { icon?: React.ReactNode; }; export declare enum ComponentTypes { Input = "input", Textarea = "textarea", Slider = "slider", Checkbox = "checkbox", Switch = "switch", Dropdown = "dropdown", Combobox = "combobox", Tags = "tags" } export declare enum SettingTypes { Number = "number", Boolean = "boolean", String = "string", Enum = "enum", Array = "array" } export declare enum OptionTypes { Conversation = "conversation", Model = "model", Custom = "custom" } export interface SettingDefinition { key: string; description?: string; type: 'number' | 'boolean' | 'string' | 'enum' | 'array'; default?: number | boolean | string | string[]; showLabel?: boolean; showDefault?: boolean; options?: string[]; range?: SettingRange; enumMappings?: Record; component: ComponentType; optionType?: OptionType; columnSpan?: number; columns?: number; label?: string; placeholder?: string; labelCode?: boolean; placeholderCode?: boolean; descriptionCode?: boolean; minText?: number; maxText?: number; minTags?: number; maxTags?: number; includeInput?: boolean; descriptionSide?: 'top' | 'right' | 'bottom' | 'left'; items?: OptionWithIcon[]; searchPlaceholder?: string; selectPlaceholder?: string; searchPlaceholderCode?: boolean; selectPlaceholderCode?: boolean; } export type DynamicSettingProps = Partial & { readonly?: boolean; settingKey: string; setOption: TSetOption; conversation: Partial | Partial | null; defaultValue?: number | boolean | string | string[]; className?: string; inputClassName?: string; }; export interface SettingRange { min: number; max: number; step?: number; /** * Inclusive floor for non-negative values. Use when `min` is a sentinel * (Google thinkingBudget `-1` for auto) and positive values have a higher * documented minimum. */ positiveMin?: number; /** * Set when this range came from the selected model rather than the shared * fallback. Only then is it safe to normalize a stored value against it: a * model that does not use the parameter leaves the generic range in place, * and clamping to that would discard a value set for another model. */ modelSpecific?: boolean; } export declare function clampSettingRange(value: number, range: SettingRange): number; export type SettingsConfiguration = SettingDefinition[]; export declare function generateDynamicSchema(settings: SettingsConfiguration): z.ZodObject<{ [key: string]: z.ZodTypeAny; }, "strip", z.ZodTypeAny, { [x: string]: any; }, { [x: string]: any; }>; /** * Validates the provided setting using the constraints unique to each component type. * @throws {ZodError} Throws a ZodError if any validation fails. */ export declare function validateSettingDefinitions(settings: SettingsConfiguration): void; export declare const generateOpenAISchema: (customOpenAI: OpenAISettings) => z.ZodCatch; endpoint: z.ZodNullable>; endpointType: z.ZodOptional>>; isArchived: z.ZodOptional; archivedAt: z.ZodOptional>; pinned: z.ZodOptional; isShared: z.ZodOptional; codeApprovalMode: z.ZodOptional>; codeEnvironmentMode: z.ZodOptional>; codeWorkspaces: z.ZodOptional, "many">>; title: z.ZodDefault, z.ZodLiteral<"New Chat">]>>; user: z.ZodOptional; messages: z.ZodOptional>; tools: z.ZodOptional; icon: z.ZodOptional; authConfig: z.ZodOptional; sensitive: z.ZodOptional; }, "strip", z.ZodTypeAny, { description: string; authField: string; label: string; optional?: boolean | undefined; sensitive?: boolean | undefined; }, { description: string; authField: string; label: string; optional?: boolean | undefined; sensitive?: boolean | undefined; }>, "many">>; authenticated: z.ZodOptional; chatMenu: z.ZodOptional; isButton: z.ZodOptional; toolkit: z.ZodOptional; serverToolName: z.ZodOptional; }, "strip", z.ZodTypeAny, { name: string; pluginKey: string; description?: string | undefined; icon?: string | undefined; authConfig?: { description: string; authField: string; label: string; optional?: boolean | undefined; sensitive?: boolean | undefined; }[] | undefined; authenticated?: boolean | undefined; chatMenu?: boolean | undefined; isButton?: boolean | undefined; toolkit?: boolean | undefined; serverToolName?: string | undefined; }, { name: string; pluginKey: string; description?: string | undefined; icon?: string | undefined; authConfig?: { description: string; authField: string; label: string; optional?: boolean | undefined; sensitive?: boolean | undefined; }[] | undefined; authenticated?: boolean | undefined; chatMenu?: boolean | undefined; isButton?: boolean | undefined; toolkit?: boolean | undefined; serverToolName?: string | undefined; }>, "many">, z.ZodArray]>>; modelLabel: z.ZodOptional>; userLabel: z.ZodOptional; model: z.ZodOptional>; promptPrefix: z.ZodOptional>; temperature: z.ZodOptional>; topP: z.ZodOptional; topK: z.ZodOptional; top_p: z.ZodOptional; frequency_penalty: z.ZodOptional; presence_penalty: z.ZodOptional; parentMessageId: z.ZodOptional; maxOutputTokens: z.ZodOptional, number | undefined, string | number>>>; maxContextTokens: z.ZodOptional, number | undefined, string | number>>; max_tokens: z.ZodOptional, number | undefined, string | number>>; promptCache: z.ZodOptional; promptCacheTtl: z.ZodOptional>; system: z.ZodOptional; thinking: z.ZodOptional; thinkingBudget: z.ZodOptional, number | undefined, string | number>>; thinkingLevel: z.ZodOptional>; stream: z.ZodOptional; artifacts: z.ZodOptional; context: z.ZodOptional>; examples: z.ZodOptional; output: z.ZodObject<{ content: z.ZodString; }, "strip", z.ZodTypeAny, { content: string; }, { content: string; }>; }, "strip", z.ZodTypeAny, { input: { content: string; }; output: { content: string; }; }, { input: { content: string; }; output: { content: string; }; }>, "many">>; tags: z.ZodOptional>; chatProjectId: z.ZodOptional>; createdAt: z.ZodString; updatedAt: z.ZodString; resendFiles: z.ZodOptional; file_ids: z.ZodOptional>; imageDetail: z.ZodOptional>; reasoning_effort: z.ZodNullable>>; reasoning_summary: z.ZodNullable>>; reasoning_mode: z.ZodNullable>>; reasoning_context: z.ZodNullable>>; verbosity: z.ZodNullable>>; useResponsesApi: z.ZodOptional; effort: z.ZodNullable>>; thinkingDisplay: z.ZodNullable>>; web_search: z.ZodOptional; url_context: z.ZodOptional; disableStreaming: z.ZodOptional; assistant_id: z.ZodOptional; agent_id: z.ZodOptional; subagentThread: z.ZodOptional; subagentType: z.ZodString; subagentKind: z.ZodEnum<["agent", "graph"]>; depth: z.ZodNumber; }, "strip", z.ZodTypeAny, { subagentKind: "agent" | "graph"; parentMessageId: string; rootConversationId: string; parentConversationId: string; parentToolCallId: string; subagentType: string; depth: number; parentAgentId?: string | undefined; }, { subagentKind: "agent" | "graph"; parentMessageId: string; rootConversationId: string; parentConversationId: string; parentToolCallId: string; subagentType: string; depth: number; parentAgentId?: string | undefined; }>>; region: z.ZodOptional; maxTokens: z.ZodOptional, number | undefined, string | number>>; additionalModelRequestFields: z.ZodOptional>; instructions: z.ZodOptional; additional_instructions: z.ZodOptional; append_current_datetime: z.ZodOptional; presetOverride: z.ZodOptional>; stop: z.ZodOptional>; greeting: z.ZodOptional; spec: z.ZodOptional>; iconURL: z.ZodOptional>; expiredAt: z.ZodOptional>; isTemporary: z.ZodOptional; fileTokenLimit: z.ZodOptional, number | undefined, string | number>>; resendImages: z.ZodOptional; chatGptLabel: z.ZodOptional>; }, "model" | "promptPrefix" | "temperature" | "top_p" | "frequency_penalty" | "presence_penalty" | "maxContextTokens" | "resendFiles" | "imageDetail" | "chatGptLabel">, "strip", z.ZodTypeAny, { model?: string | null | undefined; promptPrefix?: string | null | undefined; temperature?: number | null | undefined; top_p?: number | undefined; frequency_penalty?: number | undefined; presence_penalty?: number | undefined; maxContextTokens?: number | undefined; resendFiles?: boolean | undefined; imageDetail?: import("./schemas").ImageDetail | undefined; chatGptLabel?: string | null | undefined; }, { model?: string | null | undefined; promptPrefix?: string | null | undefined; temperature?: number | null | undefined; top_p?: number | undefined; frequency_penalty?: number | undefined; presence_penalty?: number | undefined; maxContextTokens?: string | number | undefined; resendFiles?: boolean | undefined; imageDetail?: import("./schemas").ImageDetail | undefined; chatGptLabel?: string | null | undefined; }>, { model: string; chatGptLabel: string | null; promptPrefix: string | null; temperature: number; top_p: number; presence_penalty: number; frequency_penalty: number; resendFiles: boolean; imageDetail: import("./schemas").ImageDetail; maxContextTokens: number | undefined; }, { model?: string | null | undefined; promptPrefix?: string | null | undefined; temperature?: number | null | undefined; top_p?: number | undefined; frequency_penalty?: number | undefined; presence_penalty?: number | undefined; maxContextTokens?: string | number | undefined; resendFiles?: boolean | undefined; imageDetail?: import("./schemas").ImageDetail | undefined; chatGptLabel?: string | null | undefined; }>>; export declare const generateGoogleSchema: (customGoogle: GoogleSettings) => z.ZodCatch; endpoint: z.ZodNullable>; endpointType: z.ZodOptional>>; isArchived: z.ZodOptional; archivedAt: z.ZodOptional>; pinned: z.ZodOptional; isShared: z.ZodOptional; codeApprovalMode: z.ZodOptional>; codeEnvironmentMode: z.ZodOptional>; codeWorkspaces: z.ZodOptional, "many">>; title: z.ZodDefault, z.ZodLiteral<"New Chat">]>>; user: z.ZodOptional; messages: z.ZodOptional>; tools: z.ZodOptional; icon: z.ZodOptional; authConfig: z.ZodOptional; sensitive: z.ZodOptional; }, "strip", z.ZodTypeAny, { description: string; authField: string; label: string; optional?: boolean | undefined; sensitive?: boolean | undefined; }, { description: string; authField: string; label: string; optional?: boolean | undefined; sensitive?: boolean | undefined; }>, "many">>; authenticated: z.ZodOptional; chatMenu: z.ZodOptional; isButton: z.ZodOptional; toolkit: z.ZodOptional; serverToolName: z.ZodOptional; }, "strip", z.ZodTypeAny, { name: string; pluginKey: string; description?: string | undefined; icon?: string | undefined; authConfig?: { description: string; authField: string; label: string; optional?: boolean | undefined; sensitive?: boolean | undefined; }[] | undefined; authenticated?: boolean | undefined; chatMenu?: boolean | undefined; isButton?: boolean | undefined; toolkit?: boolean | undefined; serverToolName?: string | undefined; }, { name: string; pluginKey: string; description?: string | undefined; icon?: string | undefined; authConfig?: { description: string; authField: string; label: string; optional?: boolean | undefined; sensitive?: boolean | undefined; }[] | undefined; authenticated?: boolean | undefined; chatMenu?: boolean | undefined; isButton?: boolean | undefined; toolkit?: boolean | undefined; serverToolName?: string | undefined; }>, "many">, z.ZodArray]>>; modelLabel: z.ZodOptional>; userLabel: z.ZodOptional; model: z.ZodOptional>; promptPrefix: z.ZodOptional>; temperature: z.ZodOptional>; topP: z.ZodOptional; topK: z.ZodOptional; top_p: z.ZodOptional; frequency_penalty: z.ZodOptional; presence_penalty: z.ZodOptional; parentMessageId: z.ZodOptional; maxOutputTokens: z.ZodOptional, number | undefined, string | number>>>; maxContextTokens: z.ZodOptional, number | undefined, string | number>>; max_tokens: z.ZodOptional, number | undefined, string | number>>; promptCache: z.ZodOptional; promptCacheTtl: z.ZodOptional>; system: z.ZodOptional; thinking: z.ZodOptional; thinkingBudget: z.ZodOptional, number | undefined, string | number>>; thinkingLevel: z.ZodOptional>; stream: z.ZodOptional; artifacts: z.ZodOptional; context: z.ZodOptional>; examples: z.ZodOptional; output: z.ZodObject<{ content: z.ZodString; }, "strip", z.ZodTypeAny, { content: string; }, { content: string; }>; }, "strip", z.ZodTypeAny, { input: { content: string; }; output: { content: string; }; }, { input: { content: string; }; output: { content: string; }; }>, "many">>; tags: z.ZodOptional>; chatProjectId: z.ZodOptional>; createdAt: z.ZodString; updatedAt: z.ZodString; resendFiles: z.ZodOptional; file_ids: z.ZodOptional>; imageDetail: z.ZodOptional>; reasoning_effort: z.ZodNullable>>; reasoning_summary: z.ZodNullable>>; reasoning_mode: z.ZodNullable>>; reasoning_context: z.ZodNullable>>; verbosity: z.ZodNullable>>; useResponsesApi: z.ZodOptional; effort: z.ZodNullable>>; thinkingDisplay: z.ZodNullable>>; web_search: z.ZodOptional; url_context: z.ZodOptional; disableStreaming: z.ZodOptional; assistant_id: z.ZodOptional; agent_id: z.ZodOptional; subagentThread: z.ZodOptional; subagentType: z.ZodString; subagentKind: z.ZodEnum<["agent", "graph"]>; depth: z.ZodNumber; }, "strip", z.ZodTypeAny, { subagentKind: "agent" | "graph"; parentMessageId: string; rootConversationId: string; parentConversationId: string; parentToolCallId: string; subagentType: string; depth: number; parentAgentId?: string | undefined; }, { subagentKind: "agent" | "graph"; parentMessageId: string; rootConversationId: string; parentConversationId: string; parentToolCallId: string; subagentType: string; depth: number; parentAgentId?: string | undefined; }>>; region: z.ZodOptional; maxTokens: z.ZodOptional, number | undefined, string | number>>; additionalModelRequestFields: z.ZodOptional>; instructions: z.ZodOptional; additional_instructions: z.ZodOptional; append_current_datetime: z.ZodOptional; presetOverride: z.ZodOptional>; stop: z.ZodOptional>; greeting: z.ZodOptional; spec: z.ZodOptional>; iconURL: z.ZodOptional>; expiredAt: z.ZodOptional>; isTemporary: z.ZodOptional; fileTokenLimit: z.ZodOptional, number | undefined, string | number>>; resendImages: z.ZodOptional; chatGptLabel: z.ZodOptional>; }, "model" | "modelLabel" | "promptPrefix" | "temperature" | "topP" | "topK" | "maxOutputTokens" | "maxContextTokens" | "examples">, "strip", z.ZodTypeAny, { model?: string | null | undefined; modelLabel?: string | null | undefined; promptPrefix?: string | null | undefined; temperature?: number | null | undefined; topP?: number | undefined; topK?: number | undefined; maxOutputTokens?: number | null | undefined; maxContextTokens?: number | undefined; examples?: { input: { content: string; }; output: { content: string; }; }[] | undefined; }, { model?: string | null | undefined; modelLabel?: string | null | undefined; promptPrefix?: string | null | undefined; temperature?: number | null | undefined; topP?: number | undefined; topK?: number | undefined; maxOutputTokens?: string | number | null | undefined; maxContextTokens?: string | number | undefined; examples?: { input: { content: string; }; output: { content: string; }; }[] | undefined; }>, { model: string; modelLabel: string | null; promptPrefix: string | null; examples: { input: { content: string; }; output: { content: string; }; }[]; temperature: number; maxOutputTokens: number; topP: number; topK: number; maxContextTokens: number | undefined; }, { model?: string | null | undefined; modelLabel?: string | null | undefined; promptPrefix?: string | null | undefined; temperature?: number | null | undefined; topP?: number | undefined; topK?: number | undefined; maxOutputTokens?: string | number | null | undefined; maxContextTokens?: string | number | undefined; examples?: { input: { content: string; }; output: { content: string; }; }[] | undefined; }>>;