import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { CodeInterpreterToolDefinition, CodeInterpreterToolDefinition$Outbound } from "./codeinterpretertooldefinition.js"; import { CompactionContextManagement, CompactionContextManagement$Outbound } from "./compactioncontextmanagement.js"; import { ComputerUseToolDefinition, ComputerUseToolDefinition$Outbound } from "./computerusetooldefinition.js"; import { Conversation, Conversation$Outbound } from "./conversation.js"; import { CustomToolDefinition, CustomToolDefinition$Outbound } from "./customtooldefinition.js"; import { FileSearchToolDefinition, FileSearchToolDefinition$Outbound } from "./filesearchtooldefinition.js"; import { FunctionToolDefinition, FunctionToolDefinition$Outbound } from "./functiontooldefinition.js"; import { HistoryToolDefinition, HistoryToolDefinition$Outbound } from "./historytooldefinition.js"; import { HostedToolDefinition, HostedToolDefinition$Outbound } from "./hostedtooldefinition.js"; import { ImageGenerationToolDefinition, ImageGenerationToolDefinition$Outbound } from "./imagegenerationtooldefinition.js"; import { LocalShellToolDefinition, LocalShellToolDefinition$Outbound } from "./localshelltooldefinition.js"; import { MCPToolDefinition, MCPToolDefinition$Outbound } from "./mcptooldefinition.js"; import { PromptTemplate, PromptTemplate$Outbound } from "./prompttemplate.js"; import { ReasoningConfiguration, ReasoningConfiguration$Outbound } from "./reasoningconfiguration.js"; import { ShellToolDefinition, ShellToolDefinition$Outbound } from "./shelltooldefinition.js"; import { SleepToolDefinition, SleepToolDefinition$Outbound } from "./sleeptooldefinition.js"; import { SttConfig, SttConfig$Outbound } from "./sttconfig.js"; import { TextConfiguration, TextConfiguration$Outbound } from "./textconfiguration.js"; import { ToolChoice, ToolChoice$Outbound } from "./toolchoice.js"; import { WebSearchPreviewToolDefinition, WebSearchPreviewToolDefinition$Outbound } from "./websearchpreviewtooldefinition.js"; import { WebSearchToolDefinition, WebSearchToolDefinition$Outbound } from "./websearchtooldefinition.js"; export type LivekitTokenRequestConversation = Conversation | string; export type LivekitTokenRequestTools = FunctionToolDefinition | ComputerUseToolDefinition | FileSearchToolDefinition | CodeInterpreterToolDefinition | CustomToolDefinition | WebSearchToolDefinition | MCPToolDefinition | ImageGenerationToolDefinition | LocalShellToolDefinition | ShellToolDefinition | WebSearchPreviewToolDefinition | HostedToolDefinition | SleepToolDefinition | HistoryToolDefinition; /** * The truncation strategy for handling inputs that exceed the model's context window. 'auto' automatically truncates old messages to fit, 'disabled' returns an error if context is too long. Defaults to 'auto'. */ export declare const LivekitTokenRequestTruncation: { readonly Auto: "auto"; readonly Disabled: "disabled"; }; /** * The truncation strategy for handling inputs that exceed the model's context window. 'auto' automatically truncates old messages to fit, 'disabled' returns an error if context is too long. Defaults to 'auto'. */ export type LivekitTokenRequestTruncation = ClosedEnum; /** * Specifies the processing tier for serving the request. 'auto' lets the system choose, 'default' uses standard processing, 'flex' allows flexible scheduling for lower priority, 'priority' provides faster processing. Defaults to 'auto'. */ export declare const LivekitTokenRequestServiceTier: { readonly Auto: "auto"; readonly Default: "default"; readonly Flex: "flex"; readonly Priority: "priority"; }; /** * Specifies the processing tier for serving the request. 'auto' lets the system choose, 'default' uses standard processing, 'flex' allows flexible scheduling for lower priority, 'priority' provides faster processing. Defaults to 'auto'. */ export type LivekitTokenRequestServiceTier = ClosedEnum; /** * LLM configuration for the voice session. Uses a subset of the responses create schema — fields like input, stream, background, webhooks, and store are excluded since the voice agent manages those. WARNING: This object is serialized into the LiveKit JWT metadata which is transmitted via HTTP headers. Keep payloads small — large tools arrays can exceed the ~8KB header size limit imposed by most servers and proxies. */ export type Llm = { /** * The ID of the model to use for generating the response. */ model: string; /** * System or developer instructions inserted into the model's context before user input. Use this to guide the agent's behavior, set personality, define constraints, or provide domain-specific knowledge. Acts as a persistent system message for this response. */ instructions?: string | undefined; /** * The conversation that this response belongs to. Can be a conversation ID string or a conversation object. Used to maintain context and history across multiple agent interactions. Optional - omit for one-off interactions. */ conversation?: Conversation | string | null | undefined; /** * The unique ID of a previous response to continue from. Used for multi-turn conversations to maintain context and history. The agent will have access to all previous interactions in the chain. */ previousResponseId?: string | undefined; prompt?: PromptTemplate | undefined; /** * Array of tool definitions that the agent can use during response generation. Supports built-in tools (web search, file search, code interpreter, computer use, image generation) and custom tools (functions, MCP, local shell). Each tool definition specifies its type and configuration. */ tools?: Array | undefined; toolChoice?: ToolChoice | undefined; /** * Whether to allow the agent to execute multiple tool calls in parallel. When true, the agent can make concurrent tool calls for efficiency. When false, tools are called sequentially. Defaults to true for better performance. */ parallelToolCalls?: boolean | undefined; /** * The maximum total number of tool calls the agent can make during this response. Useful for controlling execution time and preventing infinite loops. Applies to all built-in tools like web search, file search, code interpreter, etc. Must be a positive integer between 1 and 300. Defaults to 64. */ maxToolCalls?: number | undefined; reasoning?: ReasoningConfiguration | undefined; /** * The maximum number of tokens the model can generate in its output. Sets an upper bound to control costs and response length. The actual output may be shorter if the model finishes naturally. Must be a positive integer. */ maxOutputTokens?: number | undefined; /** * Controls randomness in the model's output. Higher values (e.g., 1.5-2.0) make output more random and creative, lower values (e.g., 0.0-0.5) make it more focused and deterministic. Must be between 0 and 2. */ temperature?: number | undefined; /** * Nucleus sampling parameter. The model considers only the tokens with top_p cumulative probability. Lower values (e.g., 0.1) make output more focused, higher values (e.g., 0.9) allow more diversity. Must be between 0 and 1. Alternative to temperature. */ topP?: number | undefined; /** * The truncation strategy for handling inputs that exceed the model's context window. 'auto' automatically truncates old messages to fit, 'disabled' returns an error if context is too long. Defaults to 'auto'. */ truncation?: LivekitTokenRequestTruncation | undefined; /** * Penalizes new tokens based on whether they appear in the text so far. Higher values increase the model's likelihood to talk about new topics. */ presencePenalty?: number | undefined; /** * Penalizes new tokens based on their frequency in the text so far. Higher values decrease the model's likelihood to repeat the same line verbatim. */ frequencyPenalty?: number | undefined; /** * Array of context management strategies to apply during response generation. */ contextManagement?: Array | undefined; /** * Specifies the processing tier for serving the request. 'auto' lets the system choose, 'default' uses standard processing, 'flex' allows flexible scheduling for lower priority, 'priority' provides faster processing. Defaults to 'auto'. */ serviceTier?: LivekitTokenRequestServiceTier | undefined; /** * Custom metadata to attach to this response as key-value pairs. Keys must be strings up to 64 characters, values must be strings up to 512 characters. Maximum 16 pairs. Useful for tracking, categorization, or passing custom identifiers through your system. */ metadata?: { [k: string]: string; } | undefined; text?: TextConfiguration | undefined; }; /** * Request parameters for generating a LiveKit room token with LLM configuration and optional STT settings. */ export type LivekitTokenRequest = { /** * LLM configuration for the voice session. Uses a subset of the responses create schema — fields like input, stream, background, webhooks, and store are excluded since the voice agent manages those. WARNING: This object is serialized into the LiveKit JWT metadata which is transmitted via HTTP headers. Keep payloads small — large tools arrays can exceed the ~8KB header size limit imposed by most servers and proxies. */ llm: Llm; /** * Optional STT (speech-to-text) VAD configuration for the voice session. */ stt?: SttConfig | undefined; }; /** @internal */ export declare const LivekitTokenRequestConversation$inboundSchema: z.ZodType; /** @internal */ export type LivekitTokenRequestConversation$Outbound = Conversation$Outbound | string; /** @internal */ export declare const LivekitTokenRequestConversation$outboundSchema: z.ZodType; export declare function livekitTokenRequestConversationToJSON(livekitTokenRequestConversation: LivekitTokenRequestConversation): string; export declare function livekitTokenRequestConversationFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const LivekitTokenRequestTools$inboundSchema: z.ZodType; /** @internal */ export type LivekitTokenRequestTools$Outbound = FunctionToolDefinition$Outbound | ComputerUseToolDefinition$Outbound | FileSearchToolDefinition$Outbound | CodeInterpreterToolDefinition$Outbound | CustomToolDefinition$Outbound | WebSearchToolDefinition$Outbound | MCPToolDefinition$Outbound | ImageGenerationToolDefinition$Outbound | LocalShellToolDefinition$Outbound | ShellToolDefinition$Outbound | WebSearchPreviewToolDefinition$Outbound | HostedToolDefinition$Outbound | SleepToolDefinition$Outbound | HistoryToolDefinition$Outbound; /** @internal */ export declare const LivekitTokenRequestTools$outboundSchema: z.ZodType; export declare function livekitTokenRequestToolsToJSON(livekitTokenRequestTools: LivekitTokenRequestTools): string; export declare function livekitTokenRequestToolsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const LivekitTokenRequestTruncation$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const LivekitTokenRequestTruncation$outboundSchema: z.ZodNativeEnum; /** @internal */ export declare const LivekitTokenRequestServiceTier$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const LivekitTokenRequestServiceTier$outboundSchema: z.ZodNativeEnum; /** @internal */ export declare const Llm$inboundSchema: z.ZodType; /** @internal */ export type Llm$Outbound = { model: string; instructions?: string | undefined; conversation?: Conversation$Outbound | string | null | undefined; previous_response_id?: string | undefined; prompt?: PromptTemplate$Outbound | undefined; tools?: Array | undefined; tool_choice?: ToolChoice$Outbound | undefined; parallel_tool_calls: boolean; max_tool_calls: number; reasoning?: ReasoningConfiguration$Outbound | undefined; max_output_tokens?: number | undefined; temperature?: number | undefined; top_p?: number | undefined; truncation: string; presence_penalty?: number | undefined; frequency_penalty?: number | undefined; context_management?: Array | undefined; service_tier: string; metadata?: { [k: string]: string; } | undefined; text?: TextConfiguration$Outbound | undefined; }; /** @internal */ export declare const Llm$outboundSchema: z.ZodType; export declare function llmToJSON(llm: Llm): string; export declare function llmFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const LivekitTokenRequest$inboundSchema: z.ZodType; /** @internal */ export type LivekitTokenRequest$Outbound = { llm: Llm$Outbound; stt?: SttConfig$Outbound | undefined; }; /** @internal */ export declare const LivekitTokenRequest$outboundSchema: z.ZodType; export declare function livekitTokenRequestToJSON(livekitTokenRequest: LivekitTokenRequest): string; export declare function livekitTokenRequestFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=livekittokenrequest.d.ts.map