// This file is auto-generated by @hey-api/openapi-ts

export type ClientOptions = {
    baseUrl: `${string}://${string}` | (string & {});
};

export type EmbeddingDimensionsInput = 3072 | 1536 | 768;

export type LocalConfigEnvironmentDefaultInput = string | number | boolean;

export type OpenAiChatCompletionRequestInput = {
    model: string;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186
     */
    messages: Array<{
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'developer';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'system';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        } | {
            type: 'input_audio';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792
             */
            input_audio: {
                data: string;
                format: 'wav' | 'mp3';
            };
        } | {
            type: 'file';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732
             */
            file: {
                file_data?: string;
                file_id?: string;
                filename?: string;
            };
        }>;
        role: 'user';
        name?: string;
    } | {
        role: 'assistant';
        audio?: {
            id: string;
        } | null;
        content?: string | Array<{
            type: 'text';
            text: string;
        }> | Array<{
            type: 'refusal';
            refusal: string;
        }> | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
         */
        function_call?: {
            arguments: string;
            name: string;
        } | null;
        name?: string;
        refusal?: string | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197
         */
        tool_calls?: Array<{
            id: string;
            type: 'function';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
             */
            function: {
                arguments: string;
                name: string;
            };
        } | {
            id: string;
            type: 'custom';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
             */
            custom: {
                input: string;
                name: string;
            };
        }>;
    } | {
        role: 'tool';
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        }>;
        tool_call_id: string;
    } | {
        role: 'function';
        content: string | null;
        name: string;
    }>;
    /**
     *
     * A function tool that can be used to generate a response.
     *
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392
     *
     */
    tools?: Array<{
        type: 'function';
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
         */
        function: {
            name: string;
            description?: string;
            /**
             *
             * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
             *
             * The parameters the functions accepts, described as a JSON Schema object. See the
             * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
             * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
             * documentation about the format.
             *
             * Omitting parameters defines a function with an empty parameter list.
             *
             */
            parameters?: {
                [key: string]: unknown;
            };
            strict?: boolean | null;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    }>;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405
     */
    tool_choice?: 'none' | 'auto' | 'required' | {
        type: 'allowed_tools';
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455
         */
        allowed_tools: {
            /**
             *
             * Constrains the tools available to the model to a pre-defined set.
             *
             * auto allows the model to pick from among the allowed tools and generate a
             * message.
             *
             * required requires the model to call one or more of the allowed tools.
             *
             */
            mode: 'auto' | 'required';
            /**
             * A list of tool definitions that the model should be allowed to call
             */
            tools: Array<{
                [key: string]: {
                    type: 'function';
                    /**
                     * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
                     */
                    function: {
                        name: string;
                        description?: string;
                        /**
                         *
                         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
                         *
                         * The parameters the functions accepts, described as a JSON Schema object. See the
                         * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
                         * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
                         * documentation about the format.
                         *
                         * Omitting parameters defines a function with an empty parameter list.
                         *
                         */
                        parameters?: {
                            [key: string]: unknown;
                        };
                        strict?: boolean | null;
                    };
                };
            }>;
        };
    } | {
        type: 'function';
        function: {
            name: string;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    };
    temperature?: number | null;
    max_tokens?: number | null;
    stream?: boolean | null;
};

export type OpenAiChatCompletionResponseInput = {
    id: string;
    choices: Array<{
        finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';
        index: number;
        logprobs: unknown;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000
         */
        message: {
            content: string | null;
            refusal?: string | null;
            role: 'assistant';
            annotations?: Array<unknown>;
            audio?: unknown;
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
             */
            function_call?: {
                arguments: string;
                name: string;
            } | null;
            tool_calls?: Array<{
                id: string;
                type: 'function';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
                 */
                function: {
                    arguments: string;
                    name: string;
                };
            } | {
                id: string;
                type: 'custom';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
                 */
                custom: {
                    input: string;
                    name: string;
                };
            }> | null;
        };
    }>;
    created: number;
    model: string;
    object: 'chat.completion';
    server_tier?: string;
    system_fingerprint?: string | null;
    /**
     * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113
     */
    usage?: {
        completion_tokens: number;
        prompt_tokens: number;
        total_tokens: number;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144
         */
        completion_tokens_details?: unknown;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173
         */
        prompt_tokens_details?: unknown;
    };
};

export type GeminiGenerateContentRequestInput = {
    /**
     * The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries like chat, this is a repeated field that contains the conversation history and the latest request
     */
    contents: Array<{
        /**
         * The role of the author of this content.
         */
        role: string;
        parts: Array<{
            /**
             * Indicates if the part is thought from the model
             */
            thought?: boolean;
            /**
             * An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string
             */
            thoughtSignature?: string;
            text: string;
            /**
             * https://ai.google.dev/api/caching#VideoMetadata
             */
            metadata?: {
                /**
                 * The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                 */
                startOffset?: string;
                /**
                 * The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                 */
                endOffset?: string;
                /**
                 * The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]
                 */
                fps?: number;
            };
        } | {
            /**
             * Indicates if the part is thought from the model
             */
            thought?: boolean;
            /**
             * An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string
             */
            thoughtSignature?: string;
            inlineData: {
                mimeType?: string;
                data: string;
            };
            /**
             * https://ai.google.dev/api/caching#VideoMetadata
             */
            metadata?: {
                /**
                 * The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                 */
                startOffset?: string;
                /**
                 * The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                 */
                endOffset?: string;
                /**
                 * The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]
                 */
                fps?: number;
            };
        } | {
            /**
             * Indicates if the part is thought from the model
             */
            thought?: boolean;
            /**
             * An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string
             */
            thoughtSignature?: string;
            functionCall: {
                id?: string;
                name: string;
                args?: {
                    [key: string]: unknown;
                };
            };
            /**
             * https://ai.google.dev/api/caching#VideoMetadata
             */
            metadata?: {
                /**
                 * The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                 */
                startOffset?: string;
                /**
                 * The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                 */
                endOffset?: string;
                /**
                 * The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]
                 */
                fps?: number;
            };
        } | {
            /**
             * Indicates if the part is thought from the model
             */
            thought?: boolean;
            /**
             * An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string
             */
            thoughtSignature?: string;
            functionResponse: {
                id?: string;
                name: string;
                response: {
                    [key: string]: unknown;
                };
                willContinue?: boolean;
                scheduling?: 'SCHEDULING_UNSPECIFIED' | 'SILENT' | 'WHEN_IDLE' | 'INTERRUPT';
            };
            /**
             * https://ai.google.dev/api/caching#VideoMetadata
             */
            metadata?: {
                /**
                 * The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                 */
                startOffset?: string;
                /**
                 * The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                 */
                endOffset?: string;
                /**
                 * The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]
                 */
                fps?: number;
            };
        } | {
            /**
             * Indicates if the part is thought from the model
             */
            thought?: boolean;
            /**
             * An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string
             */
            thoughtSignature?: string;
            fileData: {
                mimeType?: string;
                fileUri: string;
            };
            /**
             * https://ai.google.dev/api/caching#VideoMetadata
             */
            metadata?: {
                /**
                 * The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                 */
                startOffset?: string;
                /**
                 * The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                 */
                endOffset?: string;
                /**
                 * The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]
                 */
                fps?: number;
            };
        } | {
            /**
             * Indicates if the part is thought from the model
             */
            thought?: boolean;
            /**
             * An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string
             */
            thoughtSignature?: string;
            language: 'LANGUAGE_UNSPECIFIED' | 'PYTHON';
            executableCode: {
                code: string;
            };
            /**
             * https://ai.google.dev/api/caching#VideoMetadata
             */
            metadata?: {
                /**
                 * The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                 */
                startOffset?: string;
                /**
                 * The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                 */
                endOffset?: string;
                /**
                 * The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]
                 */
                fps?: number;
            };
        } | {
            /**
             * Indicates if the part is thought from the model
             */
            thought?: boolean;
            /**
             * An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string
             */
            thoughtSignature?: string;
            codeExecutionResult: {
                /**
                 * Outcome of the code execution.
                 */
                outcome: 'OUTCOME_UNSPECIFIED' | 'OUTCOME_OK' | 'OUTCOME_FAILED' | 'OUTCOME_DEADLINE_EXCEEDED';
                output?: string;
            };
            /**
             * https://ai.google.dev/api/caching#VideoMetadata
             */
            metadata?: {
                /**
                 * The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                 */
                startOffset?: string;
                /**
                 * The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                 */
                endOffset?: string;
                /**
                 * The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]
                 */
                fps?: number;
            };
        }>;
    }>;
    /**
     * A list of Tools the Model may use to generate the next response. A Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the Model. Supported Tools are Function and codeExecution. Refer to the Function calling and the Code execution guides to learn more.
     */
    tools?: Array<{
        functionDeclarations?: Array<{
            /**
             * The name of the function. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 63.
             */
            name: string;
            /**
             * A brief description of the function.
             */
            description: string;
            /**
             * https://ai.google.dev/api/caching#Behavior
             */
            behavior?: 'UNSPECIFIED' | 'BLOCKING' | 'NON_BLOCKING';
            /**
             * Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.
             */
            parameters?: {
                [key: string]: unknown;
            };
            parametersJsonSchema?: unknown;
            response?: unknown;
            responseJsonSchema?: unknown;
        }>;
        /**
         * https://ai.google.dev/api/caching#GoogleSearchRetrieval
         */
        googleSearchRetrieval?: {
            /**
             *
             * Specifies the dynamic retrieval configuration for the given source.
             *
             * https://ai.google.dev/api/caching#DynamicRetrievalConfig
             *
             */
            dynamicRetrievalConfig: {
                /**
                 * https://ai.google.dev/api/caching#Mode
                 */
                mode: 'MODE_UNSPECIFIED' | 'MODE_DYNAMIC';
                dynamicThreshold: number;
            };
        };
        codeExecution?: unknown;
        googleSearch?: unknown;
        urlContext?: unknown;
    }> | {
        functionDeclarations?: Array<{
            /**
             * The name of the function. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 63.
             */
            name: string;
            /**
             * A brief description of the function.
             */
            description: string;
            /**
             * https://ai.google.dev/api/caching#Behavior
             */
            behavior?: 'UNSPECIFIED' | 'BLOCKING' | 'NON_BLOCKING';
            /**
             * Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.
             */
            parameters?: {
                [key: string]: unknown;
            };
            parametersJsonSchema?: unknown;
            response?: unknown;
            responseJsonSchema?: unknown;
        }>;
        /**
         * https://ai.google.dev/api/caching#GoogleSearchRetrieval
         */
        googleSearchRetrieval?: {
            /**
             *
             * Specifies the dynamic retrieval configuration for the given source.
             *
             * https://ai.google.dev/api/caching#DynamicRetrievalConfig
             *
             */
            dynamicRetrievalConfig: {
                /**
                 * https://ai.google.dev/api/caching#Mode
                 */
                mode: 'MODE_UNSPECIFIED' | 'MODE_DYNAMIC';
                dynamicThreshold: number;
            };
        };
        codeExecution?: unknown;
        googleSearch?: unknown;
        urlContext?: unknown;
    };
    /**
     * Tool configuration for any Tool specified in the request.
     */
    toolConfig?: {
        functionCallingConfig: {
            mode: 'AUTO' | 'ANY' | 'NONE';
            allowedFunctionNames?: Array<string>;
        };
    };
    /**
     * A list of unique SafetySetting instances for blocking unsafe content.
     */
    safetySettings?: Array<{
        /**
         *
         * The category for this setting
         *
         * https://ai.google.dev/api/generate-content#v1beta.HarmCategory
         *
         */
        category: 'HARM_CATEGORY_UNSPECIFIED' | 'HARM_CATEGORY_DEROGATORY' | 'HARM_CATEGORY_TOXICITY' | 'HARM_CATEGORY_VIOLENCE' | 'HARM_CATEGORY_SEXUAL' | 'HARM_CATEGORY_MEDICAL' | 'HARM_CATEGORY_DANGEROUS' | 'HARM_CATEGORY_HARASSMENT' | 'HARM_CATEGORY_HATE_SPEECH' | 'HARM_CATEGORY_SEXUALLY_EXPLICIT' | 'HARM_CATEGORY_DANGEROUS_CONTENT' | 'HARM_CATEGORY_CIVIC_INTEGRITY';
        /**
         *
         * Controls the probability threshold at which harm is blocked.
         *
         * https://ai.google.dev/api/generate-content#HarmBlockThreshold
         *
         */
        threshold: 'HARM_BLOCK_THRESHOLD_UNSPECIFIED' | 'BLOCK_LOW_AND_ABOVE' | 'BLOCK_MEDIUM_AND_ABOVE' | 'BLOCK_ONLY_HIGH' | 'BLOCK_NONE' | 'OFF';
    }>;
    /**
     * Developer set system instruction(s). Currently, text only.
     */
    systemInstruction?: {
        parts: Array<{
            text: string;
        }>;
    };
    /**
     * https://ai.google.dev/api/generate-content#v1beta.GenerationConfig
     */
    generationConfig?: {
        stopSequences?: Array<string>;
        responseMimeType?: string;
        responseSchema?: unknown;
        _responseJsonSchema?: unknown;
        responseJsonSchema?: unknown;
        responseModalities?: Array<'MODALITY_UNSPECIFIED' | 'TEXT' | 'IMAGE' | 'AUDIO'>;
        candidateCount?: number;
        maxOutputTokens?: number;
        temperature?: number;
        topP?: number;
        topK?: number;
        seed?: number;
        presencePenalty?: number;
        frequencyPenalty?: number;
        responseLogprobs?: boolean;
        logProbs?: number;
        enableEnhancedCivicAnswers?: boolean;
        speechConfig?: unknown;
        thinkingConfig?: unknown;
        imageConfig?: unknown;
        /**
         * https://ai.google.dev/api/generate-content#MediaResolution
         */
        mediaResolution?: 'MEDIA_RESOLUTION_UNSPECIFIED' | 'MEDIA_RESOLUTION_LOW' | 'MEDIA_RESOLUTION_MEDIUM' | 'MEDIA_RESOLUTION_HIGH';
    };
    /**
     * The name of the content cached to use as context to serve the prediction. Format: cachedContents/{cachedContent}
     */
    cachedContent?: string;
    config?: {
        tools?: Array<{
            functionDeclarations?: Array<{
                /**
                 * The name of the function. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 63.
                 */
                name: string;
                /**
                 * A brief description of the function.
                 */
                description: string;
                /**
                 * https://ai.google.dev/api/caching#Behavior
                 */
                behavior?: 'UNSPECIFIED' | 'BLOCKING' | 'NON_BLOCKING';
                /**
                 * Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.
                 */
                parameters?: {
                    [key: string]: unknown;
                };
                parametersJsonSchema?: unknown;
                response?: unknown;
                responseJsonSchema?: unknown;
            }>;
            /**
             * https://ai.google.dev/api/caching#GoogleSearchRetrieval
             */
            googleSearchRetrieval?: {
                /**
                 *
                 * Specifies the dynamic retrieval configuration for the given source.
                 *
                 * https://ai.google.dev/api/caching#DynamicRetrievalConfig
                 *
                 */
                dynamicRetrievalConfig: {
                    /**
                     * https://ai.google.dev/api/caching#Mode
                     */
                    mode: 'MODE_UNSPECIFIED' | 'MODE_DYNAMIC';
                    dynamicThreshold: number;
                };
            };
            codeExecution?: unknown;
            googleSearch?: unknown;
            urlContext?: unknown;
        }> | {
            functionDeclarations?: Array<{
                /**
                 * The name of the function. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 63.
                 */
                name: string;
                /**
                 * A brief description of the function.
                 */
                description: string;
                /**
                 * https://ai.google.dev/api/caching#Behavior
                 */
                behavior?: 'UNSPECIFIED' | 'BLOCKING' | 'NON_BLOCKING';
                /**
                 * Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.
                 */
                parameters?: {
                    [key: string]: unknown;
                };
                parametersJsonSchema?: unknown;
                response?: unknown;
                responseJsonSchema?: unknown;
            }>;
            /**
             * https://ai.google.dev/api/caching#GoogleSearchRetrieval
             */
            googleSearchRetrieval?: {
                /**
                 *
                 * Specifies the dynamic retrieval configuration for the given source.
                 *
                 * https://ai.google.dev/api/caching#DynamicRetrievalConfig
                 *
                 */
                dynamicRetrievalConfig: {
                    /**
                     * https://ai.google.dev/api/caching#Mode
                     */
                    mode: 'MODE_UNSPECIFIED' | 'MODE_DYNAMIC';
                    dynamicThreshold: number;
                };
            };
            codeExecution?: unknown;
            googleSearch?: unknown;
            urlContext?: unknown;
        };
        /**
         * Tool configuration for any Tool specified in the request.
         */
        toolConfig?: {
            functionCallingConfig: {
                mode: 'AUTO' | 'ANY' | 'NONE';
                allowedFunctionNames?: Array<string>;
            };
        };
    };
};

export type GeminiGenerateContentResponseInput = {
    /**
     * Candidate responses from the model
     */
    candidates: Array<{
        /**
         *
         * The base structured datatype containing multi-part content of a message.
         *
         * A Content includes a role field designating the producer of the Content and a parts field containing multi-part data that contains the content of the message turn.
         *
         * https://ai.google.dev/api/caching#Content
         *
         */
        content: {
            /**
             * The role of the author of this content.
             */
            role: string;
            parts: Array<{
                /**
                 * Indicates if the part is thought from the model
                 */
                thought?: boolean;
                /**
                 * An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string
                 */
                thoughtSignature?: string;
                text: string;
                /**
                 * https://ai.google.dev/api/caching#VideoMetadata
                 */
                metadata?: {
                    /**
                     * The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                     */
                    startOffset?: string;
                    /**
                     * The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                     */
                    endOffset?: string;
                    /**
                     * The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]
                     */
                    fps?: number;
                };
            } | {
                /**
                 * Indicates if the part is thought from the model
                 */
                thought?: boolean;
                /**
                 * An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string
                 */
                thoughtSignature?: string;
                inlineData: {
                    mimeType?: string;
                    data: string;
                };
                /**
                 * https://ai.google.dev/api/caching#VideoMetadata
                 */
                metadata?: {
                    /**
                     * The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                     */
                    startOffset?: string;
                    /**
                     * The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                     */
                    endOffset?: string;
                    /**
                     * The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]
                     */
                    fps?: number;
                };
            } | {
                /**
                 * Indicates if the part is thought from the model
                 */
                thought?: boolean;
                /**
                 * An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string
                 */
                thoughtSignature?: string;
                functionCall: {
                    id?: string;
                    name: string;
                    args?: {
                        [key: string]: unknown;
                    };
                };
                /**
                 * https://ai.google.dev/api/caching#VideoMetadata
                 */
                metadata?: {
                    /**
                     * The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                     */
                    startOffset?: string;
                    /**
                     * The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                     */
                    endOffset?: string;
                    /**
                     * The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]
                     */
                    fps?: number;
                };
            } | {
                /**
                 * Indicates if the part is thought from the model
                 */
                thought?: boolean;
                /**
                 * An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string
                 */
                thoughtSignature?: string;
                functionResponse: {
                    id?: string;
                    name: string;
                    response: {
                        [key: string]: unknown;
                    };
                    willContinue?: boolean;
                    scheduling?: 'SCHEDULING_UNSPECIFIED' | 'SILENT' | 'WHEN_IDLE' | 'INTERRUPT';
                };
                /**
                 * https://ai.google.dev/api/caching#VideoMetadata
                 */
                metadata?: {
                    /**
                     * The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                     */
                    startOffset?: string;
                    /**
                     * The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                     */
                    endOffset?: string;
                    /**
                     * The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]
                     */
                    fps?: number;
                };
            } | {
                /**
                 * Indicates if the part is thought from the model
                 */
                thought?: boolean;
                /**
                 * An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string
                 */
                thoughtSignature?: string;
                fileData: {
                    mimeType?: string;
                    fileUri: string;
                };
                /**
                 * https://ai.google.dev/api/caching#VideoMetadata
                 */
                metadata?: {
                    /**
                     * The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                     */
                    startOffset?: string;
                    /**
                     * The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                     */
                    endOffset?: string;
                    /**
                     * The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]
                     */
                    fps?: number;
                };
            } | {
                /**
                 * Indicates if the part is thought from the model
                 */
                thought?: boolean;
                /**
                 * An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string
                 */
                thoughtSignature?: string;
                language: 'LANGUAGE_UNSPECIFIED' | 'PYTHON';
                executableCode: {
                    code: string;
                };
                /**
                 * https://ai.google.dev/api/caching#VideoMetadata
                 */
                metadata?: {
                    /**
                     * The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                     */
                    startOffset?: string;
                    /**
                     * The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                     */
                    endOffset?: string;
                    /**
                     * The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]
                     */
                    fps?: number;
                };
            } | {
                /**
                 * Indicates if the part is thought from the model
                 */
                thought?: boolean;
                /**
                 * An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string
                 */
                thoughtSignature?: string;
                codeExecutionResult: {
                    /**
                     * Outcome of the code execution.
                     */
                    outcome: 'OUTCOME_UNSPECIFIED' | 'OUTCOME_OK' | 'OUTCOME_FAILED' | 'OUTCOME_DEADLINE_EXCEEDED';
                    output?: string;
                };
                /**
                 * https://ai.google.dev/api/caching#VideoMetadata
                 */
                metadata?: {
                    /**
                     * The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                     */
                    startOffset?: string;
                    /**
                     * The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                     */
                    endOffset?: string;
                    /**
                     * The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]
                     */
                    fps?: number;
                };
            }>;
        };
        /**
         *
         * The reason why the model stopped generating tokens.
         *
         * If empty, the model has not stopped generating tokens.
         *
         * https://ai.google.dev/api/generate-content#FinishReason
         *
         */
        finishReason?: 'FINISH_REASON_UNSPECIFIED' | 'STOP' | 'MAX_TOKENS' | 'SAFETY' | 'RECITATION' | 'LANGUAGE' | 'OTHER' | 'BLOCKLIST' | 'PROHIBITED_CONTENT' | 'SPII' | 'MALFORMED_FUNCTION_CALL' | 'IMAGE_SAFETY' | 'IMAGE_PROHIBITED_CONTENT' | 'IMAGE_OTHER' | 'NO_IMAGE' | 'IMAGE_RECITATION' | 'UNEXPECTED_TOOL_CALL' | 'TOO_MANY_TOOL_CALLS';
        safetyRatings?: Array<{
            /**
             *
             * The category for this setting
             *
             * https://ai.google.dev/api/generate-content#v1beta.HarmCategory
             *
             */
            category: 'HARM_CATEGORY_UNSPECIFIED' | 'HARM_CATEGORY_DEROGATORY' | 'HARM_CATEGORY_TOXICITY' | 'HARM_CATEGORY_VIOLENCE' | 'HARM_CATEGORY_SEXUAL' | 'HARM_CATEGORY_MEDICAL' | 'HARM_CATEGORY_DANGEROUS' | 'HARM_CATEGORY_HARASSMENT' | 'HARM_CATEGORY_HATE_SPEECH' | 'HARM_CATEGORY_SEXUALLY_EXPLICIT' | 'HARM_CATEGORY_DANGEROUS_CONTENT' | 'HARM_CATEGORY_CIVIC_INTEGRITY';
            /**
             * https://ai.google.dev/api/generate-content#HarmProbability
             */
            probability: 'HARM_PROBABILITY_UNSPECIFIED' | 'NEGLIGIBLE' | 'LOW' | 'MEDIUM' | 'HIGH';
            /**
             * Was this content blocked because of this rating?
             */
            blocked?: boolean;
        }>;
        /**
         * https://ai.google.dev/api/generate-content#citationmetadata
         */
        citationMetadata?: {
            citationSources: Array<{
                startIndex?: number;
                endIndex?: number;
                uri?: string;
                license?: string;
            }>;
        };
        tokenCount?: number;
        groundingAttributions?: Array<unknown>;
        groundingMetadata?: unknown;
        avgLogprobs?: number;
        logprobsResult?: unknown;
        urlContextMetadata?: unknown;
        /**
         * Index of the candidate in the list of response candidates.
         */
        index: number;
        /**
         * Details the reason why the model stopped generating tokens. This is populated only when finishReason is set.
         */
        finishMessage?: string;
    }>;
    /**
     * Returns the prompt's feedback related to the content filters
     */
    promptFeedback?: {
        /**
         * Specifies the reason why the prompt was blocked. https://ai.google.dev/api/generate-content#BlockReason
         */
        blockReason?: 'BLOCK_REASON_UNSPECIFIED' | 'SAFETY' | 'OTHER' | 'BLOCKLIST' | 'PROHIBITED_CONTENT' | 'IMAGE_SAFETY';
        safetyRatings: Array<{
            /**
             *
             * The category for this setting
             *
             * https://ai.google.dev/api/generate-content#v1beta.HarmCategory
             *
             */
            category: 'HARM_CATEGORY_UNSPECIFIED' | 'HARM_CATEGORY_DEROGATORY' | 'HARM_CATEGORY_TOXICITY' | 'HARM_CATEGORY_VIOLENCE' | 'HARM_CATEGORY_SEXUAL' | 'HARM_CATEGORY_MEDICAL' | 'HARM_CATEGORY_DANGEROUS' | 'HARM_CATEGORY_HARASSMENT' | 'HARM_CATEGORY_HATE_SPEECH' | 'HARM_CATEGORY_SEXUALLY_EXPLICIT' | 'HARM_CATEGORY_DANGEROUS_CONTENT' | 'HARM_CATEGORY_CIVIC_INTEGRITY';
            /**
             * https://ai.google.dev/api/generate-content#HarmProbability
             */
            probability: 'HARM_PROBABILITY_UNSPECIFIED' | 'NEGLIGIBLE' | 'LOW' | 'MEDIUM' | 'HIGH';
            /**
             * Was this content blocked because of this rating?
             */
            blocked?: boolean;
        }>;
    };
    /**
     * Metadata on the generation requests' token usage
     */
    usageMetadata?: {
        promptTokenCount?: number;
        cachedContentTokenCount?: number;
        candidatesTokenCount?: number;
        toolUsePromptTokenCount?: number;
        thoughtsTokenCount?: number;
        totalTokenCount?: number;
        promptTokensDetails?: Array<{
            /**
             * https://ai.google.dev/api/generate-content#Modality
             */
            modality: 'MODALITY_UNSPECIFIED' | 'TEXT' | 'IMAGE' | 'AUDIO';
            /**
             * Number of tokens
             */
            tokenCount: number;
        }>;
        cacheTokensDetails?: Array<{
            /**
             * https://ai.google.dev/api/generate-content#Modality
             */
            modality: 'MODALITY_UNSPECIFIED' | 'TEXT' | 'IMAGE' | 'AUDIO';
            /**
             * Number of tokens
             */
            tokenCount: number;
        }>;
        candidatesTokensDetails?: Array<{
            /**
             * https://ai.google.dev/api/generate-content#Modality
             */
            modality: 'MODALITY_UNSPECIFIED' | 'TEXT' | 'IMAGE' | 'AUDIO';
            /**
             * Number of tokens
             */
            tokenCount: number;
        }>;
        toolUsePromptTokensDetails?: Array<{
            /**
             * https://ai.google.dev/api/generate-content#Modality
             */
            modality: 'MODALITY_UNSPECIFIED' | 'TEXT' | 'IMAGE' | 'AUDIO';
            /**
             * Number of tokens
             */
            tokenCount: number;
        }>;
    };
    /**
     * The model version used to generate the response.
     */
    modelVersion?: string;
    /**
     * The unique response ID.
     */
    responseId?: string;
};

export type AnthropicMessagesRequestInput = {
    model: string;
    messages: Array<{
        content: string | Array<{
            text: string;
            type: 'text';
            cache_control?: unknown;
            citations?: Array<unknown> | null;
        } | {
            type: 'image';
            source: {
                type: 'base64';
                media_type: string;
                data: string;
            };
            cache_control?: unknown;
        } | {
            type: 'document';
            source: {
                type: 'base64';
                media_type: 'application/pdf';
                data: string;
            } | {
                type: 'text';
                media_type: 'text/plain';
                data: string;
            } | {
                type: 'url';
                url: string;
            } | {
                type: 'content';
                content: string | Array<{
                    text: string;
                    type: 'text';
                    cache_control?: unknown;
                    citations?: Array<unknown> | null;
                } | {
                    type: 'image';
                    source: {
                        type: 'base64';
                        media_type: string;
                        data: string;
                    };
                    cache_control?: unknown;
                }>;
            };
            title?: string | null;
            context?: string | null;
            citations?: {
                enabled: boolean;
            } | null;
            cache_control?: unknown;
        } | {
            id: string;
            input: unknown;
            name: string;
            type: 'tool_use';
            cache_control?: unknown;
        } | {
            tool_use_id: string;
            type: 'tool_result';
            cache_control?: unknown;
            content?: string | Array<{
                text: string;
                type: 'text';
                cache_control?: unknown;
                citations?: Array<unknown> | null;
            } | {
                type: 'image';
                source: {
                    type: 'base64';
                    media_type: string;
                    data: string;
                };
                cache_control?: unknown;
            } | {
                type: 'document';
                source: {
                    type: 'base64';
                    media_type: 'application/pdf';
                    data: string;
                } | {
                    type: 'text';
                    media_type: 'text/plain';
                    data: string;
                } | {
                    type: 'url';
                    url: string;
                } | {
                    type: 'content';
                    content: string | Array<{
                        text: string;
                        type: 'text';
                        cache_control?: unknown;
                        citations?: Array<unknown> | null;
                    } | {
                        type: 'image';
                        source: {
                            type: 'base64';
                            media_type: string;
                            data: string;
                        };
                        cache_control?: unknown;
                    }>;
                };
                title?: string | null;
                context?: string | null;
                citations?: {
                    enabled: boolean;
                } | null;
                cache_control?: unknown;
            }>;
            is_error?: boolean;
        }>;
        role: 'user' | 'assistant';
    }>;
    max_tokens: number;
    container?: string | null;
    context_management?: {
        [key: string]: unknown;
    } | null;
    mcp_servers?: Array<unknown>;
    metadata?: {
        user_id: string | null;
    };
    output_config?: {
        effort?: string | null;
        format?: {
            type: 'json_schema';
            schema: {
                [key: string]: unknown;
            };
        } | null;
    };
    service_tier?: unknown;
    speed?: 'fast' | 'standard';
    stop_sequences?: Array<string>;
    stream?: boolean;
    system?: string | {
        type: 'text';
        text: string;
        cache_control?: unknown;
        citations?: Array<unknown> | null;
    } | Array<{
        type: 'text';
        text: string;
        cache_control?: unknown;
        citations?: Array<unknown> | null;
    }>;
    temperature?: number;
    thinking?: {
        type: 'enabled';
        budget_tokens: number;
    } | {
        type: 'disabled';
    } | {
        type: 'adaptive';
    };
    tool_choice?: {
        type: 'auto';
        disable_parallel_tool_use?: boolean;
    } | {
        type: 'any';
        disable_parallel_tool_use?: boolean;
    } | {
        type: 'tool';
        name: string;
        disable_parallel_tool_use?: boolean;
    } | {
        type: 'none';
    };
    tools?: Array<{
        name: string;
        type?: 'custom';
        cache_control?: unknown;
        input_schema: {
            [key: string]: unknown;
        };
        description?: string;
    } | {
        name: 'bash';
        type: 'bash_20250124';
        cache_control?: unknown;
    } | {
        name: 'str_replace_editor';
        type: 'text_editor_20250124';
        cache_control?: unknown;
    } | {
        name: 'str_replace_based_edit_tool';
        type: 'text_editor_20250429';
        cache_control?: unknown;
    } | {
        name: 'str_replace_based_edit_tool';
        type: 'text_editor_20250728';
        cache_control?: unknown;
        max_characters?: number | null;
    } | {
        name: 'web_search';
        type: 'web_search_20250305';
        allowed_domains?: Array<string> | null;
        blocked_domains?: Array<string> | null;
        cache_control?: unknown;
        max_uses?: number | null;
        user_location?: unknown;
    }>;
    top_k?: number;
    top_p?: number;
};

export type AnthropicMessagesResponseInput = {
    id: string;
    content: Array<{
        citations: Array<unknown> | null;
        text: string;
        type: 'text';
    } | {
        id: string;
        input: unknown;
        name: string;
        type: 'tool_use';
    }>;
    model: string;
    role: 'assistant';
    stop_reason: unknown;
    stop_sequence: string | null;
    type: 'message';
    usage: {
        input_tokens: number;
        output_tokens: number;
    };
};

export type CerebrasChatCompletionRequestInput = {
    model: string;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186
     */
    messages: Array<{
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'developer';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'system';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        } | {
            type: 'input_audio';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792
             */
            input_audio: {
                data: string;
                format: 'wav' | 'mp3';
            };
        } | {
            type: 'file';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732
             */
            file: {
                file_data?: string;
                file_id?: string;
                filename?: string;
            };
        }>;
        role: 'user';
        name?: string;
    } | {
        role: 'assistant';
        audio?: {
            id: string;
        } | null;
        content?: string | Array<{
            type: 'text';
            text: string;
        }> | Array<{
            type: 'refusal';
            refusal: string;
        }> | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
         */
        function_call?: {
            arguments: string;
            name: string;
        } | null;
        name?: string;
        refusal?: string | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197
         */
        tool_calls?: Array<{
            id: string;
            type: 'function';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
             */
            function: {
                arguments: string;
                name: string;
            };
        } | {
            id: string;
            type: 'custom';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
             */
            custom: {
                input: string;
                name: string;
            };
        }>;
    } | {
        role: 'tool';
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        }>;
        tool_call_id: string;
    } | {
        role: 'function';
        content: string | null;
        name: string;
    }>;
    /**
     *
     * A function tool that can be used to generate a response.
     *
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392
     *
     */
    tools?: Array<{
        type: 'function';
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
         */
        function: {
            name: string;
            description?: string;
            /**
             *
             * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
             *
             * The parameters the functions accepts, described as a JSON Schema object. See the
             * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
             * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
             * documentation about the format.
             *
             * Omitting parameters defines a function with an empty parameter list.
             *
             */
            parameters?: {
                [key: string]: unknown;
            };
            strict?: boolean | null;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    }>;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405
     */
    tool_choice?: 'none' | 'auto' | 'required' | {
        type: 'allowed_tools';
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455
         */
        allowed_tools: {
            /**
             *
             * Constrains the tools available to the model to a pre-defined set.
             *
             * auto allows the model to pick from among the allowed tools and generate a
             * message.
             *
             * required requires the model to call one or more of the allowed tools.
             *
             */
            mode: 'auto' | 'required';
            /**
             * A list of tool definitions that the model should be allowed to call
             */
            tools: Array<{
                [key: string]: {
                    type: 'function';
                    /**
                     * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
                     */
                    function: {
                        name: string;
                        description?: string;
                        /**
                         *
                         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
                         *
                         * The parameters the functions accepts, described as a JSON Schema object. See the
                         * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
                         * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
                         * documentation about the format.
                         *
                         * Omitting parameters defines a function with an empty parameter list.
                         *
                         */
                        parameters?: {
                            [key: string]: unknown;
                        };
                        strict?: boolean | null;
                    };
                };
            }>;
        };
    } | {
        type: 'function';
        function: {
            name: string;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    };
    temperature?: number | null;
    max_tokens?: number | null;
    stream?: boolean | null;
};

export type CerebrasChatCompletionResponseInput = {
    id: string;
    choices: Array<{
        finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';
        index: number;
        logprobs: unknown;
        /**
         * https://github.com/Cerebras/cerebras-cloud-sdk-node/blob/main/src/resources/chat/completions.ts
         */
        message: {
            content?: string | null;
            refusal?: string | null;
            role: 'assistant';
            annotations?: Array<unknown>;
            audio?: unknown;
            function_call?: {
                arguments: string;
                name: string;
            } | null;
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197
             */
            tool_calls?: Array<{
                id: string;
                type: 'function';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
                 */
                function: {
                    arguments: string;
                    name: string;
                };
            } | {
                id: string;
                type: 'custom';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
                 */
                custom: {
                    input: string;
                    name: string;
                };
            }>;
        };
    }>;
    created: number;
    model: string;
    object: 'chat.completion';
    server_tier?: string;
    system_fingerprint?: string | null;
    /**
     * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113
     */
    usage?: {
        completion_tokens: number;
        prompt_tokens: number;
        total_tokens: number;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144
         */
        completion_tokens_details?: unknown;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173
         */
        prompt_tokens_details?: unknown;
    };
};

export type CohereChatRequestInput = {
    model: string;
    messages: Array<{
        role: 'user';
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'tool_result';
            tool_call_id: string;
            content: string;
        }>;
    } | {
        role: 'assistant';
        content?: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'tool_result';
            tool_call_id: string;
            content: string;
        }>;
        tool_calls?: Array<{
            id: string;
            type: 'function';
            function: {
                name: string;
                arguments: string;
            };
        }>;
    } | {
        role: 'system';
        content: string;
    } | {
        role: 'tool';
        tool_call_id: string;
        content: string;
    }>;
    stream?: boolean;
    temperature?: number;
    max_tokens?: number;
    tools?: Array<{
        type: 'function';
        function: {
            name: string;
            description?: string;
            parameters?: {
                type: string;
                description?: string;
                required?: Array<string>;
                properties?: {
                    [key: string]: unknown;
                };
            };
        };
    }>;
    tool_choice?: 'REQUIRED' | 'NONE';
    safety_mode?: 'CONTEXTUAL' | 'STRICT' | 'OFF';
    response_format?: {
        type: 'json_object' | 'text';
        json_schema?: {
            [key: string]: unknown;
        };
    };
    frequency_penalty?: number;
    presence_penalty?: number;
    k?: number;
    p?: number;
    seed?: number;
    stop_sequences?: Array<string>;
    logprobs?: boolean;
};

export type CohereChatResponseInput = {
    id: string;
    message: {
        role: 'assistant';
        content?: Array<{
            type: 'text';
            text: string;
        } | {
            type: 'tool_result';
            tool_call_id: string;
            content: string;
        }>;
        tool_calls?: Array<{
            id: string;
            type: 'function';
            function: {
                name: string;
                arguments: string;
            };
        }>;
    };
    finish_reason: 'COMPLETE' | 'MAX_TOKENS' | 'STOP_SEQUENCE' | 'TOOL_CALL' | 'ERROR';
    usage?: {
        billed_units?: {
            input_tokens?: number;
            output_tokens?: number;
        };
        tokens?: {
            input_tokens?: number;
            output_tokens?: number;
        };
    };
};

export type MistralChatCompletionRequestInput = {
    model: string;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186
     */
    messages: Array<{
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'developer';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'system';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        } | {
            type: 'input_audio';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792
             */
            input_audio: {
                data: string;
                format: 'wav' | 'mp3';
            };
        } | {
            type: 'file';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732
             */
            file: {
                file_data?: string;
                file_id?: string;
                filename?: string;
            };
        }>;
        role: 'user';
        name?: string;
    } | {
        role: 'assistant';
        audio?: {
            id: string;
        } | null;
        content?: string | Array<{
            type: 'text';
            text: string;
        }> | Array<{
            type: 'refusal';
            refusal: string;
        }> | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
         */
        function_call?: {
            arguments: string;
            name: string;
        } | null;
        name?: string;
        refusal?: string | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197
         */
        tool_calls?: Array<{
            id: string;
            type: 'function';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
             */
            function: {
                arguments: string;
                name: string;
            };
        } | {
            id: string;
            type: 'custom';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
             */
            custom: {
                input: string;
                name: string;
            };
        }>;
    } | {
        role: 'tool';
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        }>;
        tool_call_id: string;
    } | {
        role: 'function';
        content: string | null;
        name: string;
    }>;
    /**
     *
     * A function tool that can be used to generate a response.
     *
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392
     *
     */
    tools?: Array<{
        type: 'function';
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
         */
        function: {
            name: string;
            description?: string;
            /**
             *
             * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
             *
             * The parameters the functions accepts, described as a JSON Schema object. See the
             * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
             * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
             * documentation about the format.
             *
             * Omitting parameters defines a function with an empty parameter list.
             *
             */
            parameters?: {
                [key: string]: unknown;
            };
            strict?: boolean | null;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    }>;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405
     */
    tool_choice?: 'none' | 'auto' | 'required' | {
        type: 'allowed_tools';
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455
         */
        allowed_tools: {
            /**
             *
             * Constrains the tools available to the model to a pre-defined set.
             *
             * auto allows the model to pick from among the allowed tools and generate a
             * message.
             *
             * required requires the model to call one or more of the allowed tools.
             *
             */
            mode: 'auto' | 'required';
            /**
             * A list of tool definitions that the model should be allowed to call
             */
            tools: Array<{
                [key: string]: {
                    type: 'function';
                    /**
                     * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
                     */
                    function: {
                        name: string;
                        description?: string;
                        /**
                         *
                         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
                         *
                         * The parameters the functions accepts, described as a JSON Schema object. See the
                         * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
                         * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
                         * documentation about the format.
                         *
                         * Omitting parameters defines a function with an empty parameter list.
                         *
                         */
                        parameters?: {
                            [key: string]: unknown;
                        };
                        strict?: boolean | null;
                    };
                };
            }>;
        };
    } | {
        type: 'function';
        function: {
            name: string;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    };
    temperature?: number | null;
    max_tokens?: number | null;
    stream?: boolean | null;
};

export type MistralChatCompletionResponseInput = {
    id: string;
    choices: Array<{
        finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';
        index: number;
        logprobs: unknown;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000
         */
        message: {
            content: string | null;
            refusal?: string | null;
            role: 'assistant';
            annotations?: Array<unknown>;
            audio?: unknown;
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
             */
            function_call?: {
                arguments: string;
                name: string;
            } | null;
            tool_calls?: Array<{
                id: string;
                type: 'function';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
                 */
                function: {
                    arguments: string;
                    name: string;
                };
            } | {
                id: string;
                type: 'custom';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
                 */
                custom: {
                    input: string;
                    name: string;
                };
            }> | null;
        };
    }>;
    created: number;
    model: string;
    object: 'chat.completion';
    server_tier?: string;
    system_fingerprint?: string | null;
    /**
     * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113
     */
    usage?: {
        completion_tokens: number;
        prompt_tokens: number;
        total_tokens: number;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144
         */
        completion_tokens_details?: unknown;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173
         */
        prompt_tokens_details?: unknown;
    };
    [key: string]: unknown;
};

export type PerplexityChatCompletionRequestInput = {
    model: string;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186
     */
    messages: Array<{
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'developer';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'system';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        } | {
            type: 'input_audio';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792
             */
            input_audio: {
                data: string;
                format: 'wav' | 'mp3';
            };
        } | {
            type: 'file';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732
             */
            file: {
                file_data?: string;
                file_id?: string;
                filename?: string;
            };
        }>;
        role: 'user';
        name?: string;
    } | {
        role: 'assistant';
        audio?: {
            id: string;
        } | null;
        content?: string | Array<{
            type: 'text';
            text: string;
        }> | Array<{
            type: 'refusal';
            refusal: string;
        }> | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
         */
        function_call?: {
            arguments: string;
            name: string;
        } | null;
        name?: string;
        refusal?: string | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197
         */
        tool_calls?: Array<{
            id: string;
            type: 'function';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
             */
            function: {
                arguments: string;
                name: string;
            };
        } | {
            id: string;
            type: 'custom';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
             */
            custom: {
                input: string;
                name: string;
            };
        }>;
    } | {
        role: 'tool';
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        }>;
        tool_call_id: string;
    } | {
        role: 'function';
        content: string | null;
        name: string;
    }>;
    /**
     *
     * A function tool that can be used to generate a response.
     *
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392
     *
     */
    tools?: Array<{
        type: 'function';
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
         */
        function: {
            name: string;
            description?: string;
            /**
             *
             * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
             *
             * The parameters the functions accepts, described as a JSON Schema object. See the
             * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
             * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
             * documentation about the format.
             *
             * Omitting parameters defines a function with an empty parameter list.
             *
             */
            parameters?: {
                [key: string]: unknown;
            };
            strict?: boolean | null;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    }>;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405
     */
    tool_choice?: 'none' | 'auto' | 'required' | {
        type: 'allowed_tools';
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455
         */
        allowed_tools: {
            /**
             *
             * Constrains the tools available to the model to a pre-defined set.
             *
             * auto allows the model to pick from among the allowed tools and generate a
             * message.
             *
             * required requires the model to call one or more of the allowed tools.
             *
             */
            mode: 'auto' | 'required';
            /**
             * A list of tool definitions that the model should be allowed to call
             */
            tools: Array<{
                [key: string]: {
                    type: 'function';
                    /**
                     * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
                     */
                    function: {
                        name: string;
                        description?: string;
                        /**
                         *
                         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
                         *
                         * The parameters the functions accepts, described as a JSON Schema object. See the
                         * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
                         * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
                         * documentation about the format.
                         *
                         * Omitting parameters defines a function with an empty parameter list.
                         *
                         */
                        parameters?: {
                            [key: string]: unknown;
                        };
                        strict?: boolean | null;
                    };
                };
            }>;
        };
    } | {
        type: 'function';
        function: {
            name: string;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    };
    temperature?: number | null;
    max_tokens?: number | null;
    stream?: boolean | null;
};

export type PerplexityChatCompletionResponseInput = {
    id: string;
    choices: Array<{
        finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';
        index: number;
        logprobs: unknown;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000
         */
        message: {
            content: string | null;
            refusal?: string | null;
            role: 'assistant';
            annotations?: Array<unknown>;
            audio?: unknown;
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
             */
            function_call?: {
                arguments: string;
                name: string;
            } | null;
            tool_calls?: Array<{
                id: string;
                type: 'function';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
                 */
                function: {
                    arguments: string;
                    name: string;
                };
            } | {
                id: string;
                type: 'custom';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
                 */
                custom: {
                    input: string;
                    name: string;
                };
            }> | null;
        };
    }>;
    created: number;
    model: string;
    object: 'chat.completion';
    server_tier?: string;
    system_fingerprint?: string | null;
    /**
     * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113
     */
    usage?: {
        completion_tokens: number;
        prompt_tokens: number;
        total_tokens: number;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144
         */
        completion_tokens_details?: unknown;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173
         */
        prompt_tokens_details?: unknown;
    };
    [key: string]: unknown;
};

export type GroqChatCompletionRequestInput = {
    model: string;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186
     */
    messages: Array<{
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'developer';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'system';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        } | {
            type: 'input_audio';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792
             */
            input_audio: {
                data: string;
                format: 'wav' | 'mp3';
            };
        } | {
            type: 'file';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732
             */
            file: {
                file_data?: string;
                file_id?: string;
                filename?: string;
            };
        }>;
        role: 'user';
        name?: string;
    } | {
        role: 'assistant';
        audio?: {
            id: string;
        } | null;
        content?: string | Array<{
            type: 'text';
            text: string;
        }> | Array<{
            type: 'refusal';
            refusal: string;
        }> | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
         */
        function_call?: {
            arguments: string;
            name: string;
        } | null;
        name?: string;
        refusal?: string | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197
         */
        tool_calls?: Array<{
            id: string;
            type: 'function';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
             */
            function: {
                arguments: string;
                name: string;
            };
        } | {
            id: string;
            type: 'custom';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
             */
            custom: {
                input: string;
                name: string;
            };
        }>;
    } | {
        role: 'tool';
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        }>;
        tool_call_id: string;
    } | {
        role: 'function';
        content: string | null;
        name: string;
    }>;
    /**
     *
     * A function tool that can be used to generate a response.
     *
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392
     *
     */
    tools?: Array<{
        type: 'function';
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
         */
        function: {
            name: string;
            description?: string;
            /**
             *
             * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
             *
             * The parameters the functions accepts, described as a JSON Schema object. See the
             * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
             * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
             * documentation about the format.
             *
             * Omitting parameters defines a function with an empty parameter list.
             *
             */
            parameters?: {
                [key: string]: unknown;
            };
            strict?: boolean | null;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    }>;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405
     */
    tool_choice?: 'none' | 'auto' | 'required' | {
        type: 'allowed_tools';
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455
         */
        allowed_tools: {
            /**
             *
             * Constrains the tools available to the model to a pre-defined set.
             *
             * auto allows the model to pick from among the allowed tools and generate a
             * message.
             *
             * required requires the model to call one or more of the allowed tools.
             *
             */
            mode: 'auto' | 'required';
            /**
             * A list of tool definitions that the model should be allowed to call
             */
            tools: Array<{
                [key: string]: {
                    type: 'function';
                    /**
                     * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
                     */
                    function: {
                        name: string;
                        description?: string;
                        /**
                         *
                         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
                         *
                         * The parameters the functions accepts, described as a JSON Schema object. See the
                         * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
                         * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
                         * documentation about the format.
                         *
                         * Omitting parameters defines a function with an empty parameter list.
                         *
                         */
                        parameters?: {
                            [key: string]: unknown;
                        };
                        strict?: boolean | null;
                    };
                };
            }>;
        };
    } | {
        type: 'function';
        function: {
            name: string;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    };
    temperature?: number | null;
    max_tokens?: number | null;
    stream?: boolean | null;
};

export type GroqChatCompletionResponseInput = {
    id: string;
    choices: Array<{
        finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';
        index: number;
        logprobs: unknown;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000
         */
        message: {
            content: string | null;
            refusal?: string | null;
            role: 'assistant';
            annotations?: Array<unknown>;
            audio?: unknown;
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
             */
            function_call?: {
                arguments: string;
                name: string;
            } | null;
            tool_calls?: Array<{
                id: string;
                type: 'function';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
                 */
                function: {
                    arguments: string;
                    name: string;
                };
            } | {
                id: string;
                type: 'custom';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
                 */
                custom: {
                    input: string;
                    name: string;
                };
            }> | null;
        };
    }>;
    created: number;
    model: string;
    object: 'chat.completion';
    server_tier?: string;
    system_fingerprint?: string | null;
    /**
     * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113
     */
    usage?: {
        completion_tokens: number;
        prompt_tokens: number;
        total_tokens: number;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144
         */
        completion_tokens_details?: unknown;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173
         */
        prompt_tokens_details?: unknown;
    };
    [key: string]: unknown;
};

export type OpenrouterChatCompletionRequestInput = {
    model: string;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186
     */
    messages: Array<{
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'developer';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'system';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        } | {
            type: 'input_audio';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792
             */
            input_audio: {
                data: string;
                format: 'wav' | 'mp3';
            };
        } | {
            type: 'file';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732
             */
            file: {
                file_data?: string;
                file_id?: string;
                filename?: string;
            };
        }>;
        role: 'user';
        name?: string;
    } | {
        role: 'assistant';
        audio?: {
            id: string;
        } | null;
        content?: string | Array<{
            type: 'text';
            text: string;
        }> | Array<{
            type: 'refusal';
            refusal: string;
        }> | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
         */
        function_call?: {
            arguments: string;
            name: string;
        } | null;
        name?: string;
        refusal?: string | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197
         */
        tool_calls?: Array<{
            id: string;
            type: 'function';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
             */
            function: {
                arguments: string;
                name: string;
            };
        } | {
            id: string;
            type: 'custom';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
             */
            custom: {
                input: string;
                name: string;
            };
        }>;
    } | {
        role: 'tool';
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        }>;
        tool_call_id: string;
    } | {
        role: 'function';
        content: string | null;
        name: string;
    }>;
    /**
     *
     * A function tool that can be used to generate a response.
     *
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392
     *
     */
    tools?: Array<{
        type: 'function';
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
         */
        function: {
            name: string;
            description?: string;
            /**
             *
             * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
             *
             * The parameters the functions accepts, described as a JSON Schema object. See the
             * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
             * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
             * documentation about the format.
             *
             * Omitting parameters defines a function with an empty parameter list.
             *
             */
            parameters?: {
                [key: string]: unknown;
            };
            strict?: boolean | null;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    }>;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405
     */
    tool_choice?: 'none' | 'auto' | 'required' | {
        type: 'allowed_tools';
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455
         */
        allowed_tools: {
            /**
             *
             * Constrains the tools available to the model to a pre-defined set.
             *
             * auto allows the model to pick from among the allowed tools and generate a
             * message.
             *
             * required requires the model to call one or more of the allowed tools.
             *
             */
            mode: 'auto' | 'required';
            /**
             * A list of tool definitions that the model should be allowed to call
             */
            tools: Array<{
                [key: string]: {
                    type: 'function';
                    /**
                     * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
                     */
                    function: {
                        name: string;
                        description?: string;
                        /**
                         *
                         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
                         *
                         * The parameters the functions accepts, described as a JSON Schema object. See the
                         * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
                         * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
                         * documentation about the format.
                         *
                         * Omitting parameters defines a function with an empty parameter list.
                         *
                         */
                        parameters?: {
                            [key: string]: unknown;
                        };
                        strict?: boolean | null;
                    };
                };
            }>;
        };
    } | {
        type: 'function';
        function: {
            name: string;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    };
    temperature?: number | null;
    max_tokens?: number | null;
    stream?: boolean | null;
};

export type OpenrouterChatCompletionResponseInput = {
    id: string;
    choices: Array<{
        finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';
        index: number;
        logprobs: unknown;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000
         */
        message: {
            content: string | null;
            refusal?: string | null;
            role: 'assistant';
            annotations?: Array<unknown>;
            audio?: unknown;
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
             */
            function_call?: {
                arguments: string;
                name: string;
            } | null;
            tool_calls?: Array<{
                id: string;
                type: 'function';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
                 */
                function: {
                    arguments: string;
                    name: string;
                };
            } | {
                id: string;
                type: 'custom';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
                 */
                custom: {
                    input: string;
                    name: string;
                };
            }> | null;
        };
    }>;
    created: number;
    model: string;
    object: 'chat.completion';
    server_tier?: string;
    system_fingerprint?: string | null;
    /**
     * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113
     */
    usage?: {
        completion_tokens: number;
        prompt_tokens: number;
        total_tokens: number;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144
         */
        completion_tokens_details?: unknown;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173
         */
        prompt_tokens_details?: unknown;
    };
    [key: string]: unknown;
};

export type VllmChatCompletionRequestInput = {
    model: string;
    /**
     * A message in the conversation
     */
    messages: Array<{
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'developer';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'system';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * Image URL details
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        } | {
            type: 'input_audio';
            /**
             * Audio input details
             */
            input_audio: {
                data: string;
                format: 'wav' | 'mp3';
            };
        } | {
            type: 'file';
            /**
             * File details
             */
            file: {
                file_data?: string;
                file_id?: string;
                filename?: string;
            };
        }>;
        role: 'user';
        name?: string;
    } | {
        role: 'assistant';
        audio?: {
            id: string;
        } | null;
        content?: string | Array<{
            type: 'text';
            text: string;
        }> | Array<{
            type: 'refusal';
            refusal: string;
        }> | null;
        function_call?: {
            arguments: string;
            name: string;
        } | null;
        name?: string;
        refusal?: string | null;
        /**
         * A tool call in the assistant message
         */
        tool_calls?: Array<{
            id: string;
            type: 'function';
            /**
             * Function call details
             */
            function: {
                arguments: string;
                name: string;
            };
        } | {
            id: string;
            type: 'custom';
            /**
             * Custom tool call details
             */
            custom: {
                input: string;
                name: string;
            };
        }>;
        reasoning?: string | null;
    } | {
        role: 'tool';
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * Image URL details
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        }>;
        tool_call_id: string;
    } | {
        role: 'function';
        content: string | null;
        name: string;
    }>;
    /**
     * A tool definition
     */
    tools?: Array<{
        type: 'function';
        /**
         * A function definition for tool calling
         */
        function: {
            name: string;
            description?: string;
            /**
             *
             * The parameters the functions accepts, described as a JSON Schema object.
             * Omitting parameters defines a function with an empty parameter list.
             *
             */
            parameters?: {
                [key: string]: unknown;
            };
            strict?: boolean | null;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool
             */
            name: string;
            /**
             * Description of the tool
             */
            description?: string;
            /**
             * The input format for the custom tool
             */
            format?: {
                /**
                 * Unconstrained text format
                 */
                type: 'text';
            } | {
                type: 'grammar';
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    }>;
    /**
     * Tool choice option
     */
    tool_choice?: 'none' | 'auto' | 'required' | {
        type: 'allowed_tools';
        /**
         * Allowed tools configuration
         */
        allowed_tools: {
            /**
             *
             * Constrains the tools available to the model.
             * auto: allows the model to pick from allowed tools or generate a message.
             * required: requires the model to call one or more of the allowed tools.
             *
             */
            mode: 'auto' | 'required';
            tools: Array<{
                [key: string]: {
                    type: 'function';
                    /**
                     * A function definition for tool calling
                     */
                    function: {
                        name: string;
                        description?: string;
                        /**
                         *
                         * The parameters the functions accepts, described as a JSON Schema object.
                         * Omitting parameters defines a function with an empty parameter list.
                         *
                         */
                        parameters?: {
                            [key: string]: unknown;
                        };
                        strict?: boolean | null;
                    };
                };
            }>;
        };
    } | {
        type: 'function';
        function: {
            name: string;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool
             */
            name: string;
            /**
             * Description of the tool
             */
            description?: string;
            /**
             * The input format for the custom tool
             */
            format?: {
                /**
                 * Unconstrained text format
                 */
                type: 'text';
            } | {
                type: 'grammar';
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    };
    temperature?: number | null;
    max_tokens?: number | null;
    stream?: boolean | null;
    top_p?: number | null;
    top_k?: number | null;
    frequency_penalty?: number | null;
    presence_penalty?: number | null;
    repetition_penalty?: number | null;
    stop?: string | Array<string>;
    seed?: number | null;
    n?: number | null;
    best_of?: number | null;
    logprobs?: boolean | null;
    top_logprobs?: number | null;
};

export type VllmChatCompletionResponseInput = {
    id: string;
    choices: Array<{
        finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';
        index: number;
        logprobs: unknown;
        /**
         * The assistant message in the response
         */
        message: {
            content: string | null;
            refusal?: string | null;
            role: 'assistant';
            annotations?: Array<unknown>;
            audio?: unknown;
            function_call?: {
                arguments: string;
                name: string;
            } | null;
            /**
             * A tool call in the assistant message
             */
            tool_calls?: Array<{
                id: string;
                type: 'function';
                /**
                 * Function call details
                 */
                function: {
                    arguments: string;
                    name: string;
                };
            } | {
                id: string;
                type: 'custom';
                /**
                 * Custom tool call details
                 */
                custom: {
                    input: string;
                    name: string;
                };
            }>;
            reasoning?: string | null;
        };
    }>;
    created: number;
    model: string;
    object: 'chat.completion';
    system_fingerprint?: string | null;
    /**
     * Token usage statistics for the completion
     */
    usage?: {
        completion_tokens: number;
        prompt_tokens: number;
        total_tokens: number;
        completion_tokens_details?: unknown;
        prompt_tokens_details?: unknown;
    };
};

export type OllamaChatCompletionRequestInput = {
    model: string;
    /**
     * A message in the conversation
     */
    messages: Array<{
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'developer';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'system';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * Image URL details
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        } | {
            type: 'input_audio';
            /**
             * Audio input details
             */
            input_audio: {
                data: string;
                format: 'wav' | 'mp3';
            };
        } | {
            type: 'file';
            /**
             * File details
             */
            file: {
                file_data?: string;
                file_id?: string;
                filename?: string;
            };
        }>;
        role: 'user';
        name?: string;
    } | {
        role: 'assistant';
        audio?: {
            id: string;
        } | null;
        content?: string | Array<{
            type: 'text';
            text: string;
        }> | Array<{
            type: 'refusal';
            refusal: string;
        }> | null;
        function_call?: {
            arguments: string;
            name: string;
        } | null;
        name?: string;
        refusal?: string | null;
        /**
         * A tool call in the assistant message
         */
        tool_calls?: Array<{
            id: string;
            type: 'function';
            /**
             * Function call details
             */
            function: {
                arguments: string;
                name: string;
            };
        } | {
            id: string;
            type: 'custom';
            /**
             * Custom tool call details
             */
            custom: {
                input: string;
                name: string;
            };
        }>;
    } | {
        role: 'tool';
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * Image URL details
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        }>;
        tool_call_id: string;
    } | {
        role: 'function';
        content: string | null;
        name: string;
    }>;
    /**
     * A tool definition
     */
    tools?: Array<{
        type: 'function';
        /**
         * A function definition for tool calling
         */
        function: {
            name: string;
            description?: string;
            /**
             *
             * The parameters the functions accepts, described as a JSON Schema object.
             * Omitting parameters defines a function with an empty parameter list.
             *
             */
            parameters?: {
                [key: string]: unknown;
            };
            strict?: boolean | null;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool
             */
            name: string;
            /**
             * Description of the tool
             */
            description?: string;
            /**
             * The input format for the custom tool
             */
            format?: {
                /**
                 * Unconstrained text format
                 */
                type: 'text';
            } | {
                type: 'grammar';
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    }>;
    /**
     * Tool choice option
     */
    tool_choice?: 'none' | 'auto' | 'required' | {
        type: 'allowed_tools';
        /**
         * Allowed tools configuration
         */
        allowed_tools: {
            /**
             *
             * Constrains the tools available to the model.
             * auto: allows the model to pick from allowed tools or generate a message.
             * required: requires the model to call one or more of the allowed tools.
             *
             */
            mode: 'auto' | 'required';
            tools: Array<{
                [key: string]: {
                    type: 'function';
                    /**
                     * A function definition for tool calling
                     */
                    function: {
                        name: string;
                        description?: string;
                        /**
                         *
                         * The parameters the functions accepts, described as a JSON Schema object.
                         * Omitting parameters defines a function with an empty parameter list.
                         *
                         */
                        parameters?: {
                            [key: string]: unknown;
                        };
                        strict?: boolean | null;
                    };
                };
            }>;
        };
    } | {
        type: 'function';
        function: {
            name: string;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool
             */
            name: string;
            /**
             * Description of the tool
             */
            description?: string;
            /**
             * The input format for the custom tool
             */
            format?: {
                /**
                 * Unconstrained text format
                 */
                type: 'text';
            } | {
                type: 'grammar';
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    };
    temperature?: number | null;
    max_tokens?: number | null;
    stream?: boolean | null;
    top_p?: number | null;
    frequency_penalty?: number | null;
    presence_penalty?: number | null;
    stop?: string | Array<string>;
    seed?: number | null;
    n?: number | null;
};

export type OllamaChatCompletionResponseInput = {
    id: string;
    choices: Array<{
        finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';
        index: number;
        logprobs: unknown;
        /**
         * The assistant message in the response
         */
        message: {
            content: string | null;
            refusal?: string | null;
            role: 'assistant';
            annotations?: Array<unknown>;
            audio?: unknown;
            function_call?: {
                arguments: string;
                name: string;
            } | null;
            /**
             * A tool call in the assistant message
             */
            tool_calls?: Array<{
                id: string;
                type: 'function';
                /**
                 * Function call details
                 */
                function: {
                    arguments: string;
                    name: string;
                };
            } | {
                id: string;
                type: 'custom';
                /**
                 * Custom tool call details
                 */
                custom: {
                    input: string;
                    name: string;
                };
            }>;
        };
    }>;
    created: number;
    model: string;
    object: 'chat.completion';
    system_fingerprint?: string | null;
    /**
     * Token usage statistics for the completion
     */
    usage?: {
        completion_tokens: number;
        prompt_tokens: number;
        total_tokens: number;
        completion_tokens_details?: unknown;
        prompt_tokens_details?: unknown;
    };
};

export type ZhipuaiChatCompletionRequestInput = {
    model: string;
    /**
     * https://docs.z.ai/api-reference/llm/chat-completion#body
     */
    messages: Array<{
        role: 'system';
        content: string;
        name?: string;
    } | {
        role: 'user';
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://docs.z.ai/api-reference/llm/chat-completion#body
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        }>;
        name?: string;
    } | {
        role: 'assistant';
        content?: string | null;
        name?: string;
        tool_calls?: Array<{
            id: string;
            type: 'function';
            /**
             * https://docs.z.ai/api-reference/llm/chat-completion#response
             */
            function: {
                arguments: string;
                name: string;
            };
        }>;
        function_call?: {
            arguments: string;
            name: string;
        };
    } | {
        role: 'tool';
        content: string;
        tool_call_id: string;
    } | {
        role: 'function';
        content: string;
        name: string;
    }>;
    tools?: Array<{
        type: 'function';
        /**
         * https://docs.z.ai/api-reference/llm/chat-completion#body
         */
        function: {
            name: string;
            description?: string;
            /**
             *
             * https://docs.z.ai/api-reference/llm/chat-completion#body
             *
             * The parameters the functions accepts, described as a JSON Schema object. See the
             * [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
             * documentation about the format.
             *
             * Omitting parameters defines a function with an empty parameter list.
             *
             */
            parameters?: {
                [key: string]: unknown;
            };
            strict?: boolean | null;
        };
    }>;
    /**
     * https://docs.z.ai/api-reference/llm/chat-completion#body
     */
    tool_choice?: 'auto' | {
        type: 'function';
        function: {
            name: string;
        };
    };
    request_id?: string;
    do_sample?: boolean;
    stream?: boolean;
    thinking?: {
        type: 'enabled' | 'disabled';
        clear_thinking?: boolean;
    };
    temperature?: number | null;
    top_p?: number | null;
    max_tokens?: number | null;
    tool_stream?: boolean;
    stop?: Array<string>;
    response_format?: {
        type: 'text' | 'json_object';
    };
    user_id?: string;
};

export type ZhipuaiChatCompletionResponseInput = {
    id: string;
    request_id?: string;
    choices: Array<{
        finish_reason: 'stop' | 'length' | 'tool_calls' | 'sensitive' | 'network_error';
        index: number;
        logprobs: unknown;
        /**
         * https://docs.z.ai/api-reference/llm/chat-completion#response
         */
        message: {
            content: string | null;
            role: 'assistant';
            reasoning_content?: string;
            tool_calls?: Array<{
                id: string;
                type: 'function';
                /**
                 * https://docs.z.ai/api-reference/llm/chat-completion#response
                 */
                function: {
                    arguments: string;
                    name: string;
                };
            }>;
            function_call?: {
                arguments: string;
                name: string;
            } | null;
        };
    }>;
    created: number;
    model: string;
    object: 'chat.completion';
    system_fingerprint?: string | null;
    /**
     * https://docs.z.ai/api-reference/llm/chat-completion#response
     */
    usage?: {
        completion_tokens: number;
        prompt_tokens: number;
        total_tokens: number;
        /**
         * https://docs.z.ai/api-reference/llm/chat-completion#response
         */
        prompt_tokens_details?: {
            cached_tokens: number;
        };
    };
    /**
     * https://docs.z.ai/api-reference/llm/chat-completion#response
     */
    web_search?: Array<{
        title: string;
        content: string;
        link: string;
        media: string;
        icon: string;
        refer: string;
        publish_date: string;
    }>;
};

export type DeepSeekChatCompletionRequestInput = {
    model: string;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186
     */
    messages: Array<{
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'developer';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'system';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        } | {
            type: 'input_audio';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792
             */
            input_audio: {
                data: string;
                format: 'wav' | 'mp3';
            };
        } | {
            type: 'file';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732
             */
            file: {
                file_data?: string;
                file_id?: string;
                filename?: string;
            };
        }>;
        role: 'user';
        name?: string;
    } | {
        role: 'assistant';
        audio?: {
            id: string;
        } | null;
        content?: string | Array<{
            type: 'text';
            text: string;
        }> | Array<{
            type: 'refusal';
            refusal: string;
        }> | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
         */
        function_call?: {
            arguments: string;
            name: string;
        } | null;
        name?: string;
        refusal?: string | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197
         */
        tool_calls?: Array<{
            id: string;
            type: 'function';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
             */
            function: {
                arguments: string;
                name: string;
            };
        } | {
            id: string;
            type: 'custom';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
             */
            custom: {
                input: string;
                name: string;
            };
        }>;
    } | {
        role: 'tool';
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        }>;
        tool_call_id: string;
    } | {
        role: 'function';
        content: string | null;
        name: string;
    }>;
    /**
     *
     * A function tool that can be used to generate a response.
     *
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392
     *
     */
    tools?: Array<{
        type: 'function';
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
         */
        function: {
            name: string;
            description?: string;
            /**
             *
             * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
             *
             * The parameters the functions accepts, described as a JSON Schema object. See the
             * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
             * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
             * documentation about the format.
             *
             * Omitting parameters defines a function with an empty parameter list.
             *
             */
            parameters?: {
                [key: string]: unknown;
            };
            strict?: boolean | null;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    }>;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405
     */
    tool_choice?: 'none' | 'auto' | 'required' | {
        type: 'allowed_tools';
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455
         */
        allowed_tools: {
            /**
             *
             * Constrains the tools available to the model to a pre-defined set.
             *
             * auto allows the model to pick from among the allowed tools and generate a
             * message.
             *
             * required requires the model to call one or more of the allowed tools.
             *
             */
            mode: 'auto' | 'required';
            /**
             * A list of tool definitions that the model should be allowed to call
             */
            tools: Array<{
                [key: string]: {
                    type: 'function';
                    /**
                     * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
                     */
                    function: {
                        name: string;
                        description?: string;
                        /**
                         *
                         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
                         *
                         * The parameters the functions accepts, described as a JSON Schema object. See the
                         * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
                         * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
                         * documentation about the format.
                         *
                         * Omitting parameters defines a function with an empty parameter list.
                         *
                         */
                        parameters?: {
                            [key: string]: unknown;
                        };
                        strict?: boolean | null;
                    };
                };
            }>;
        };
    } | {
        type: 'function';
        function: {
            name: string;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    };
    temperature?: number | null;
    max_tokens?: number | null;
    stream?: boolean | null;
    [key: string]: unknown;
};

export type DeepSeekChatCompletionResponseInput = {
    id: string;
    choices: Array<{
        finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';
        index: number;
        logprobs: unknown;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000
         */
        message: {
            content: string | null;
            refusal?: string | null;
            role: 'assistant';
            annotations?: Array<unknown>;
            audio?: unknown;
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
             */
            function_call?: {
                arguments: string;
                name: string;
            } | null;
            tool_calls?: Array<{
                id: string;
                type: 'function';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
                 */
                function: {
                    arguments: string;
                    name: string;
                };
            } | {
                id: string;
                type: 'custom';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
                 */
                custom: {
                    input: string;
                    name: string;
                };
            }> | null;
        };
    }>;
    created: number;
    model: string;
    object: 'chat.completion';
    server_tier?: string;
    system_fingerprint?: string | null;
    /**
     * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113
     */
    usage?: {
        completion_tokens: number;
        prompt_tokens: number;
        total_tokens: number;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144
         */
        completion_tokens_details?: unknown;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173
         */
        prompt_tokens_details?: unknown;
    };
    [key: string]: unknown;
};

export type MinimaxChatCompletionRequestInput = {
    model: string;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186
     */
    messages: Array<{
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'developer';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'system';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        } | {
            type: 'input_audio';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792
             */
            input_audio: {
                data: string;
                format: 'wav' | 'mp3';
            };
        } | {
            type: 'file';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732
             */
            file: {
                file_data?: string;
                file_id?: string;
                filename?: string;
            };
        }>;
        role: 'user';
        name?: string;
    } | {
        role: 'assistant';
        audio?: {
            id: string;
        } | null;
        content?: string | Array<{
            type: 'text';
            text: string;
        }> | Array<{
            type: 'refusal';
            refusal: string;
        }> | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
         */
        function_call?: {
            arguments: string;
            name: string;
        } | null;
        name?: string;
        refusal?: string | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197
         */
        tool_calls?: Array<{
            id: string;
            type: 'function';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
             */
            function: {
                arguments: string;
                name: string;
            };
        } | {
            id: string;
            type: 'custom';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
             */
            custom: {
                input: string;
                name: string;
            };
        }>;
    } | {
        role: 'tool';
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        }>;
        tool_call_id: string;
    } | {
        role: 'function';
        content: string | null;
        name: string;
    }>;
    /**
     *
     * A function tool that can be used to generate a response.
     *
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392
     *
     */
    tools?: Array<{
        type: 'function';
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
         */
        function: {
            name: string;
            description?: string;
            /**
             *
             * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
             *
             * The parameters the functions accepts, described as a JSON Schema object. See the
             * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
             * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
             * documentation about the format.
             *
             * Omitting parameters defines a function with an empty parameter list.
             *
             */
            parameters?: {
                [key: string]: unknown;
            };
            strict?: boolean | null;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    }>;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405
     */
    tool_choice?: 'none' | 'auto' | 'required' | {
        type: 'allowed_tools';
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455
         */
        allowed_tools: {
            /**
             *
             * Constrains the tools available to the model to a pre-defined set.
             *
             * auto allows the model to pick from among the allowed tools and generate a
             * message.
             *
             * required requires the model to call one or more of the allowed tools.
             *
             */
            mode: 'auto' | 'required';
            /**
             * A list of tool definitions that the model should be allowed to call
             */
            tools: Array<{
                [key: string]: {
                    type: 'function';
                    /**
                     * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
                     */
                    function: {
                        name: string;
                        description?: string;
                        /**
                         *
                         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
                         *
                         * The parameters the functions accepts, described as a JSON Schema object. See the
                         * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
                         * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
                         * documentation about the format.
                         *
                         * Omitting parameters defines a function with an empty parameter list.
                         *
                         */
                        parameters?: {
                            [key: string]: unknown;
                        };
                        strict?: boolean | null;
                    };
                };
            }>;
        };
    } | {
        type: 'function';
        function: {
            name: string;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    };
    stream?: boolean;
    temperature?: number | null;
    top_p?: number | null;
    max_tokens?: number | null;
    n?: 1;
    stop?: string | Array<string>;
    response_format?: {
        type: 'text' | 'json_object';
    };
    user?: string;
    extra_body?: {
        reasoning_split?: boolean;
    };
};

export type MinimaxChatCompletionResponseInput = {
    id: string;
    choices: Array<{
        finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter';
        index: number;
        logprobs?: unknown;
        /**
         * https://platform.minimax.io/docs/api-reference/text-openai-api#response
         */
        message: {
            content: string | null;
            role: 'assistant';
            reasoning_details?: Array<{
                text: string;
            }>;
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197
             */
            tool_calls?: Array<{
                id: string;
                type: 'function';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
                 */
                function: {
                    arguments: string;
                    name: string;
                };
            } | {
                id: string;
                type: 'custom';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
                 */
                custom: {
                    input: string;
                    name: string;
                };
            }>;
        };
    }>;
    created: number;
    model: string;
    object: 'chat.completion';
    system_fingerprint?: string | null;
    /**
     * https://platform.minimax.io/docs/api-reference/text-openai-api#usage
     */
    usage?: {
        completion_tokens: number;
        prompt_tokens: number;
        total_tokens: number;
        completion_tokens_details?: {
            reasoning_tokens?: number;
        };
    };
};

export type XaiChatCompletionRequestInput = {
    model: string;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186
     */
    messages: Array<{
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'developer';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'system';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        } | {
            type: 'input_audio';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792
             */
            input_audio: {
                data: string;
                format: 'wav' | 'mp3';
            };
        } | {
            type: 'file';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732
             */
            file: {
                file_data?: string;
                file_id?: string;
                filename?: string;
            };
        }>;
        role: 'user';
        name?: string;
    } | {
        role: 'assistant';
        audio?: {
            id: string;
        } | null;
        content?: string | Array<{
            type: 'text';
            text: string;
        }> | Array<{
            type: 'refusal';
            refusal: string;
        }> | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
         */
        function_call?: {
            arguments: string;
            name: string;
        } | null;
        name?: string;
        refusal?: string | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197
         */
        tool_calls?: Array<{
            id: string;
            type: 'function';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
             */
            function: {
                arguments: string;
                name: string;
            };
        } | {
            id: string;
            type: 'custom';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
             */
            custom: {
                input: string;
                name: string;
            };
        }>;
    } | {
        role: 'tool';
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        }>;
        tool_call_id: string;
    } | {
        role: 'function';
        content: string | null;
        name: string;
    }>;
    /**
     *
     * A function tool that can be used to generate a response.
     *
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392
     *
     */
    tools?: Array<{
        type: 'function';
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
         */
        function: {
            name: string;
            description?: string;
            /**
             *
             * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
             *
             * The parameters the functions accepts, described as a JSON Schema object. See the
             * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
             * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
             * documentation about the format.
             *
             * Omitting parameters defines a function with an empty parameter list.
             *
             */
            parameters?: {
                [key: string]: unknown;
            };
            strict?: boolean | null;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    }>;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405
     */
    tool_choice?: 'none' | 'auto' | 'required' | {
        type: 'allowed_tools';
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455
         */
        allowed_tools: {
            /**
             *
             * Constrains the tools available to the model to a pre-defined set.
             *
             * auto allows the model to pick from among the allowed tools and generate a
             * message.
             *
             * required requires the model to call one or more of the allowed tools.
             *
             */
            mode: 'auto' | 'required';
            /**
             * A list of tool definitions that the model should be allowed to call
             */
            tools: Array<{
                [key: string]: {
                    type: 'function';
                    /**
                     * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
                     */
                    function: {
                        name: string;
                        description?: string;
                        /**
                         *
                         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
                         *
                         * The parameters the functions accepts, described as a JSON Schema object. See the
                         * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
                         * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
                         * documentation about the format.
                         *
                         * Omitting parameters defines a function with an empty parameter list.
                         *
                         */
                        parameters?: {
                            [key: string]: unknown;
                        };
                        strict?: boolean | null;
                    };
                };
            }>;
        };
    } | {
        type: 'function';
        function: {
            name: string;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    };
    temperature?: number | null;
    max_tokens?: number | null;
    stream?: boolean | null;
};

export type XaiChatCompletionResponseInput = {
    id: string;
    choices: Array<{
        finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';
        index: number;
        logprobs: unknown;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000
         */
        message: {
            content: string | null;
            refusal?: string | null;
            role: 'assistant';
            annotations?: Array<unknown>;
            audio?: unknown;
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
             */
            function_call?: {
                arguments: string;
                name: string;
            } | null;
            tool_calls?: Array<{
                id: string;
                type: 'function';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
                 */
                function: {
                    arguments: string;
                    name: string;
                };
            } | {
                id: string;
                type: 'custom';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
                 */
                custom: {
                    input: string;
                    name: string;
                };
            }> | null;
        };
    }>;
    created: number;
    model: string;
    object: 'chat.completion';
    server_tier?: string;
    system_fingerprint?: string | null;
    /**
     * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113
     */
    usage?: {
        completion_tokens: number;
        prompt_tokens: number;
        total_tokens: number;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144
         */
        completion_tokens_details?: unknown;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173
         */
        prompt_tokens_details?: unknown;
    };
    [key: string]: unknown;
};

export type UserConfigFieldDefaultInput = string | number | boolean | Array<string>;

export type UserConfigFieldInput = {
    type: 'string' | 'number' | 'boolean' | 'directory' | 'file';
    title: string;
    description: string;
    promptOnInstallation?: boolean;
    promptOnPreset?: boolean;
    required?: boolean;
    default?: UserConfigFieldDefaultInput;
    multiple?: boolean;
    sensitive?: boolean;
    min?: number;
    max?: number;
    headerName?: string;
    valuePrefix?: string;
};

export type EmbeddingDimensions = 3072 | 1536 | 768;

export type LocalConfigEnvironmentDefault = string | number | boolean;

export type OpenAiChatCompletionRequest = {
    model: string;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186
     */
    messages: Array<{
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'developer';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'system';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        } | {
            type: 'input_audio';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792
             */
            input_audio: {
                data: string;
                format: 'wav' | 'mp3';
            };
        } | {
            type: 'file';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732
             */
            file: {
                file_data?: string;
                file_id?: string;
                filename?: string;
            };
        }>;
        role: 'user';
        name?: string;
    } | {
        role: 'assistant';
        audio?: {
            id: string;
        } | null;
        content?: string | Array<{
            type: 'text';
            text: string;
        }> | Array<{
            type: 'refusal';
            refusal: string;
        }> | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
         */
        function_call?: {
            arguments: string;
            name: string;
        } | null;
        name?: string;
        refusal?: string | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197
         */
        tool_calls?: Array<{
            id: string;
            type: 'function';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
             */
            function: {
                arguments: string;
                name: string;
            };
        } | {
            id: string;
            type: 'custom';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
             */
            custom: {
                input: string;
                name: string;
            };
        }>;
    } | {
        role: 'tool';
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        }>;
        tool_call_id: string;
    } | {
        role: 'function';
        content: string | null;
        name: string;
    }>;
    /**
     *
     * A function tool that can be used to generate a response.
     *
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392
     *
     */
    tools?: Array<{
        type: 'function';
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
         */
        function: {
            name: string;
            description?: string;
            /**
             *
             * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
             *
             * The parameters the functions accepts, described as a JSON Schema object. See the
             * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
             * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
             * documentation about the format.
             *
             * Omitting parameters defines a function with an empty parameter list.
             *
             */
            parameters?: {
                [key: string]: unknown;
            };
            strict?: boolean | null;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    }>;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405
     */
    tool_choice?: 'none' | 'auto' | 'required' | {
        type: 'allowed_tools';
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455
         */
        allowed_tools: {
            /**
             *
             * Constrains the tools available to the model to a pre-defined set.
             *
             * auto allows the model to pick from among the allowed tools and generate a
             * message.
             *
             * required requires the model to call one or more of the allowed tools.
             *
             */
            mode: 'auto' | 'required';
            /**
             * A list of tool definitions that the model should be allowed to call
             */
            tools: Array<{
                [key: string]: {
                    type: 'function';
                    /**
                     * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
                     */
                    function: {
                        name: string;
                        description?: string;
                        /**
                         *
                         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
                         *
                         * The parameters the functions accepts, described as a JSON Schema object. See the
                         * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
                         * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
                         * documentation about the format.
                         *
                         * Omitting parameters defines a function with an empty parameter list.
                         *
                         */
                        parameters?: {
                            [key: string]: unknown;
                        };
                        strict?: boolean | null;
                    };
                };
            }>;
        };
    } | {
        type: 'function';
        function: {
            name: string;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    };
    temperature?: number | null;
    max_tokens?: number | null;
    stream?: boolean | null;
};

export type OpenAiChatCompletionResponse = {
    id: string;
    choices: Array<{
        finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';
        index: number;
        logprobs: unknown;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000
         */
        message: {
            content: string | null;
            refusal?: string | null;
            role: 'assistant';
            annotations?: Array<unknown>;
            audio?: unknown;
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
             */
            function_call?: {
                arguments: string;
                name: string;
            } | null;
            tool_calls?: Array<{
                id: string;
                type: 'function';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
                 */
                function: {
                    arguments: string;
                    name: string;
                };
            } | {
                id: string;
                type: 'custom';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
                 */
                custom: {
                    input: string;
                    name: string;
                };
            }> | null;
        };
    }>;
    created: number;
    model: string;
    object: 'chat.completion';
    server_tier?: string;
    system_fingerprint?: string | null;
    /**
     * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113
     */
    usage?: {
        completion_tokens: number;
        prompt_tokens: number;
        total_tokens: number;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144
         */
        completion_tokens_details?: unknown;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173
         */
        prompt_tokens_details?: unknown;
    };
};

export type GeminiGenerateContentRequest = {
    /**
     * The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries like chat, this is a repeated field that contains the conversation history and the latest request
     */
    contents: Array<{
        /**
         * The role of the author of this content.
         */
        role: string;
        parts: Array<{
            /**
             * Indicates if the part is thought from the model
             */
            thought?: boolean;
            /**
             * An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string
             */
            thoughtSignature?: string;
            text: string;
            /**
             * https://ai.google.dev/api/caching#VideoMetadata
             */
            metadata?: {
                /**
                 * The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                 */
                startOffset?: string;
                /**
                 * The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                 */
                endOffset?: string;
                /**
                 * The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]
                 */
                fps?: number;
            };
        } | {
            /**
             * Indicates if the part is thought from the model
             */
            thought?: boolean;
            /**
             * An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string
             */
            thoughtSignature?: string;
            inlineData: {
                mimeType?: string;
                data: string;
            };
            /**
             * https://ai.google.dev/api/caching#VideoMetadata
             */
            metadata?: {
                /**
                 * The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                 */
                startOffset?: string;
                /**
                 * The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                 */
                endOffset?: string;
                /**
                 * The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]
                 */
                fps?: number;
            };
        } | {
            /**
             * Indicates if the part is thought from the model
             */
            thought?: boolean;
            /**
             * An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string
             */
            thoughtSignature?: string;
            functionCall: {
                id?: string;
                name: string;
                args?: {
                    [key: string]: unknown;
                };
            };
            /**
             * https://ai.google.dev/api/caching#VideoMetadata
             */
            metadata?: {
                /**
                 * The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                 */
                startOffset?: string;
                /**
                 * The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                 */
                endOffset?: string;
                /**
                 * The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]
                 */
                fps?: number;
            };
        } | {
            /**
             * Indicates if the part is thought from the model
             */
            thought?: boolean;
            /**
             * An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string
             */
            thoughtSignature?: string;
            functionResponse: {
                id?: string;
                name: string;
                response: {
                    [key: string]: unknown;
                };
                willContinue?: boolean;
                scheduling?: 'SCHEDULING_UNSPECIFIED' | 'SILENT' | 'WHEN_IDLE' | 'INTERRUPT';
            };
            /**
             * https://ai.google.dev/api/caching#VideoMetadata
             */
            metadata?: {
                /**
                 * The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                 */
                startOffset?: string;
                /**
                 * The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                 */
                endOffset?: string;
                /**
                 * The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]
                 */
                fps?: number;
            };
        } | {
            /**
             * Indicates if the part is thought from the model
             */
            thought?: boolean;
            /**
             * An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string
             */
            thoughtSignature?: string;
            fileData: {
                mimeType?: string;
                fileUri: string;
            };
            /**
             * https://ai.google.dev/api/caching#VideoMetadata
             */
            metadata?: {
                /**
                 * The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                 */
                startOffset?: string;
                /**
                 * The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                 */
                endOffset?: string;
                /**
                 * The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]
                 */
                fps?: number;
            };
        } | {
            /**
             * Indicates if the part is thought from the model
             */
            thought?: boolean;
            /**
             * An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string
             */
            thoughtSignature?: string;
            language: 'LANGUAGE_UNSPECIFIED' | 'PYTHON';
            executableCode: {
                code: string;
            };
            /**
             * https://ai.google.dev/api/caching#VideoMetadata
             */
            metadata?: {
                /**
                 * The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                 */
                startOffset?: string;
                /**
                 * The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                 */
                endOffset?: string;
                /**
                 * The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]
                 */
                fps?: number;
            };
        } | {
            /**
             * Indicates if the part is thought from the model
             */
            thought?: boolean;
            /**
             * An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string
             */
            thoughtSignature?: string;
            codeExecutionResult: {
                /**
                 * Outcome of the code execution.
                 */
                outcome: 'OUTCOME_UNSPECIFIED' | 'OUTCOME_OK' | 'OUTCOME_FAILED' | 'OUTCOME_DEADLINE_EXCEEDED';
                output?: string;
            };
            /**
             * https://ai.google.dev/api/caching#VideoMetadata
             */
            metadata?: {
                /**
                 * The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                 */
                startOffset?: string;
                /**
                 * The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                 */
                endOffset?: string;
                /**
                 * The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]
                 */
                fps?: number;
            };
        }>;
    }>;
    /**
     * A list of Tools the Model may use to generate the next response. A Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the Model. Supported Tools are Function and codeExecution. Refer to the Function calling and the Code execution guides to learn more.
     */
    tools?: Array<{
        functionDeclarations?: Array<{
            /**
             * The name of the function. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 63.
             */
            name: string;
            /**
             * A brief description of the function.
             */
            description: string;
            /**
             * https://ai.google.dev/api/caching#Behavior
             */
            behavior?: 'UNSPECIFIED' | 'BLOCKING' | 'NON_BLOCKING';
            /**
             * Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.
             */
            parameters?: {
                [key: string]: unknown;
            };
            parametersJsonSchema?: unknown;
            response?: unknown;
            responseJsonSchema?: unknown;
        }>;
        /**
         * https://ai.google.dev/api/caching#GoogleSearchRetrieval
         */
        googleSearchRetrieval?: {
            /**
             *
             * Specifies the dynamic retrieval configuration for the given source.
             *
             * https://ai.google.dev/api/caching#DynamicRetrievalConfig
             *
             */
            dynamicRetrievalConfig: {
                /**
                 * https://ai.google.dev/api/caching#Mode
                 */
                mode: 'MODE_UNSPECIFIED' | 'MODE_DYNAMIC';
                dynamicThreshold: number;
            };
        };
        codeExecution?: unknown;
        googleSearch?: unknown;
        urlContext?: unknown;
    }> | {
        functionDeclarations?: Array<{
            /**
             * The name of the function. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 63.
             */
            name: string;
            /**
             * A brief description of the function.
             */
            description: string;
            /**
             * https://ai.google.dev/api/caching#Behavior
             */
            behavior?: 'UNSPECIFIED' | 'BLOCKING' | 'NON_BLOCKING';
            /**
             * Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.
             */
            parameters?: {
                [key: string]: unknown;
            };
            parametersJsonSchema?: unknown;
            response?: unknown;
            responseJsonSchema?: unknown;
        }>;
        /**
         * https://ai.google.dev/api/caching#GoogleSearchRetrieval
         */
        googleSearchRetrieval?: {
            /**
             *
             * Specifies the dynamic retrieval configuration for the given source.
             *
             * https://ai.google.dev/api/caching#DynamicRetrievalConfig
             *
             */
            dynamicRetrievalConfig: {
                /**
                 * https://ai.google.dev/api/caching#Mode
                 */
                mode: 'MODE_UNSPECIFIED' | 'MODE_DYNAMIC';
                dynamicThreshold: number;
            };
        };
        codeExecution?: unknown;
        googleSearch?: unknown;
        urlContext?: unknown;
    };
    /**
     * Tool configuration for any Tool specified in the request.
     */
    toolConfig?: {
        functionCallingConfig: {
            mode: 'AUTO' | 'ANY' | 'NONE';
            allowedFunctionNames?: Array<string>;
        };
    };
    /**
     * A list of unique SafetySetting instances for blocking unsafe content.
     */
    safetySettings?: Array<{
        /**
         *
         * The category for this setting
         *
         * https://ai.google.dev/api/generate-content#v1beta.HarmCategory
         *
         */
        category: 'HARM_CATEGORY_UNSPECIFIED' | 'HARM_CATEGORY_DEROGATORY' | 'HARM_CATEGORY_TOXICITY' | 'HARM_CATEGORY_VIOLENCE' | 'HARM_CATEGORY_SEXUAL' | 'HARM_CATEGORY_MEDICAL' | 'HARM_CATEGORY_DANGEROUS' | 'HARM_CATEGORY_HARASSMENT' | 'HARM_CATEGORY_HATE_SPEECH' | 'HARM_CATEGORY_SEXUALLY_EXPLICIT' | 'HARM_CATEGORY_DANGEROUS_CONTENT' | 'HARM_CATEGORY_CIVIC_INTEGRITY';
        /**
         *
         * Controls the probability threshold at which harm is blocked.
         *
         * https://ai.google.dev/api/generate-content#HarmBlockThreshold
         *
         */
        threshold: 'HARM_BLOCK_THRESHOLD_UNSPECIFIED' | 'BLOCK_LOW_AND_ABOVE' | 'BLOCK_MEDIUM_AND_ABOVE' | 'BLOCK_ONLY_HIGH' | 'BLOCK_NONE' | 'OFF';
    }>;
    /**
     * Developer set system instruction(s). Currently, text only.
     */
    systemInstruction?: {
        parts: Array<{
            text: string;
        }>;
    };
    /**
     * https://ai.google.dev/api/generate-content#v1beta.GenerationConfig
     */
    generationConfig?: {
        stopSequences?: Array<string>;
        responseMimeType?: string;
        responseSchema?: unknown;
        _responseJsonSchema?: unknown;
        responseJsonSchema?: unknown;
        responseModalities?: Array<'MODALITY_UNSPECIFIED' | 'TEXT' | 'IMAGE' | 'AUDIO'>;
        candidateCount?: number;
        maxOutputTokens?: number;
        temperature?: number;
        topP?: number;
        topK?: number;
        seed?: number;
        presencePenalty?: number;
        frequencyPenalty?: number;
        responseLogprobs?: boolean;
        logProbs?: number;
        enableEnhancedCivicAnswers?: boolean;
        speechConfig?: unknown;
        thinkingConfig?: unknown;
        imageConfig?: unknown;
        /**
         * https://ai.google.dev/api/generate-content#MediaResolution
         */
        mediaResolution?: 'MEDIA_RESOLUTION_UNSPECIFIED' | 'MEDIA_RESOLUTION_LOW' | 'MEDIA_RESOLUTION_MEDIUM' | 'MEDIA_RESOLUTION_HIGH';
    };
    /**
     * The name of the content cached to use as context to serve the prediction. Format: cachedContents/{cachedContent}
     */
    cachedContent?: string;
    config?: {
        tools?: Array<{
            functionDeclarations?: Array<{
                /**
                 * The name of the function. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 63.
                 */
                name: string;
                /**
                 * A brief description of the function.
                 */
                description: string;
                /**
                 * https://ai.google.dev/api/caching#Behavior
                 */
                behavior?: 'UNSPECIFIED' | 'BLOCKING' | 'NON_BLOCKING';
                /**
                 * Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.
                 */
                parameters?: {
                    [key: string]: unknown;
                };
                parametersJsonSchema?: unknown;
                response?: unknown;
                responseJsonSchema?: unknown;
            }>;
            /**
             * https://ai.google.dev/api/caching#GoogleSearchRetrieval
             */
            googleSearchRetrieval?: {
                /**
                 *
                 * Specifies the dynamic retrieval configuration for the given source.
                 *
                 * https://ai.google.dev/api/caching#DynamicRetrievalConfig
                 *
                 */
                dynamicRetrievalConfig: {
                    /**
                     * https://ai.google.dev/api/caching#Mode
                     */
                    mode: 'MODE_UNSPECIFIED' | 'MODE_DYNAMIC';
                    dynamicThreshold: number;
                };
            };
            codeExecution?: unknown;
            googleSearch?: unknown;
            urlContext?: unknown;
        }> | {
            functionDeclarations?: Array<{
                /**
                 * The name of the function. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 63.
                 */
                name: string;
                /**
                 * A brief description of the function.
                 */
                description: string;
                /**
                 * https://ai.google.dev/api/caching#Behavior
                 */
                behavior?: 'UNSPECIFIED' | 'BLOCKING' | 'NON_BLOCKING';
                /**
                 * Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.
                 */
                parameters?: {
                    [key: string]: unknown;
                };
                parametersJsonSchema?: unknown;
                response?: unknown;
                responseJsonSchema?: unknown;
            }>;
            /**
             * https://ai.google.dev/api/caching#GoogleSearchRetrieval
             */
            googleSearchRetrieval?: {
                /**
                 *
                 * Specifies the dynamic retrieval configuration for the given source.
                 *
                 * https://ai.google.dev/api/caching#DynamicRetrievalConfig
                 *
                 */
                dynamicRetrievalConfig: {
                    /**
                     * https://ai.google.dev/api/caching#Mode
                     */
                    mode: 'MODE_UNSPECIFIED' | 'MODE_DYNAMIC';
                    dynamicThreshold: number;
                };
            };
            codeExecution?: unknown;
            googleSearch?: unknown;
            urlContext?: unknown;
        };
        /**
         * Tool configuration for any Tool specified in the request.
         */
        toolConfig?: {
            functionCallingConfig: {
                mode: 'AUTO' | 'ANY' | 'NONE';
                allowedFunctionNames?: Array<string>;
            };
        };
    };
};

export type GeminiGenerateContentResponse = {
    /**
     * Candidate responses from the model
     */
    candidates: Array<{
        /**
         *
         * The base structured datatype containing multi-part content of a message.
         *
         * A Content includes a role field designating the producer of the Content and a parts field containing multi-part data that contains the content of the message turn.
         *
         * https://ai.google.dev/api/caching#Content
         *
         */
        content: {
            /**
             * The role of the author of this content.
             */
            role: string;
            parts: Array<{
                /**
                 * Indicates if the part is thought from the model
                 */
                thought?: boolean;
                /**
                 * An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string
                 */
                thoughtSignature?: string;
                text: string;
                /**
                 * https://ai.google.dev/api/caching#VideoMetadata
                 */
                metadata?: {
                    /**
                     * The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                     */
                    startOffset?: string;
                    /**
                     * The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                     */
                    endOffset?: string;
                    /**
                     * The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]
                     */
                    fps?: number;
                };
            } | {
                /**
                 * Indicates if the part is thought from the model
                 */
                thought?: boolean;
                /**
                 * An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string
                 */
                thoughtSignature?: string;
                inlineData: {
                    mimeType?: string;
                    data: string;
                };
                /**
                 * https://ai.google.dev/api/caching#VideoMetadata
                 */
                metadata?: {
                    /**
                     * The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                     */
                    startOffset?: string;
                    /**
                     * The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                     */
                    endOffset?: string;
                    /**
                     * The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]
                     */
                    fps?: number;
                };
            } | {
                /**
                 * Indicates if the part is thought from the model
                 */
                thought?: boolean;
                /**
                 * An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string
                 */
                thoughtSignature?: string;
                functionCall: {
                    id?: string;
                    name: string;
                    args?: {
                        [key: string]: unknown;
                    };
                };
                /**
                 * https://ai.google.dev/api/caching#VideoMetadata
                 */
                metadata?: {
                    /**
                     * The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                     */
                    startOffset?: string;
                    /**
                     * The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                     */
                    endOffset?: string;
                    /**
                     * The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]
                     */
                    fps?: number;
                };
            } | {
                /**
                 * Indicates if the part is thought from the model
                 */
                thought?: boolean;
                /**
                 * An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string
                 */
                thoughtSignature?: string;
                functionResponse: {
                    id?: string;
                    name: string;
                    response: {
                        [key: string]: unknown;
                    };
                    willContinue?: boolean;
                    scheduling?: 'SCHEDULING_UNSPECIFIED' | 'SILENT' | 'WHEN_IDLE' | 'INTERRUPT';
                };
                /**
                 * https://ai.google.dev/api/caching#VideoMetadata
                 */
                metadata?: {
                    /**
                     * The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                     */
                    startOffset?: string;
                    /**
                     * The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                     */
                    endOffset?: string;
                    /**
                     * The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]
                     */
                    fps?: number;
                };
            } | {
                /**
                 * Indicates if the part is thought from the model
                 */
                thought?: boolean;
                /**
                 * An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string
                 */
                thoughtSignature?: string;
                fileData: {
                    mimeType?: string;
                    fileUri: string;
                };
                /**
                 * https://ai.google.dev/api/caching#VideoMetadata
                 */
                metadata?: {
                    /**
                     * The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                     */
                    startOffset?: string;
                    /**
                     * The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                     */
                    endOffset?: string;
                    /**
                     * The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]
                     */
                    fps?: number;
                };
            } | {
                /**
                 * Indicates if the part is thought from the model
                 */
                thought?: boolean;
                /**
                 * An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string
                 */
                thoughtSignature?: string;
                language: 'LANGUAGE_UNSPECIFIED' | 'PYTHON';
                executableCode: {
                    code: string;
                };
                /**
                 * https://ai.google.dev/api/caching#VideoMetadata
                 */
                metadata?: {
                    /**
                     * The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                     */
                    startOffset?: string;
                    /**
                     * The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                     */
                    endOffset?: string;
                    /**
                     * The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]
                     */
                    fps?: number;
                };
            } | {
                /**
                 * Indicates if the part is thought from the model
                 */
                thought?: boolean;
                /**
                 * An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string
                 */
                thoughtSignature?: string;
                codeExecutionResult: {
                    /**
                     * Outcome of the code execution.
                     */
                    outcome: 'OUTCOME_UNSPECIFIED' | 'OUTCOME_OK' | 'OUTCOME_FAILED' | 'OUTCOME_DEADLINE_EXCEEDED';
                    output?: string;
                };
                /**
                 * https://ai.google.dev/api/caching#VideoMetadata
                 */
                metadata?: {
                    /**
                     * The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                     */
                    startOffset?: string;
                    /**
                     * The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'
                     */
                    endOffset?: string;
                    /**
                     * The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]
                     */
                    fps?: number;
                };
            }>;
        };
        /**
         *
         * The reason why the model stopped generating tokens.
         *
         * If empty, the model has not stopped generating tokens.
         *
         * https://ai.google.dev/api/generate-content#FinishReason
         *
         */
        finishReason?: 'FINISH_REASON_UNSPECIFIED' | 'STOP' | 'MAX_TOKENS' | 'SAFETY' | 'RECITATION' | 'LANGUAGE' | 'OTHER' | 'BLOCKLIST' | 'PROHIBITED_CONTENT' | 'SPII' | 'MALFORMED_FUNCTION_CALL' | 'IMAGE_SAFETY' | 'IMAGE_PROHIBITED_CONTENT' | 'IMAGE_OTHER' | 'NO_IMAGE' | 'IMAGE_RECITATION' | 'UNEXPECTED_TOOL_CALL' | 'TOO_MANY_TOOL_CALLS';
        safetyRatings?: Array<{
            /**
             *
             * The category for this setting
             *
             * https://ai.google.dev/api/generate-content#v1beta.HarmCategory
             *
             */
            category: 'HARM_CATEGORY_UNSPECIFIED' | 'HARM_CATEGORY_DEROGATORY' | 'HARM_CATEGORY_TOXICITY' | 'HARM_CATEGORY_VIOLENCE' | 'HARM_CATEGORY_SEXUAL' | 'HARM_CATEGORY_MEDICAL' | 'HARM_CATEGORY_DANGEROUS' | 'HARM_CATEGORY_HARASSMENT' | 'HARM_CATEGORY_HATE_SPEECH' | 'HARM_CATEGORY_SEXUALLY_EXPLICIT' | 'HARM_CATEGORY_DANGEROUS_CONTENT' | 'HARM_CATEGORY_CIVIC_INTEGRITY';
            /**
             * https://ai.google.dev/api/generate-content#HarmProbability
             */
            probability: 'HARM_PROBABILITY_UNSPECIFIED' | 'NEGLIGIBLE' | 'LOW' | 'MEDIUM' | 'HIGH';
            /**
             * Was this content blocked because of this rating?
             */
            blocked?: boolean;
        }>;
        /**
         * https://ai.google.dev/api/generate-content#citationmetadata
         */
        citationMetadata?: {
            citationSources: Array<{
                startIndex?: number;
                endIndex?: number;
                uri?: string;
                license?: string;
            }>;
        };
        tokenCount?: number;
        groundingAttributions?: Array<unknown>;
        groundingMetadata?: unknown;
        avgLogprobs?: number;
        logprobsResult?: unknown;
        urlContextMetadata?: unknown;
        /**
         * Index of the candidate in the list of response candidates.
         */
        index: number;
        /**
         * Details the reason why the model stopped generating tokens. This is populated only when finishReason is set.
         */
        finishMessage?: string;
    }>;
    /**
     * Returns the prompt's feedback related to the content filters
     */
    promptFeedback?: {
        /**
         * Specifies the reason why the prompt was blocked. https://ai.google.dev/api/generate-content#BlockReason
         */
        blockReason?: 'BLOCK_REASON_UNSPECIFIED' | 'SAFETY' | 'OTHER' | 'BLOCKLIST' | 'PROHIBITED_CONTENT' | 'IMAGE_SAFETY';
        safetyRatings: Array<{
            /**
             *
             * The category for this setting
             *
             * https://ai.google.dev/api/generate-content#v1beta.HarmCategory
             *
             */
            category: 'HARM_CATEGORY_UNSPECIFIED' | 'HARM_CATEGORY_DEROGATORY' | 'HARM_CATEGORY_TOXICITY' | 'HARM_CATEGORY_VIOLENCE' | 'HARM_CATEGORY_SEXUAL' | 'HARM_CATEGORY_MEDICAL' | 'HARM_CATEGORY_DANGEROUS' | 'HARM_CATEGORY_HARASSMENT' | 'HARM_CATEGORY_HATE_SPEECH' | 'HARM_CATEGORY_SEXUALLY_EXPLICIT' | 'HARM_CATEGORY_DANGEROUS_CONTENT' | 'HARM_CATEGORY_CIVIC_INTEGRITY';
            /**
             * https://ai.google.dev/api/generate-content#HarmProbability
             */
            probability: 'HARM_PROBABILITY_UNSPECIFIED' | 'NEGLIGIBLE' | 'LOW' | 'MEDIUM' | 'HIGH';
            /**
             * Was this content blocked because of this rating?
             */
            blocked?: boolean;
        }>;
    };
    /**
     * Metadata on the generation requests' token usage
     */
    usageMetadata?: {
        promptTokenCount?: number;
        cachedContentTokenCount?: number;
        candidatesTokenCount?: number;
        toolUsePromptTokenCount?: number;
        thoughtsTokenCount?: number;
        totalTokenCount?: number;
        promptTokensDetails?: Array<{
            /**
             * https://ai.google.dev/api/generate-content#Modality
             */
            modality: 'MODALITY_UNSPECIFIED' | 'TEXT' | 'IMAGE' | 'AUDIO';
            /**
             * Number of tokens
             */
            tokenCount: number;
        }>;
        cacheTokensDetails?: Array<{
            /**
             * https://ai.google.dev/api/generate-content#Modality
             */
            modality: 'MODALITY_UNSPECIFIED' | 'TEXT' | 'IMAGE' | 'AUDIO';
            /**
             * Number of tokens
             */
            tokenCount: number;
        }>;
        candidatesTokensDetails?: Array<{
            /**
             * https://ai.google.dev/api/generate-content#Modality
             */
            modality: 'MODALITY_UNSPECIFIED' | 'TEXT' | 'IMAGE' | 'AUDIO';
            /**
             * Number of tokens
             */
            tokenCount: number;
        }>;
        toolUsePromptTokensDetails?: Array<{
            /**
             * https://ai.google.dev/api/generate-content#Modality
             */
            modality: 'MODALITY_UNSPECIFIED' | 'TEXT' | 'IMAGE' | 'AUDIO';
            /**
             * Number of tokens
             */
            tokenCount: number;
        }>;
    };
    /**
     * The model version used to generate the response.
     */
    modelVersion?: string;
    /**
     * The unique response ID.
     */
    responseId?: string;
};

export type AnthropicMessagesRequest = {
    model: string;
    messages: Array<{
        content: string | Array<{
            text: string;
            type: 'text';
            cache_control?: unknown;
            citations?: Array<unknown> | null;
        } | {
            type: 'image';
            source: {
                type: 'base64';
                media_type: string;
                data: string;
            };
            cache_control?: unknown;
        } | {
            type: 'document';
            source: {
                type: 'base64';
                media_type: 'application/pdf';
                data: string;
            } | {
                type: 'text';
                media_type: 'text/plain';
                data: string;
            } | {
                type: 'url';
                url: string;
            } | {
                type: 'content';
                content: string | Array<{
                    text: string;
                    type: 'text';
                    cache_control?: unknown;
                    citations?: Array<unknown> | null;
                } | {
                    type: 'image';
                    source: {
                        type: 'base64';
                        media_type: string;
                        data: string;
                    };
                    cache_control?: unknown;
                }>;
            };
            title?: string | null;
            context?: string | null;
            citations?: {
                enabled: boolean;
            } | null;
            cache_control?: unknown;
        } | {
            id: string;
            input: unknown;
            name: string;
            type: 'tool_use';
            cache_control?: unknown;
        } | {
            tool_use_id: string;
            type: 'tool_result';
            cache_control?: unknown;
            content?: string | Array<{
                text: string;
                type: 'text';
                cache_control?: unknown;
                citations?: Array<unknown> | null;
            } | {
                type: 'image';
                source: {
                    type: 'base64';
                    media_type: string;
                    data: string;
                };
                cache_control?: unknown;
            } | {
                type: 'document';
                source: {
                    type: 'base64';
                    media_type: 'application/pdf';
                    data: string;
                } | {
                    type: 'text';
                    media_type: 'text/plain';
                    data: string;
                } | {
                    type: 'url';
                    url: string;
                } | {
                    type: 'content';
                    content: string | Array<{
                        text: string;
                        type: 'text';
                        cache_control?: unknown;
                        citations?: Array<unknown> | null;
                    } | {
                        type: 'image';
                        source: {
                            type: 'base64';
                            media_type: string;
                            data: string;
                        };
                        cache_control?: unknown;
                    }>;
                };
                title?: string | null;
                context?: string | null;
                citations?: {
                    enabled: boolean;
                } | null;
                cache_control?: unknown;
            }>;
            is_error?: boolean;
        }>;
        role: 'user' | 'assistant';
    }>;
    max_tokens: number;
    container?: string | null;
    context_management?: {
        [key: string]: never;
    } | null;
    mcp_servers?: Array<unknown>;
    metadata?: {
        user_id: string | null;
    };
    output_config?: {
        effort?: string | null;
        format?: {
            type: 'json_schema';
            schema: {
                [key: string]: unknown;
            };
        } | null;
    };
    service_tier?: unknown;
    speed?: 'fast' | 'standard';
    stop_sequences?: Array<string>;
    stream?: boolean;
    system?: string | {
        type: 'text';
        text: string;
        cache_control?: unknown;
        citations?: Array<unknown> | null;
    } | Array<{
        type: 'text';
        text: string;
        cache_control?: unknown;
        citations?: Array<unknown> | null;
    }>;
    temperature?: number;
    thinking?: {
        type: 'enabled';
        budget_tokens: number;
    } | {
        type: 'disabled';
    } | {
        type: 'adaptive';
    };
    tool_choice?: {
        type: 'auto';
        disable_parallel_tool_use?: boolean;
    } | {
        type: 'any';
        disable_parallel_tool_use?: boolean;
    } | {
        type: 'tool';
        name: string;
        disable_parallel_tool_use?: boolean;
    } | {
        type: 'none';
    };
    tools?: Array<{
        name: string;
        type?: 'custom';
        cache_control?: unknown;
        input_schema: {
            [key: string]: unknown;
        };
        description?: string;
    } | {
        name: 'bash';
        type: 'bash_20250124';
        cache_control?: unknown;
    } | {
        name: 'str_replace_editor';
        type: 'text_editor_20250124';
        cache_control?: unknown;
    } | {
        name: 'str_replace_based_edit_tool';
        type: 'text_editor_20250429';
        cache_control?: unknown;
    } | {
        name: 'str_replace_based_edit_tool';
        type: 'text_editor_20250728';
        cache_control?: unknown;
        max_characters?: number | null;
    } | {
        name: 'web_search';
        type: 'web_search_20250305';
        allowed_domains?: Array<string> | null;
        blocked_domains?: Array<string> | null;
        cache_control?: unknown;
        max_uses?: number | null;
        user_location?: unknown;
    }>;
    top_k?: number;
    top_p?: number;
};

export type AnthropicMessagesResponse = {
    id: string;
    content: Array<{
        citations: Array<unknown> | null;
        text: string;
        type: 'text';
    } | {
        id: string;
        input: unknown;
        name: string;
        type: 'tool_use';
    }>;
    model: string;
    role: 'assistant';
    stop_reason: unknown;
    stop_sequence: string | null;
    type: 'message';
    usage: {
        input_tokens: number;
        output_tokens: number;
    };
};

export type CerebrasChatCompletionRequest = {
    model: string;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186
     */
    messages: Array<{
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'developer';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'system';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        } | {
            type: 'input_audio';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792
             */
            input_audio: {
                data: string;
                format: 'wav' | 'mp3';
            };
        } | {
            type: 'file';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732
             */
            file: {
                file_data?: string;
                file_id?: string;
                filename?: string;
            };
        }>;
        role: 'user';
        name?: string;
    } | {
        role: 'assistant';
        audio?: {
            id: string;
        } | null;
        content?: string | Array<{
            type: 'text';
            text: string;
        }> | Array<{
            type: 'refusal';
            refusal: string;
        }> | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
         */
        function_call?: {
            arguments: string;
            name: string;
        } | null;
        name?: string;
        refusal?: string | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197
         */
        tool_calls?: Array<{
            id: string;
            type: 'function';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
             */
            function: {
                arguments: string;
                name: string;
            };
        } | {
            id: string;
            type: 'custom';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
             */
            custom: {
                input: string;
                name: string;
            };
        }>;
    } | {
        role: 'tool';
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        }>;
        tool_call_id: string;
    } | {
        role: 'function';
        content: string | null;
        name: string;
    }>;
    /**
     *
     * A function tool that can be used to generate a response.
     *
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392
     *
     */
    tools?: Array<{
        type: 'function';
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
         */
        function: {
            name: string;
            description?: string;
            /**
             *
             * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
             *
             * The parameters the functions accepts, described as a JSON Schema object. See the
             * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
             * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
             * documentation about the format.
             *
             * Omitting parameters defines a function with an empty parameter list.
             *
             */
            parameters?: {
                [key: string]: unknown;
            };
            strict?: boolean | null;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    }>;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405
     */
    tool_choice?: 'none' | 'auto' | 'required' | {
        type: 'allowed_tools';
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455
         */
        allowed_tools: {
            /**
             *
             * Constrains the tools available to the model to a pre-defined set.
             *
             * auto allows the model to pick from among the allowed tools and generate a
             * message.
             *
             * required requires the model to call one or more of the allowed tools.
             *
             */
            mode: 'auto' | 'required';
            /**
             * A list of tool definitions that the model should be allowed to call
             */
            tools: Array<{
                [key: string]: {
                    type: 'function';
                    /**
                     * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
                     */
                    function: {
                        name: string;
                        description?: string;
                        /**
                         *
                         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
                         *
                         * The parameters the functions accepts, described as a JSON Schema object. See the
                         * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
                         * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
                         * documentation about the format.
                         *
                         * Omitting parameters defines a function with an empty parameter list.
                         *
                         */
                        parameters?: {
                            [key: string]: unknown;
                        };
                        strict?: boolean | null;
                    };
                };
            }>;
        };
    } | {
        type: 'function';
        function: {
            name: string;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    };
    temperature?: number | null;
    max_tokens?: number | null;
    stream?: boolean | null;
};

export type CerebrasChatCompletionResponse = {
    id: string;
    choices: Array<{
        finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';
        index: number;
        logprobs: unknown;
        /**
         * https://github.com/Cerebras/cerebras-cloud-sdk-node/blob/main/src/resources/chat/completions.ts
         */
        message: {
            content?: string | null;
            refusal?: string | null;
            role: 'assistant';
            annotations?: Array<unknown>;
            audio?: unknown;
            function_call?: {
                arguments: string;
                name: string;
            } | null;
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197
             */
            tool_calls?: Array<{
                id: string;
                type: 'function';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
                 */
                function: {
                    arguments: string;
                    name: string;
                };
            } | {
                id: string;
                type: 'custom';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
                 */
                custom: {
                    input: string;
                    name: string;
                };
            }>;
        };
    }>;
    created: number;
    model: string;
    object: 'chat.completion';
    server_tier?: string;
    system_fingerprint?: string | null;
    /**
     * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113
     */
    usage?: {
        completion_tokens: number;
        prompt_tokens: number;
        total_tokens: number;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144
         */
        completion_tokens_details?: unknown;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173
         */
        prompt_tokens_details?: unknown;
    };
};

export type CohereChatRequest = {
    model: string;
    messages: Array<{
        role: 'user';
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'tool_result';
            tool_call_id: string;
            content: string;
        }>;
    } | {
        role: 'assistant';
        content?: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'tool_result';
            tool_call_id: string;
            content: string;
        }>;
        tool_calls?: Array<{
            id: string;
            type: 'function';
            function: {
                name: string;
                arguments: string;
            };
        }>;
    } | {
        role: 'system';
        content: string;
    } | {
        role: 'tool';
        tool_call_id: string;
        content: string;
    }>;
    stream?: boolean;
    temperature?: number;
    max_tokens?: number;
    tools?: Array<{
        type: 'function';
        function: {
            name: string;
            description?: string;
            parameters?: {
                type: string;
                description?: string;
                required?: Array<string>;
                properties?: {
                    [key: string]: unknown;
                };
            };
        };
    }>;
    tool_choice?: 'REQUIRED' | 'NONE';
    safety_mode?: 'CONTEXTUAL' | 'STRICT' | 'OFF';
    response_format?: {
        type: 'json_object' | 'text';
        json_schema?: {
            [key: string]: unknown;
        };
    };
    frequency_penalty?: number;
    presence_penalty?: number;
    k?: number;
    p?: number;
    seed?: number;
    stop_sequences?: Array<string>;
    logprobs?: boolean;
};

export type CohereChatResponse = {
    id: string;
    message: {
        role: 'assistant';
        content?: Array<{
            type: 'text';
            text: string;
        } | {
            type: 'tool_result';
            tool_call_id: string;
            content: string;
        }>;
        tool_calls?: Array<{
            id: string;
            type: 'function';
            function: {
                name: string;
                arguments: string;
            };
        }>;
    };
    finish_reason: 'COMPLETE' | 'MAX_TOKENS' | 'STOP_SEQUENCE' | 'TOOL_CALL' | 'ERROR';
    usage?: {
        billed_units?: {
            input_tokens?: number;
            output_tokens?: number;
        };
        tokens?: {
            input_tokens?: number;
            output_tokens?: number;
        };
    };
};

export type MistralChatCompletionRequest = {
    model: string;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186
     */
    messages: Array<{
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'developer';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'system';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        } | {
            type: 'input_audio';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792
             */
            input_audio: {
                data: string;
                format: 'wav' | 'mp3';
            };
        } | {
            type: 'file';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732
             */
            file: {
                file_data?: string;
                file_id?: string;
                filename?: string;
            };
        }>;
        role: 'user';
        name?: string;
    } | {
        role: 'assistant';
        audio?: {
            id: string;
        } | null;
        content?: string | Array<{
            type: 'text';
            text: string;
        }> | Array<{
            type: 'refusal';
            refusal: string;
        }> | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
         */
        function_call?: {
            arguments: string;
            name: string;
        } | null;
        name?: string;
        refusal?: string | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197
         */
        tool_calls?: Array<{
            id: string;
            type: 'function';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
             */
            function: {
                arguments: string;
                name: string;
            };
        } | {
            id: string;
            type: 'custom';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
             */
            custom: {
                input: string;
                name: string;
            };
        }>;
    } | {
        role: 'tool';
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        }>;
        tool_call_id: string;
    } | {
        role: 'function';
        content: string | null;
        name: string;
    }>;
    /**
     *
     * A function tool that can be used to generate a response.
     *
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392
     *
     */
    tools?: Array<{
        type: 'function';
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
         */
        function: {
            name: string;
            description?: string;
            /**
             *
             * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
             *
             * The parameters the functions accepts, described as a JSON Schema object. See the
             * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
             * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
             * documentation about the format.
             *
             * Omitting parameters defines a function with an empty parameter list.
             *
             */
            parameters?: {
                [key: string]: unknown;
            };
            strict?: boolean | null;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    }>;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405
     */
    tool_choice?: 'none' | 'auto' | 'required' | {
        type: 'allowed_tools';
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455
         */
        allowed_tools: {
            /**
             *
             * Constrains the tools available to the model to a pre-defined set.
             *
             * auto allows the model to pick from among the allowed tools and generate a
             * message.
             *
             * required requires the model to call one or more of the allowed tools.
             *
             */
            mode: 'auto' | 'required';
            /**
             * A list of tool definitions that the model should be allowed to call
             */
            tools: Array<{
                [key: string]: {
                    type: 'function';
                    /**
                     * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
                     */
                    function: {
                        name: string;
                        description?: string;
                        /**
                         *
                         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
                         *
                         * The parameters the functions accepts, described as a JSON Schema object. See the
                         * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
                         * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
                         * documentation about the format.
                         *
                         * Omitting parameters defines a function with an empty parameter list.
                         *
                         */
                        parameters?: {
                            [key: string]: unknown;
                        };
                        strict?: boolean | null;
                    };
                };
            }>;
        };
    } | {
        type: 'function';
        function: {
            name: string;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    };
    temperature?: number | null;
    max_tokens?: number | null;
    stream?: boolean | null;
};

export type MistralChatCompletionResponse = {
    id: string;
    choices: Array<{
        finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';
        index: number;
        logprobs: unknown;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000
         */
        message: {
            content: string | null;
            refusal?: string | null;
            role: 'assistant';
            annotations?: Array<unknown>;
            audio?: unknown;
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
             */
            function_call?: {
                arguments: string;
                name: string;
            } | null;
            tool_calls?: Array<{
                id: string;
                type: 'function';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
                 */
                function: {
                    arguments: string;
                    name: string;
                };
            } | {
                id: string;
                type: 'custom';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
                 */
                custom: {
                    input: string;
                    name: string;
                };
            }> | null;
        };
    }>;
    created: number;
    model: string;
    object: 'chat.completion';
    server_tier?: string;
    system_fingerprint?: string | null;
    /**
     * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113
     */
    usage?: {
        completion_tokens: number;
        prompt_tokens: number;
        total_tokens: number;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144
         */
        completion_tokens_details?: unknown;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173
         */
        prompt_tokens_details?: unknown;
    };
    [key: string]: unknown;
};

export type PerplexityChatCompletionRequest = {
    model: string;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186
     */
    messages: Array<{
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'developer';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'system';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        } | {
            type: 'input_audio';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792
             */
            input_audio: {
                data: string;
                format: 'wav' | 'mp3';
            };
        } | {
            type: 'file';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732
             */
            file: {
                file_data?: string;
                file_id?: string;
                filename?: string;
            };
        }>;
        role: 'user';
        name?: string;
    } | {
        role: 'assistant';
        audio?: {
            id: string;
        } | null;
        content?: string | Array<{
            type: 'text';
            text: string;
        }> | Array<{
            type: 'refusal';
            refusal: string;
        }> | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
         */
        function_call?: {
            arguments: string;
            name: string;
        } | null;
        name?: string;
        refusal?: string | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197
         */
        tool_calls?: Array<{
            id: string;
            type: 'function';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
             */
            function: {
                arguments: string;
                name: string;
            };
        } | {
            id: string;
            type: 'custom';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
             */
            custom: {
                input: string;
                name: string;
            };
        }>;
    } | {
        role: 'tool';
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        }>;
        tool_call_id: string;
    } | {
        role: 'function';
        content: string | null;
        name: string;
    }>;
    /**
     *
     * A function tool that can be used to generate a response.
     *
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392
     *
     */
    tools?: Array<{
        type: 'function';
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
         */
        function: {
            name: string;
            description?: string;
            /**
             *
             * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
             *
             * The parameters the functions accepts, described as a JSON Schema object. See the
             * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
             * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
             * documentation about the format.
             *
             * Omitting parameters defines a function with an empty parameter list.
             *
             */
            parameters?: {
                [key: string]: unknown;
            };
            strict?: boolean | null;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    }>;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405
     */
    tool_choice?: 'none' | 'auto' | 'required' | {
        type: 'allowed_tools';
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455
         */
        allowed_tools: {
            /**
             *
             * Constrains the tools available to the model to a pre-defined set.
             *
             * auto allows the model to pick from among the allowed tools and generate a
             * message.
             *
             * required requires the model to call one or more of the allowed tools.
             *
             */
            mode: 'auto' | 'required';
            /**
             * A list of tool definitions that the model should be allowed to call
             */
            tools: Array<{
                [key: string]: {
                    type: 'function';
                    /**
                     * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
                     */
                    function: {
                        name: string;
                        description?: string;
                        /**
                         *
                         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
                         *
                         * The parameters the functions accepts, described as a JSON Schema object. See the
                         * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
                         * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
                         * documentation about the format.
                         *
                         * Omitting parameters defines a function with an empty parameter list.
                         *
                         */
                        parameters?: {
                            [key: string]: unknown;
                        };
                        strict?: boolean | null;
                    };
                };
            }>;
        };
    } | {
        type: 'function';
        function: {
            name: string;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    };
    temperature?: number | null;
    max_tokens?: number | null;
    stream?: boolean | null;
};

export type PerplexityChatCompletionResponse = {
    id: string;
    choices: Array<{
        finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';
        index: number;
        logprobs: unknown;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000
         */
        message: {
            content: string | null;
            refusal?: string | null;
            role: 'assistant';
            annotations?: Array<unknown>;
            audio?: unknown;
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
             */
            function_call?: {
                arguments: string;
                name: string;
            } | null;
            tool_calls?: Array<{
                id: string;
                type: 'function';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
                 */
                function: {
                    arguments: string;
                    name: string;
                };
            } | {
                id: string;
                type: 'custom';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
                 */
                custom: {
                    input: string;
                    name: string;
                };
            }> | null;
        };
    }>;
    created: number;
    model: string;
    object: 'chat.completion';
    server_tier?: string;
    system_fingerprint?: string | null;
    /**
     * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113
     */
    usage?: {
        completion_tokens: number;
        prompt_tokens: number;
        total_tokens: number;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144
         */
        completion_tokens_details?: unknown;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173
         */
        prompt_tokens_details?: unknown;
    };
    [key: string]: unknown;
};

export type GroqChatCompletionRequest = {
    model: string;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186
     */
    messages: Array<{
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'developer';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'system';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        } | {
            type: 'input_audio';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792
             */
            input_audio: {
                data: string;
                format: 'wav' | 'mp3';
            };
        } | {
            type: 'file';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732
             */
            file: {
                file_data?: string;
                file_id?: string;
                filename?: string;
            };
        }>;
        role: 'user';
        name?: string;
    } | {
        role: 'assistant';
        audio?: {
            id: string;
        } | null;
        content?: string | Array<{
            type: 'text';
            text: string;
        }> | Array<{
            type: 'refusal';
            refusal: string;
        }> | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
         */
        function_call?: {
            arguments: string;
            name: string;
        } | null;
        name?: string;
        refusal?: string | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197
         */
        tool_calls?: Array<{
            id: string;
            type: 'function';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
             */
            function: {
                arguments: string;
                name: string;
            };
        } | {
            id: string;
            type: 'custom';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
             */
            custom: {
                input: string;
                name: string;
            };
        }>;
    } | {
        role: 'tool';
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        }>;
        tool_call_id: string;
    } | {
        role: 'function';
        content: string | null;
        name: string;
    }>;
    /**
     *
     * A function tool that can be used to generate a response.
     *
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392
     *
     */
    tools?: Array<{
        type: 'function';
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
         */
        function: {
            name: string;
            description?: string;
            /**
             *
             * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
             *
             * The parameters the functions accepts, described as a JSON Schema object. See the
             * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
             * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
             * documentation about the format.
             *
             * Omitting parameters defines a function with an empty parameter list.
             *
             */
            parameters?: {
                [key: string]: unknown;
            };
            strict?: boolean | null;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    }>;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405
     */
    tool_choice?: 'none' | 'auto' | 'required' | {
        type: 'allowed_tools';
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455
         */
        allowed_tools: {
            /**
             *
             * Constrains the tools available to the model to a pre-defined set.
             *
             * auto allows the model to pick from among the allowed tools and generate a
             * message.
             *
             * required requires the model to call one or more of the allowed tools.
             *
             */
            mode: 'auto' | 'required';
            /**
             * A list of tool definitions that the model should be allowed to call
             */
            tools: Array<{
                [key: string]: {
                    type: 'function';
                    /**
                     * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
                     */
                    function: {
                        name: string;
                        description?: string;
                        /**
                         *
                         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
                         *
                         * The parameters the functions accepts, described as a JSON Schema object. See the
                         * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
                         * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
                         * documentation about the format.
                         *
                         * Omitting parameters defines a function with an empty parameter list.
                         *
                         */
                        parameters?: {
                            [key: string]: unknown;
                        };
                        strict?: boolean | null;
                    };
                };
            }>;
        };
    } | {
        type: 'function';
        function: {
            name: string;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    };
    temperature?: number | null;
    max_tokens?: number | null;
    stream?: boolean | null;
};

export type GroqChatCompletionResponse = {
    id: string;
    choices: Array<{
        finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';
        index: number;
        logprobs: unknown;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000
         */
        message: {
            content: string | null;
            refusal?: string | null;
            role: 'assistant';
            annotations?: Array<unknown>;
            audio?: unknown;
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
             */
            function_call?: {
                arguments: string;
                name: string;
            } | null;
            tool_calls?: Array<{
                id: string;
                type: 'function';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
                 */
                function: {
                    arguments: string;
                    name: string;
                };
            } | {
                id: string;
                type: 'custom';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
                 */
                custom: {
                    input: string;
                    name: string;
                };
            }> | null;
        };
    }>;
    created: number;
    model: string;
    object: 'chat.completion';
    server_tier?: string;
    system_fingerprint?: string | null;
    /**
     * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113
     */
    usage?: {
        completion_tokens: number;
        prompt_tokens: number;
        total_tokens: number;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144
         */
        completion_tokens_details?: unknown;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173
         */
        prompt_tokens_details?: unknown;
    };
    [key: string]: unknown;
};

export type OpenrouterChatCompletionRequest = {
    model: string;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186
     */
    messages: Array<{
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'developer';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'system';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        } | {
            type: 'input_audio';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792
             */
            input_audio: {
                data: string;
                format: 'wav' | 'mp3';
            };
        } | {
            type: 'file';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732
             */
            file: {
                file_data?: string;
                file_id?: string;
                filename?: string;
            };
        }>;
        role: 'user';
        name?: string;
    } | {
        role: 'assistant';
        audio?: {
            id: string;
        } | null;
        content?: string | Array<{
            type: 'text';
            text: string;
        }> | Array<{
            type: 'refusal';
            refusal: string;
        }> | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
         */
        function_call?: {
            arguments: string;
            name: string;
        } | null;
        name?: string;
        refusal?: string | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197
         */
        tool_calls?: Array<{
            id: string;
            type: 'function';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
             */
            function: {
                arguments: string;
                name: string;
            };
        } | {
            id: string;
            type: 'custom';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
             */
            custom: {
                input: string;
                name: string;
            };
        }>;
    } | {
        role: 'tool';
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        }>;
        tool_call_id: string;
    } | {
        role: 'function';
        content: string | null;
        name: string;
    }>;
    /**
     *
     * A function tool that can be used to generate a response.
     *
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392
     *
     */
    tools?: Array<{
        type: 'function';
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
         */
        function: {
            name: string;
            description?: string;
            /**
             *
             * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
             *
             * The parameters the functions accepts, described as a JSON Schema object. See the
             * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
             * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
             * documentation about the format.
             *
             * Omitting parameters defines a function with an empty parameter list.
             *
             */
            parameters?: {
                [key: string]: unknown;
            };
            strict?: boolean | null;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    }>;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405
     */
    tool_choice?: 'none' | 'auto' | 'required' | {
        type: 'allowed_tools';
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455
         */
        allowed_tools: {
            /**
             *
             * Constrains the tools available to the model to a pre-defined set.
             *
             * auto allows the model to pick from among the allowed tools and generate a
             * message.
             *
             * required requires the model to call one or more of the allowed tools.
             *
             */
            mode: 'auto' | 'required';
            /**
             * A list of tool definitions that the model should be allowed to call
             */
            tools: Array<{
                [key: string]: {
                    type: 'function';
                    /**
                     * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
                     */
                    function: {
                        name: string;
                        description?: string;
                        /**
                         *
                         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
                         *
                         * The parameters the functions accepts, described as a JSON Schema object. See the
                         * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
                         * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
                         * documentation about the format.
                         *
                         * Omitting parameters defines a function with an empty parameter list.
                         *
                         */
                        parameters?: {
                            [key: string]: unknown;
                        };
                        strict?: boolean | null;
                    };
                };
            }>;
        };
    } | {
        type: 'function';
        function: {
            name: string;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    };
    temperature?: number | null;
    max_tokens?: number | null;
    stream?: boolean | null;
};

export type OpenrouterChatCompletionResponse = {
    id: string;
    choices: Array<{
        finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';
        index: number;
        logprobs: unknown;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000
         */
        message: {
            content: string | null;
            refusal?: string | null;
            role: 'assistant';
            annotations?: Array<unknown>;
            audio?: unknown;
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
             */
            function_call?: {
                arguments: string;
                name: string;
            } | null;
            tool_calls?: Array<{
                id: string;
                type: 'function';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
                 */
                function: {
                    arguments: string;
                    name: string;
                };
            } | {
                id: string;
                type: 'custom';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
                 */
                custom: {
                    input: string;
                    name: string;
                };
            }> | null;
        };
    }>;
    created: number;
    model: string;
    object: 'chat.completion';
    server_tier?: string;
    system_fingerprint?: string | null;
    /**
     * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113
     */
    usage?: {
        completion_tokens: number;
        prompt_tokens: number;
        total_tokens: number;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144
         */
        completion_tokens_details?: unknown;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173
         */
        prompt_tokens_details?: unknown;
    };
    [key: string]: unknown;
};

export type VllmChatCompletionRequest = {
    model: string;
    /**
     * A message in the conversation
     */
    messages: Array<{
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'developer';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'system';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * Image URL details
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        } | {
            type: 'input_audio';
            /**
             * Audio input details
             */
            input_audio: {
                data: string;
                format: 'wav' | 'mp3';
            };
        } | {
            type: 'file';
            /**
             * File details
             */
            file: {
                file_data?: string;
                file_id?: string;
                filename?: string;
            };
        }>;
        role: 'user';
        name?: string;
    } | {
        role: 'assistant';
        audio?: {
            id: string;
        } | null;
        content?: string | Array<{
            type: 'text';
            text: string;
        }> | Array<{
            type: 'refusal';
            refusal: string;
        }> | null;
        function_call?: {
            arguments: string;
            name: string;
        } | null;
        name?: string;
        refusal?: string | null;
        /**
         * A tool call in the assistant message
         */
        tool_calls?: Array<{
            id: string;
            type: 'function';
            /**
             * Function call details
             */
            function: {
                arguments: string;
                name: string;
            };
        } | {
            id: string;
            type: 'custom';
            /**
             * Custom tool call details
             */
            custom: {
                input: string;
                name: string;
            };
        }>;
        reasoning?: string | null;
    } | {
        role: 'tool';
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * Image URL details
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        }>;
        tool_call_id: string;
    } | {
        role: 'function';
        content: string | null;
        name: string;
    }>;
    /**
     * A tool definition
     */
    tools?: Array<{
        type: 'function';
        /**
         * A function definition for tool calling
         */
        function: {
            name: string;
            description?: string;
            /**
             *
             * The parameters the functions accepts, described as a JSON Schema object.
             * Omitting parameters defines a function with an empty parameter list.
             *
             */
            parameters?: {
                [key: string]: unknown;
            };
            strict?: boolean | null;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool
             */
            name: string;
            /**
             * Description of the tool
             */
            description?: string;
            /**
             * The input format for the custom tool
             */
            format?: {
                /**
                 * Unconstrained text format
                 */
                type: 'text';
            } | {
                type: 'grammar';
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    }>;
    /**
     * Tool choice option
     */
    tool_choice?: 'none' | 'auto' | 'required' | {
        type: 'allowed_tools';
        /**
         * Allowed tools configuration
         */
        allowed_tools: {
            /**
             *
             * Constrains the tools available to the model.
             * auto: allows the model to pick from allowed tools or generate a message.
             * required: requires the model to call one or more of the allowed tools.
             *
             */
            mode: 'auto' | 'required';
            tools: Array<{
                [key: string]: {
                    type: 'function';
                    /**
                     * A function definition for tool calling
                     */
                    function: {
                        name: string;
                        description?: string;
                        /**
                         *
                         * The parameters the functions accepts, described as a JSON Schema object.
                         * Omitting parameters defines a function with an empty parameter list.
                         *
                         */
                        parameters?: {
                            [key: string]: unknown;
                        };
                        strict?: boolean | null;
                    };
                };
            }>;
        };
    } | {
        type: 'function';
        function: {
            name: string;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool
             */
            name: string;
            /**
             * Description of the tool
             */
            description?: string;
            /**
             * The input format for the custom tool
             */
            format?: {
                /**
                 * Unconstrained text format
                 */
                type: 'text';
            } | {
                type: 'grammar';
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    };
    temperature?: number | null;
    max_tokens?: number | null;
    stream?: boolean | null;
    top_p?: number | null;
    top_k?: number | null;
    frequency_penalty?: number | null;
    presence_penalty?: number | null;
    repetition_penalty?: number | null;
    stop?: string | Array<string>;
    seed?: number | null;
    n?: number | null;
    best_of?: number | null;
    logprobs?: boolean | null;
    top_logprobs?: number | null;
};

export type VllmChatCompletionResponse = {
    id: string;
    choices: Array<{
        finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';
        index: number;
        logprobs: unknown;
        /**
         * The assistant message in the response
         */
        message: {
            content: string | null;
            refusal?: string | null;
            role: 'assistant';
            annotations?: Array<unknown>;
            audio?: unknown;
            function_call?: {
                arguments: string;
                name: string;
            } | null;
            /**
             * A tool call in the assistant message
             */
            tool_calls?: Array<{
                id: string;
                type: 'function';
                /**
                 * Function call details
                 */
                function: {
                    arguments: string;
                    name: string;
                };
            } | {
                id: string;
                type: 'custom';
                /**
                 * Custom tool call details
                 */
                custom: {
                    input: string;
                    name: string;
                };
            }>;
            reasoning?: string | null;
        };
    }>;
    created: number;
    model: string;
    object: 'chat.completion';
    system_fingerprint?: string | null;
    /**
     * Token usage statistics for the completion
     */
    usage?: {
        completion_tokens: number;
        prompt_tokens: number;
        total_tokens: number;
        completion_tokens_details?: unknown;
        prompt_tokens_details?: unknown;
    };
};

export type OllamaChatCompletionRequest = {
    model: string;
    /**
     * A message in the conversation
     */
    messages: Array<{
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'developer';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'system';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * Image URL details
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        } | {
            type: 'input_audio';
            /**
             * Audio input details
             */
            input_audio: {
                data: string;
                format: 'wav' | 'mp3';
            };
        } | {
            type: 'file';
            /**
             * File details
             */
            file: {
                file_data?: string;
                file_id?: string;
                filename?: string;
            };
        }>;
        role: 'user';
        name?: string;
    } | {
        role: 'assistant';
        audio?: {
            id: string;
        } | null;
        content?: string | Array<{
            type: 'text';
            text: string;
        }> | Array<{
            type: 'refusal';
            refusal: string;
        }> | null;
        function_call?: {
            arguments: string;
            name: string;
        } | null;
        name?: string;
        refusal?: string | null;
        /**
         * A tool call in the assistant message
         */
        tool_calls?: Array<{
            id: string;
            type: 'function';
            /**
             * Function call details
             */
            function: {
                arguments: string;
                name: string;
            };
        } | {
            id: string;
            type: 'custom';
            /**
             * Custom tool call details
             */
            custom: {
                input: string;
                name: string;
            };
        }>;
    } | {
        role: 'tool';
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * Image URL details
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        }>;
        tool_call_id: string;
    } | {
        role: 'function';
        content: string | null;
        name: string;
    }>;
    /**
     * A tool definition
     */
    tools?: Array<{
        type: 'function';
        /**
         * A function definition for tool calling
         */
        function: {
            name: string;
            description?: string;
            /**
             *
             * The parameters the functions accepts, described as a JSON Schema object.
             * Omitting parameters defines a function with an empty parameter list.
             *
             */
            parameters?: {
                [key: string]: unknown;
            };
            strict?: boolean | null;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool
             */
            name: string;
            /**
             * Description of the tool
             */
            description?: string;
            /**
             * The input format for the custom tool
             */
            format?: {
                /**
                 * Unconstrained text format
                 */
                type: 'text';
            } | {
                type: 'grammar';
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    }>;
    /**
     * Tool choice option
     */
    tool_choice?: 'none' | 'auto' | 'required' | {
        type: 'allowed_tools';
        /**
         * Allowed tools configuration
         */
        allowed_tools: {
            /**
             *
             * Constrains the tools available to the model.
             * auto: allows the model to pick from allowed tools or generate a message.
             * required: requires the model to call one or more of the allowed tools.
             *
             */
            mode: 'auto' | 'required';
            tools: Array<{
                [key: string]: {
                    type: 'function';
                    /**
                     * A function definition for tool calling
                     */
                    function: {
                        name: string;
                        description?: string;
                        /**
                         *
                         * The parameters the functions accepts, described as a JSON Schema object.
                         * Omitting parameters defines a function with an empty parameter list.
                         *
                         */
                        parameters?: {
                            [key: string]: unknown;
                        };
                        strict?: boolean | null;
                    };
                };
            }>;
        };
    } | {
        type: 'function';
        function: {
            name: string;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool
             */
            name: string;
            /**
             * Description of the tool
             */
            description?: string;
            /**
             * The input format for the custom tool
             */
            format?: {
                /**
                 * Unconstrained text format
                 */
                type: 'text';
            } | {
                type: 'grammar';
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    };
    temperature?: number | null;
    max_tokens?: number | null;
    stream?: boolean | null;
    top_p?: number | null;
    frequency_penalty?: number | null;
    presence_penalty?: number | null;
    stop?: string | Array<string>;
    seed?: number | null;
    n?: number | null;
};

export type OllamaChatCompletionResponse = {
    id: string;
    choices: Array<{
        finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';
        index: number;
        logprobs: unknown;
        /**
         * The assistant message in the response
         */
        message: {
            content: string | null;
            refusal?: string | null;
            role: 'assistant';
            annotations?: Array<unknown>;
            audio?: unknown;
            function_call?: {
                arguments: string;
                name: string;
            } | null;
            /**
             * A tool call in the assistant message
             */
            tool_calls?: Array<{
                id: string;
                type: 'function';
                /**
                 * Function call details
                 */
                function: {
                    arguments: string;
                    name: string;
                };
            } | {
                id: string;
                type: 'custom';
                /**
                 * Custom tool call details
                 */
                custom: {
                    input: string;
                    name: string;
                };
            }>;
        };
    }>;
    created: number;
    model: string;
    object: 'chat.completion';
    system_fingerprint?: string | null;
    /**
     * Token usage statistics for the completion
     */
    usage?: {
        completion_tokens: number;
        prompt_tokens: number;
        total_tokens: number;
        completion_tokens_details?: unknown;
        prompt_tokens_details?: unknown;
    };
};

export type ZhipuaiChatCompletionRequest = {
    model: string;
    /**
     * https://docs.z.ai/api-reference/llm/chat-completion#body
     */
    messages: Array<{
        role: 'system';
        content: string;
        name?: string;
    } | {
        role: 'user';
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://docs.z.ai/api-reference/llm/chat-completion#body
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        }>;
        name?: string;
    } | {
        role: 'assistant';
        content?: string | null;
        name?: string;
        tool_calls?: Array<{
            id: string;
            type: 'function';
            /**
             * https://docs.z.ai/api-reference/llm/chat-completion#response
             */
            function: {
                arguments: string;
                name: string;
            };
        }>;
        function_call?: {
            arguments: string;
            name: string;
        };
    } | {
        role: 'tool';
        content: string;
        tool_call_id: string;
    } | {
        role: 'function';
        content: string;
        name: string;
    }>;
    tools?: Array<{
        type: 'function';
        /**
         * https://docs.z.ai/api-reference/llm/chat-completion#body
         */
        function: {
            name: string;
            description?: string;
            /**
             *
             * https://docs.z.ai/api-reference/llm/chat-completion#body
             *
             * The parameters the functions accepts, described as a JSON Schema object. See the
             * [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
             * documentation about the format.
             *
             * Omitting parameters defines a function with an empty parameter list.
             *
             */
            parameters?: {
                [key: string]: unknown;
            };
            strict?: boolean | null;
        };
    }>;
    /**
     * https://docs.z.ai/api-reference/llm/chat-completion#body
     */
    tool_choice?: 'auto' | {
        type: 'function';
        function: {
            name: string;
        };
    };
    request_id?: string;
    do_sample?: boolean;
    stream?: boolean;
    thinking?: {
        type: 'enabled' | 'disabled';
        clear_thinking?: boolean;
    };
    temperature?: number | null;
    top_p?: number | null;
    max_tokens?: number | null;
    tool_stream?: boolean;
    stop?: Array<string>;
    response_format?: {
        type: 'text' | 'json_object';
    };
    user_id?: string;
};

export type ZhipuaiChatCompletionResponse = {
    id: string;
    request_id?: string;
    choices: Array<{
        finish_reason: 'stop' | 'length' | 'tool_calls' | 'sensitive' | 'network_error';
        index: number;
        logprobs: unknown;
        /**
         * https://docs.z.ai/api-reference/llm/chat-completion#response
         */
        message: {
            content: string | null;
            role: 'assistant';
            reasoning_content?: string;
            tool_calls?: Array<{
                id: string;
                type: 'function';
                /**
                 * https://docs.z.ai/api-reference/llm/chat-completion#response
                 */
                function: {
                    arguments: string;
                    name: string;
                };
            }>;
            function_call?: {
                arguments: string;
                name: string;
            } | null;
        };
    }>;
    created: number;
    model: string;
    object: 'chat.completion';
    system_fingerprint?: string | null;
    /**
     * https://docs.z.ai/api-reference/llm/chat-completion#response
     */
    usage?: {
        completion_tokens: number;
        prompt_tokens: number;
        total_tokens: number;
        /**
         * https://docs.z.ai/api-reference/llm/chat-completion#response
         */
        prompt_tokens_details?: {
            cached_tokens: number;
        };
    };
    /**
     * https://docs.z.ai/api-reference/llm/chat-completion#response
     */
    web_search?: Array<{
        title: string;
        content: string;
        link: string;
        media: string;
        icon: string;
        refer: string;
        publish_date: string;
    }>;
};

export type DeepSeekChatCompletionRequest = {
    model: string;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186
     */
    messages: Array<{
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'developer';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'system';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        } | {
            type: 'input_audio';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792
             */
            input_audio: {
                data: string;
                format: 'wav' | 'mp3';
            };
        } | {
            type: 'file';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732
             */
            file: {
                file_data?: string;
                file_id?: string;
                filename?: string;
            };
        }>;
        role: 'user';
        name?: string;
    } | {
        role: 'assistant';
        audio?: {
            id: string;
        } | null;
        content?: string | Array<{
            type: 'text';
            text: string;
        }> | Array<{
            type: 'refusal';
            refusal: string;
        }> | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
         */
        function_call?: {
            arguments: string;
            name: string;
        } | null;
        name?: string;
        refusal?: string | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197
         */
        tool_calls?: Array<{
            id: string;
            type: 'function';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
             */
            function: {
                arguments: string;
                name: string;
            };
        } | {
            id: string;
            type: 'custom';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
             */
            custom: {
                input: string;
                name: string;
            };
        }>;
    } | {
        role: 'tool';
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        }>;
        tool_call_id: string;
    } | {
        role: 'function';
        content: string | null;
        name: string;
    }>;
    /**
     *
     * A function tool that can be used to generate a response.
     *
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392
     *
     */
    tools?: Array<{
        type: 'function';
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
         */
        function: {
            name: string;
            description?: string;
            /**
             *
             * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
             *
             * The parameters the functions accepts, described as a JSON Schema object. See the
             * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
             * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
             * documentation about the format.
             *
             * Omitting parameters defines a function with an empty parameter list.
             *
             */
            parameters?: {
                [key: string]: unknown;
            };
            strict?: boolean | null;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    }>;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405
     */
    tool_choice?: 'none' | 'auto' | 'required' | {
        type: 'allowed_tools';
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455
         */
        allowed_tools: {
            /**
             *
             * Constrains the tools available to the model to a pre-defined set.
             *
             * auto allows the model to pick from among the allowed tools and generate a
             * message.
             *
             * required requires the model to call one or more of the allowed tools.
             *
             */
            mode: 'auto' | 'required';
            /**
             * A list of tool definitions that the model should be allowed to call
             */
            tools: Array<{
                [key: string]: {
                    type: 'function';
                    /**
                     * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
                     */
                    function: {
                        name: string;
                        description?: string;
                        /**
                         *
                         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
                         *
                         * The parameters the functions accepts, described as a JSON Schema object. See the
                         * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
                         * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
                         * documentation about the format.
                         *
                         * Omitting parameters defines a function with an empty parameter list.
                         *
                         */
                        parameters?: {
                            [key: string]: unknown;
                        };
                        strict?: boolean | null;
                    };
                };
            }>;
        };
    } | {
        type: 'function';
        function: {
            name: string;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    };
    temperature?: number | null;
    max_tokens?: number | null;
    stream?: boolean | null;
    [key: string]: unknown;
};

export type DeepSeekChatCompletionResponse = {
    id: string;
    choices: Array<{
        finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';
        index: number;
        logprobs: unknown;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000
         */
        message: {
            content: string | null;
            refusal?: string | null;
            role: 'assistant';
            annotations?: Array<unknown>;
            audio?: unknown;
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
             */
            function_call?: {
                arguments: string;
                name: string;
            } | null;
            tool_calls?: Array<{
                id: string;
                type: 'function';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
                 */
                function: {
                    arguments: string;
                    name: string;
                };
            } | {
                id: string;
                type: 'custom';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
                 */
                custom: {
                    input: string;
                    name: string;
                };
            }> | null;
        };
    }>;
    created: number;
    model: string;
    object: 'chat.completion';
    server_tier?: string;
    system_fingerprint?: string | null;
    /**
     * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113
     */
    usage?: {
        completion_tokens: number;
        prompt_tokens: number;
        total_tokens: number;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144
         */
        completion_tokens_details?: unknown;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173
         */
        prompt_tokens_details?: unknown;
    };
    [key: string]: unknown;
};

export type MinimaxChatCompletionRequest = {
    model: string;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186
     */
    messages: Array<{
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'developer';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'system';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        } | {
            type: 'input_audio';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792
             */
            input_audio: {
                data: string;
                format: 'wav' | 'mp3';
            };
        } | {
            type: 'file';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732
             */
            file: {
                file_data?: string;
                file_id?: string;
                filename?: string;
            };
        }>;
        role: 'user';
        name?: string;
    } | {
        role: 'assistant';
        audio?: {
            id: string;
        } | null;
        content?: string | Array<{
            type: 'text';
            text: string;
        }> | Array<{
            type: 'refusal';
            refusal: string;
        }> | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
         */
        function_call?: {
            arguments: string;
            name: string;
        } | null;
        name?: string;
        refusal?: string | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197
         */
        tool_calls?: Array<{
            id: string;
            type: 'function';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
             */
            function: {
                arguments: string;
                name: string;
            };
        } | {
            id: string;
            type: 'custom';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
             */
            custom: {
                input: string;
                name: string;
            };
        }>;
    } | {
        role: 'tool';
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        }>;
        tool_call_id: string;
    } | {
        role: 'function';
        content: string | null;
        name: string;
    }>;
    /**
     *
     * A function tool that can be used to generate a response.
     *
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392
     *
     */
    tools?: Array<{
        type: 'function';
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
         */
        function: {
            name: string;
            description?: string;
            /**
             *
             * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
             *
             * The parameters the functions accepts, described as a JSON Schema object. See the
             * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
             * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
             * documentation about the format.
             *
             * Omitting parameters defines a function with an empty parameter list.
             *
             */
            parameters?: {
                [key: string]: unknown;
            };
            strict?: boolean | null;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    }>;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405
     */
    tool_choice?: 'none' | 'auto' | 'required' | {
        type: 'allowed_tools';
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455
         */
        allowed_tools: {
            /**
             *
             * Constrains the tools available to the model to a pre-defined set.
             *
             * auto allows the model to pick from among the allowed tools and generate a
             * message.
             *
             * required requires the model to call one or more of the allowed tools.
             *
             */
            mode: 'auto' | 'required';
            /**
             * A list of tool definitions that the model should be allowed to call
             */
            tools: Array<{
                [key: string]: {
                    type: 'function';
                    /**
                     * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
                     */
                    function: {
                        name: string;
                        description?: string;
                        /**
                         *
                         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
                         *
                         * The parameters the functions accepts, described as a JSON Schema object. See the
                         * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
                         * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
                         * documentation about the format.
                         *
                         * Omitting parameters defines a function with an empty parameter list.
                         *
                         */
                        parameters?: {
                            [key: string]: unknown;
                        };
                        strict?: boolean | null;
                    };
                };
            }>;
        };
    } | {
        type: 'function';
        function: {
            name: string;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    };
    stream?: boolean;
    temperature?: number | null;
    top_p?: number | null;
    max_tokens?: number | null;
    n?: 1;
    stop?: string | Array<string>;
    response_format?: {
        type: 'text' | 'json_object';
    };
    user?: string;
    extra_body?: {
        reasoning_split?: boolean;
    };
};

export type MinimaxChatCompletionResponse = {
    id: string;
    choices: Array<{
        finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter';
        index: number;
        logprobs?: unknown;
        /**
         * https://platform.minimax.io/docs/api-reference/text-openai-api#response
         */
        message: {
            content: string | null;
            role: 'assistant';
            reasoning_details?: Array<{
                text: string;
            }>;
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197
             */
            tool_calls?: Array<{
                id: string;
                type: 'function';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
                 */
                function: {
                    arguments: string;
                    name: string;
                };
            } | {
                id: string;
                type: 'custom';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
                 */
                custom: {
                    input: string;
                    name: string;
                };
            }>;
        };
    }>;
    created: number;
    model: string;
    object: 'chat.completion';
    system_fingerprint?: string | null;
    /**
     * https://platform.minimax.io/docs/api-reference/text-openai-api#usage
     */
    usage?: {
        completion_tokens: number;
        prompt_tokens: number;
        total_tokens: number;
        completion_tokens_details?: {
            reasoning_tokens?: number;
        };
    };
};

export type XaiChatCompletionRequest = {
    model: string;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186
     */
    messages: Array<{
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'developer';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        }>;
        role: 'system';
        name?: string;
    } | {
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        } | {
            type: 'input_audio';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792
             */
            input_audio: {
                data: string;
                format: 'wav' | 'mp3';
            };
        } | {
            type: 'file';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732
             */
            file: {
                file_data?: string;
                file_id?: string;
                filename?: string;
            };
        }>;
        role: 'user';
        name?: string;
    } | {
        role: 'assistant';
        audio?: {
            id: string;
        } | null;
        content?: string | Array<{
            type: 'text';
            text: string;
        }> | Array<{
            type: 'refusal';
            refusal: string;
        }> | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
         */
        function_call?: {
            arguments: string;
            name: string;
        } | null;
        name?: string;
        refusal?: string | null;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197
         */
        tool_calls?: Array<{
            id: string;
            type: 'function';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
             */
            function: {
                arguments: string;
                name: string;
            };
        } | {
            id: string;
            type: 'custom';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
             */
            custom: {
                input: string;
                name: string;
            };
        }>;
    } | {
        role: 'tool';
        content: string | Array<{
            type: 'text';
            text: string;
        } | {
            type: 'image_url';
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765
             */
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        }>;
        tool_call_id: string;
    } | {
        role: 'function';
        content: string | null;
        name: string;
    }>;
    /**
     *
     * A function tool that can be used to generate a response.
     *
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392
     *
     */
    tools?: Array<{
        type: 'function';
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
         */
        function: {
            name: string;
            description?: string;
            /**
             *
             * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
             *
             * The parameters the functions accepts, described as a JSON Schema object. See the
             * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
             * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
             * documentation about the format.
             *
             * Omitting parameters defines a function with an empty parameter list.
             *
             */
            parameters?: {
                [key: string]: unknown;
            };
            strict?: boolean | null;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    }>;
    /**
     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405
     */
    tool_choice?: 'none' | 'auto' | 'required' | {
        type: 'allowed_tools';
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455
         */
        allowed_tools: {
            /**
             *
             * Constrains the tools available to the model to a pre-defined set.
             *
             * auto allows the model to pick from among the allowed tools and generate a
             * message.
             *
             * required requires the model to call one or more of the allowed tools.
             *
             */
            mode: 'auto' | 'required';
            /**
             * A list of tool definitions that the model should be allowed to call
             */
            tools: Array<{
                [key: string]: {
                    type: 'function';
                    /**
                     * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174
                     */
                    function: {
                        name: string;
                        description?: string;
                        /**
                         *
                         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
                         *
                         * The parameters the functions accepts, described as a JSON Schema object. See the
                         * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
                         * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
                         * documentation about the format.
                         *
                         * Omitting parameters defines a function with an empty parameter list.
                         *
                         */
                        parameters?: {
                            [key: string]: unknown;
                        };
                        strict?: boolean | null;
                    };
                };
            }>;
        };
    } | {
        type: 'function';
        function: {
            name: string;
        };
    } | {
        type: 'custom';
        custom: {
            /**
             * The name of the custom tool, used to identify it in tool calls
             */
            name: string;
            /**
             * Optional description of the custom tool, used to provide more context
             */
            description?: string;
            /**
             * The input format for the custom tool. Default is unconstrained text.
             */
            format?: {
                /**
                 * Unconstrained text format. Always `text`
                 */
                type: 'text';
            } | {
                type: 'grammar';
                /**
                 * Your chosen grammar
                 */
                grammar: {
                    /**
                     * The grammar definition
                     */
                    definition: string;
                    /**
                     * The syntax of the grammar definition
                     */
                    syntax: 'lark' | 'regex';
                };
            };
        };
    };
    temperature?: number | null;
    max_tokens?: number | null;
    stream?: boolean | null;
};

export type XaiChatCompletionResponse = {
    id: string;
    choices: Array<{
        finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';
        index: number;
        logprobs: unknown;
        /**
         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000
         */
        message: {
            content: string | null;
            refusal?: string | null;
            role: 'assistant';
            annotations?: Array<unknown>;
            audio?: unknown;
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
             */
            function_call?: {
                arguments: string;
                name: string;
            } | null;
            tool_calls?: Array<{
                id: string;
                type: 'function';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
                 */
                function: {
                    arguments: string;
                    name: string;
                };
            } | {
                id: string;
                type: 'custom';
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
                 */
                custom: {
                    input: string;
                    name: string;
                };
            }> | null;
        };
    }>;
    created: number;
    model: string;
    object: 'chat.completion';
    server_tier?: string;
    system_fingerprint?: string | null;
    /**
     * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113
     */
    usage?: {
        completion_tokens: number;
        prompt_tokens: number;
        total_tokens: number;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144
         */
        completion_tokens_details?: unknown;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173
         */
        prompt_tokens_details?: unknown;
    };
    [key: string]: unknown;
};

export type UserConfigFieldDefault = string | number | boolean | Array<string>;

export type UserConfigField = {
    type: 'string' | 'number' | 'boolean' | 'directory' | 'file';
    title: string;
    description: string;
    promptOnInstallation?: boolean;
    promptOnPreset?: boolean;
    required?: boolean;
    default?: UserConfigFieldDefault;
    multiple?: boolean;
    sensitive?: boolean;
    min?: number;
    max?: number;
    headerName?: string;
    valuePrefix?: string;
};

export type GetV1A2aByAgentIdWellKnownAgentJsonData = {
    body?: never;
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/a2a/{agentId}/.well-known/agent.json';
};

export type GetV1A2aByAgentIdWellKnownAgentJsonResponses = {
    /**
     * Default Response
     */
    200: {
        name: string;
        description: string;
        url: string;
        version: string;
        capabilities: {
            streaming: boolean;
            pushNotifications: boolean;
            stateTransitionHistory: boolean;
        };
        defaultInputModes: Array<string>;
        defaultOutputModes: Array<string>;
        skills: Array<{
            id: string;
            name: string;
            description: string;
            tags: Array<string>;
            inputModes: Array<string>;
            outputModes: Array<string>;
        }>;
    };
};

export type GetV1A2aByAgentIdWellKnownAgentJsonResponse = GetV1A2aByAgentIdWellKnownAgentJsonResponses[keyof GetV1A2aByAgentIdWellKnownAgentJsonResponses];

export type PostV1A2aByAgentIdData = {
    body: {
        jsonrpc: '2.0';
        id: string | number;
        method: string;
        params?: {
            message?: {
                parts?: Array<{
                    kind: 'text';
                    text: string;
                }>;
            };
        };
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/a2a/{agentId}';
};

export type PostV1A2aByAgentIdResponses = {
    /**
     * Default Response
     */
    200: {
        jsonrpc: '2.0';
        id: string | number;
        result?: {
            messageId: string;
            role: 'user' | 'agent';
            parts: Array<{
                kind: 'text';
                text: string;
            }>;
            contextId?: string;
            taskId?: string;
            metadata?: {
                [key: string]: unknown;
            };
        };
        error?: {
            code: number;
            message: string;
            data?: unknown;
        };
    };
};

export type PostV1A2aByAgentIdResponse = PostV1A2aByAgentIdResponses[keyof PostV1A2aByAgentIdResponses];

export type GetV2A2aByAgentIdWellKnownAgentCardJsonData = {
    body?: never;
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v2/a2a/{agentId}/.well-known/agent-card.json';
};

export type GetV2A2aByAgentIdWellKnownAgentCardJsonResponses = {
    /**
     * Default Response
     */
    200: {
        name: string;
        description: string;
        version: string;
        supportedInterfaces: Array<{
            url: string;
            protocolBinding: string;
            protocolVersion: string;
        }>;
        capabilities: {
            streaming: boolean;
            pushNotifications: boolean;
            stateTransitionHistory: boolean;
        };
        defaultInputModes: Array<string>;
        defaultOutputModes: Array<string>;
        skills: Array<{
            id: string;
            name: string;
            description: string;
            tags: Array<string>;
            inputModes: Array<string>;
            outputModes: Array<string>;
        }>;
    };
};

export type GetV2A2aByAgentIdWellKnownAgentCardJsonResponse = GetV2A2aByAgentIdWellKnownAgentCardJsonResponses[keyof GetV2A2aByAgentIdWellKnownAgentCardJsonResponses];

export type PostV2A2aByAgentIdData = {
    body: {
        jsonrpc: '2.0';
        id: string | number;
        method: string;
        params?: unknown;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v2/a2a/{agentId}';
};

export type PostV2A2aByAgentIdResponses = {
    /**
     * Default Response
     */
    200: {
        jsonrpc: '2.0';
        id: string | number;
        result?: unknown;
        error?: {
            code: number;
            message: string;
            data?: unknown;
        };
    };
};

export type PostV2A2aByAgentIdResponse = PostV2A2aByAgentIdResponses[keyof PostV2A2aByAgentIdResponses];

export type GetAgentsData = {
    body?: never;
    path?: never;
    query?: {
        /**
         * Filter by agent name
         */
        name?: string;
        /**
         * Filter by agent type. 'profile' = external API gateway profiles, 'mcp_gateway' = MCP gateway, 'llm_proxy' = LLM proxy, 'agent' = internal agents with prompts.
         */
        agentType?: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
        /**
         * Filter by multiple agent types (comma-separated). Takes precedence over agentType if both provided.
         */
        agentTypes?: Array<'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent'>;
        /**
         * Filter by scope: personal, team, org, or built_in.
         */
        scope?: 'personal' | 'team' | 'org' | 'built_in';
        /**
         * Filter by specific team IDs (comma-separated). Only used when scope=team.
         */
        teamIds?: Array<string>;
        /**
         * Filter by author user IDs (comma-separated). Admin-only, only used when scope=personal.
         */
        authorIds?: Array<string>;
        /**
         * Exclude agents by author user IDs (comma-separated). Admin-only, only used when scope=personal.
         */
        excludeAuthorIds?: Array<string>;
        /**
         * Filter by labels. Format: key1:val1|val2;key2:val3. AND across keys, OR within values.
         */
        labels?: string;
        /**
         * Hide personal agents owned by other users. Admin-only; no-op for non-admins.
         */
        excludeOtherPersonalAgents?: boolean;
        limit?: number;
        offset?: number;
        sortBy?: 'name' | 'createdAt' | 'toolsCount' | 'subagentsCount' | 'knowledgeSourcesCount' | 'team';
        sortDirection?: 'asc' | 'desc';
    };
    url: '/api/agents';
};

export type GetAgentsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetAgentsError = GetAgentsErrors[keyof GetAgentsErrors];

export type GetAgentsResponses = {
    /**
     * Default Response
     */
    200: {
        data: Array<{
            id: string;
            organizationId: string;
            authorId: string | null;
            scope: 'personal' | 'team' | 'org';
            name: string;
            slug: string | null;
            isDefault: boolean;
            isPersonalGateway: boolean;
            considerContextUntrusted: boolean;
            agentType: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
            systemPrompt: string | null;
            description: string | null;
            icon: string | null;
            incomingEmailEnabled: boolean;
            incomingEmailSecurityMode: 'private' | 'internal' | 'public';
            incomingEmailAllowedDomain: string | null;
            llmApiKeyId: string | null;
            llmModel: string | null;
            modelId: string | null;
            identityProviderId: string | null;
            passthroughHeaders: Array<string> | null;
            toolExposureMode: 'full' | 'search_and_run_only';
            toolAssignmentMode: 'automatic' | 'manual';
            builtInAgentConfig: {
                name: 'policy-configuration-subagent';
                autoConfigureOnToolDiscovery: boolean;
            } | {
                name: 'dual-llm-main-agent';
                maxRounds: number;
            } | {
                name: 'dual-llm-quarantine-agent';
            } | {
                name: 'context-compaction-subagent';
            } | null;
            builtIn: boolean | null;
            createdAt: string;
            updatedAt: string;
            tools: Array<{
                id: string;
                agentId: string | null;
                catalogId: string | null;
                delegateToAgentId: string | null;
                name: string;
                /**
                 *
                 * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
                 *
                 * The parameters the functions accepts, described as a JSON Schema object. See the
                 * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
                 * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
                 * documentation about the format.
                 *
                 * Omitting parameters defines a function with an empty parameter list.
                 *
                 */
                parameters?: {
                    [key: string]: unknown;
                };
                description: string | null;
                meta: string | number | boolean | null | {
                    [key: string]: unknown;
                } | Array<unknown> | null;
                policiesAutoConfiguredAt: string | null;
                policiesAutoConfiguringStartedAt: string | null;
                policiesAutoConfiguredReasoning: string | null;
                policiesAutoConfiguredModel: string | null;
                createdAt: string;
                updatedAt: string;
            }>;
            teams: Array<{
                id: string;
                name: string;
            }>;
            labels: Array<{
                key: string;
                value: string;
                keyId?: string;
                valueId?: string;
            }>;
            authorName?: string | null;
            knowledgeBaseIds: Array<string>;
            connectorIds: Array<string>;
            suggestedPrompts: Array<{
                summaryTitle: string;
                prompt: string;
            }>;
        }>;
        pagination: {
            currentPage: number;
            limit: number;
            total: number;
            totalPages: number;
            hasNext: boolean;
            hasPrev: boolean;
        };
    };
};

export type GetAgentsResponse = GetAgentsResponses[keyof GetAgentsResponses];

export type CreateAgentData = {
    body: {
        organizationId?: string;
        scope: 'personal' | 'team' | 'org';
        name: string;
        isDefault?: boolean;
        considerContextUntrusted?: boolean;
        agentType?: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
        systemPrompt?: string | null;
        description?: string | null;
        icon?: string | null;
        incomingEmailEnabled?: boolean;
        incomingEmailSecurityMode?: 'private' | 'internal' | 'public';
        incomingEmailAllowedDomain?: string | null;
        llmApiKeyId?: string | null;
        llmModel?: string | null;
        modelId?: string | null;
        identityProviderId?: string | null;
        passthroughHeaders?: Array<string> | null;
        toolExposureMode?: 'full' | 'search_and_run_only';
        toolAssignmentMode?: 'automatic' | 'manual';
        builtInAgentConfig?: {
            name: 'policy-configuration-subagent';
            autoConfigureOnToolDiscovery: boolean;
        } | {
            name: 'dual-llm-main-agent';
            maxRounds: number;
        } | {
            name: 'dual-llm-quarantine-agent';
        } | {
            name: 'context-compaction-subagent';
        } | null;
        teams?: Array<string>;
        labels?: Array<{
            key: string;
            value: string;
            keyId?: string;
            valueId?: string;
        }>;
        knowledgeBaseIds?: Array<string>;
        connectorIds?: Array<string>;
        suggestedPrompts?: Array<{
            summaryTitle: string;
            prompt: string;
        }>;
    };
    path?: never;
    query?: never;
    url: '/api/agents';
};

export type CreateAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CreateAgentError = CreateAgentErrors[keyof CreateAgentErrors];

export type CreateAgentResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        authorId: string | null;
        scope: 'personal' | 'team' | 'org';
        name: string;
        slug: string | null;
        isDefault: boolean;
        isPersonalGateway: boolean;
        considerContextUntrusted: boolean;
        agentType: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
        systemPrompt: string | null;
        description: string | null;
        icon: string | null;
        incomingEmailEnabled: boolean;
        incomingEmailSecurityMode: 'private' | 'internal' | 'public';
        incomingEmailAllowedDomain: string | null;
        llmApiKeyId: string | null;
        llmModel: string | null;
        modelId: string | null;
        identityProviderId: string | null;
        passthroughHeaders: Array<string> | null;
        toolExposureMode: 'full' | 'search_and_run_only';
        toolAssignmentMode: 'automatic' | 'manual';
        builtInAgentConfig: {
            name: 'policy-configuration-subagent';
            autoConfigureOnToolDiscovery: boolean;
        } | {
            name: 'dual-llm-main-agent';
            maxRounds: number;
        } | {
            name: 'dual-llm-quarantine-agent';
        } | {
            name: 'context-compaction-subagent';
        } | null;
        builtIn: boolean | null;
        createdAt: string;
        updatedAt: string;
        tools: Array<{
            id: string;
            agentId: string | null;
            catalogId: string | null;
            delegateToAgentId: string | null;
            name: string;
            /**
             *
             * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
             *
             * The parameters the functions accepts, described as a JSON Schema object. See the
             * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
             * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
             * documentation about the format.
             *
             * Omitting parameters defines a function with an empty parameter list.
             *
             */
            parameters?: {
                [key: string]: unknown;
            };
            description: string | null;
            meta: string | number | boolean | null | {
                [key: string]: unknown;
            } | Array<unknown> | null;
            policiesAutoConfiguredAt: string | null;
            policiesAutoConfiguringStartedAt: string | null;
            policiesAutoConfiguredReasoning: string | null;
            policiesAutoConfiguredModel: string | null;
            createdAt: string;
            updatedAt: string;
        }>;
        teams: Array<{
            id: string;
            name: string;
        }>;
        labels: Array<{
            key: string;
            value: string;
            keyId?: string;
            valueId?: string;
        }>;
        authorName?: string | null;
        knowledgeBaseIds: Array<string>;
        connectorIds: Array<string>;
        suggestedPrompts: Array<{
            summaryTitle: string;
            prompt: string;
        }>;
    };
};

export type CreateAgentResponse = CreateAgentResponses[keyof CreateAgentResponses];

export type GetAllAgentsData = {
    body?: never;
    path?: never;
    query?: {
        /**
         * Filter by agent type. 'profile' = external API gateway profiles, 'mcp_gateway' = MCP gateway, 'llm_proxy' = LLM proxy, 'agent' = internal agents with prompts.
         */
        agentType?: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
        /**
         * Filter by multiple agent types (comma-separated). Takes precedence over agentType if both provided.
         */
        agentTypes?: Array<'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent'>;
        /**
         * Exclude built-in agents from the results. Defaults to false.
         */
        excludeBuiltIn?: boolean;
        /**
         * Filter by scope: personal, team, org, or built_in.
         */
        scope?: 'personal' | 'team' | 'org' | 'built_in';
        /**
         * Hide personal agents owned by other users. Admin-only; no-op for non-admins (their access control already excludes them).
         */
        excludeOtherPersonalAgents?: boolean;
    };
    url: '/api/agents/all';
};

export type GetAllAgentsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetAllAgentsError = GetAllAgentsErrors[keyof GetAllAgentsErrors];

export type GetAllAgentsResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        organizationId: string;
        authorId: string | null;
        scope: 'personal' | 'team' | 'org';
        name: string;
        slug: string | null;
        isDefault: boolean;
        isPersonalGateway: boolean;
        considerContextUntrusted: boolean;
        agentType: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
        systemPrompt: string | null;
        description: string | null;
        icon: string | null;
        incomingEmailEnabled: boolean;
        incomingEmailSecurityMode: 'private' | 'internal' | 'public';
        incomingEmailAllowedDomain: string | null;
        llmApiKeyId: string | null;
        llmModel: string | null;
        modelId: string | null;
        identityProviderId: string | null;
        passthroughHeaders: Array<string> | null;
        toolExposureMode: 'full' | 'search_and_run_only';
        toolAssignmentMode: 'automatic' | 'manual';
        builtInAgentConfig: {
            name: 'policy-configuration-subagent';
            autoConfigureOnToolDiscovery: boolean;
        } | {
            name: 'dual-llm-main-agent';
            maxRounds: number;
        } | {
            name: 'dual-llm-quarantine-agent';
        } | {
            name: 'context-compaction-subagent';
        } | null;
        builtIn: boolean | null;
        createdAt: string;
        updatedAt: string;
        tools: Array<{
            id: string;
            agentId: string | null;
            catalogId: string | null;
            delegateToAgentId: string | null;
            name: string;
            /**
             *
             * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
             *
             * The parameters the functions accepts, described as a JSON Schema object. See the
             * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
             * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
             * documentation about the format.
             *
             * Omitting parameters defines a function with an empty parameter list.
             *
             */
            parameters?: {
                [key: string]: unknown;
            };
            description: string | null;
            meta: string | number | boolean | null | {
                [key: string]: unknown;
            } | Array<unknown> | null;
            policiesAutoConfiguredAt: string | null;
            policiesAutoConfiguringStartedAt: string | null;
            policiesAutoConfiguredReasoning: string | null;
            policiesAutoConfiguredModel: string | null;
            createdAt: string;
            updatedAt: string;
        }>;
        teams: Array<{
            id: string;
            name: string;
        }>;
        labels: Array<{
            key: string;
            value: string;
            keyId?: string;
            valueId?: string;
        }>;
        authorName?: string | null;
        knowledgeBaseIds: Array<string>;
        connectorIds: Array<string>;
        suggestedPrompts: Array<{
            summaryTitle: string;
            prompt: string;
        }>;
    }>;
};

export type GetAllAgentsResponse = GetAllAgentsResponses[keyof GetAllAgentsResponses];

export type GetDefaultMcpGatewayData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/mcp-gateways/default';
};

export type GetDefaultMcpGatewayErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetDefaultMcpGatewayError = GetDefaultMcpGatewayErrors[keyof GetDefaultMcpGatewayErrors];

export type GetDefaultMcpGatewayResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        authorId: string | null;
        scope: 'personal' | 'team' | 'org';
        name: string;
        slug: string | null;
        isDefault: boolean;
        isPersonalGateway: boolean;
        considerContextUntrusted: boolean;
        agentType: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
        systemPrompt: string | null;
        description: string | null;
        icon: string | null;
        incomingEmailEnabled: boolean;
        incomingEmailSecurityMode: 'private' | 'internal' | 'public';
        incomingEmailAllowedDomain: string | null;
        llmApiKeyId: string | null;
        llmModel: string | null;
        modelId: string | null;
        identityProviderId: string | null;
        passthroughHeaders: Array<string> | null;
        toolExposureMode: 'full' | 'search_and_run_only';
        toolAssignmentMode: 'automatic' | 'manual';
        builtInAgentConfig: {
            name: 'policy-configuration-subagent';
            autoConfigureOnToolDiscovery: boolean;
        } | {
            name: 'dual-llm-main-agent';
            maxRounds: number;
        } | {
            name: 'dual-llm-quarantine-agent';
        } | {
            name: 'context-compaction-subagent';
        } | null;
        builtIn: boolean | null;
        createdAt: string;
        updatedAt: string;
        tools: Array<{
            id: string;
            agentId: string | null;
            catalogId: string | null;
            delegateToAgentId: string | null;
            name: string;
            /**
             *
             * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
             *
             * The parameters the functions accepts, described as a JSON Schema object. See the
             * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
             * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
             * documentation about the format.
             *
             * Omitting parameters defines a function with an empty parameter list.
             *
             */
            parameters?: {
                [key: string]: unknown;
            };
            description: string | null;
            meta: string | number | boolean | null | {
                [key: string]: unknown;
            } | Array<unknown> | null;
            policiesAutoConfiguredAt: string | null;
            policiesAutoConfiguringStartedAt: string | null;
            policiesAutoConfiguredReasoning: string | null;
            policiesAutoConfiguredModel: string | null;
            createdAt: string;
            updatedAt: string;
        }>;
        teams: Array<{
            id: string;
            name: string;
        }>;
        labels: Array<{
            key: string;
            value: string;
            keyId?: string;
            valueId?: string;
        }>;
        authorName?: string | null;
        knowledgeBaseIds: Array<string>;
        connectorIds: Array<string>;
        suggestedPrompts: Array<{
            summaryTitle: string;
            prompt: string;
        }>;
    };
};

export type GetDefaultMcpGatewayResponse = GetDefaultMcpGatewayResponses[keyof GetDefaultMcpGatewayResponses];

export type GetDefaultLlmProxyData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/llm-proxy/default';
};

export type GetDefaultLlmProxyErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetDefaultLlmProxyError = GetDefaultLlmProxyErrors[keyof GetDefaultLlmProxyErrors];

export type GetDefaultLlmProxyResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        authorId: string | null;
        scope: 'personal' | 'team' | 'org';
        name: string;
        slug: string | null;
        isDefault: boolean;
        isPersonalGateway: boolean;
        considerContextUntrusted: boolean;
        agentType: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
        systemPrompt: string | null;
        description: string | null;
        icon: string | null;
        incomingEmailEnabled: boolean;
        incomingEmailSecurityMode: 'private' | 'internal' | 'public';
        incomingEmailAllowedDomain: string | null;
        llmApiKeyId: string | null;
        llmModel: string | null;
        modelId: string | null;
        identityProviderId: string | null;
        passthroughHeaders: Array<string> | null;
        toolExposureMode: 'full' | 'search_and_run_only';
        toolAssignmentMode: 'automatic' | 'manual';
        builtInAgentConfig: {
            name: 'policy-configuration-subagent';
            autoConfigureOnToolDiscovery: boolean;
        } | {
            name: 'dual-llm-main-agent';
            maxRounds: number;
        } | {
            name: 'dual-llm-quarantine-agent';
        } | {
            name: 'context-compaction-subagent';
        } | null;
        builtIn: boolean | null;
        createdAt: string;
        updatedAt: string;
        tools: Array<{
            id: string;
            agentId: string | null;
            catalogId: string | null;
            delegateToAgentId: string | null;
            name: string;
            /**
             *
             * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
             *
             * The parameters the functions accepts, described as a JSON Schema object. See the
             * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
             * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
             * documentation about the format.
             *
             * Omitting parameters defines a function with an empty parameter list.
             *
             */
            parameters?: {
                [key: string]: unknown;
            };
            description: string | null;
            meta: string | number | boolean | null | {
                [key: string]: unknown;
            } | Array<unknown> | null;
            policiesAutoConfiguredAt: string | null;
            policiesAutoConfiguringStartedAt: string | null;
            policiesAutoConfiguredReasoning: string | null;
            policiesAutoConfiguredModel: string | null;
            createdAt: string;
            updatedAt: string;
        }>;
        teams: Array<{
            id: string;
            name: string;
        }>;
        labels: Array<{
            key: string;
            value: string;
            keyId?: string;
            valueId?: string;
        }>;
        authorName?: string | null;
        knowledgeBaseIds: Array<string>;
        connectorIds: Array<string>;
        suggestedPrompts: Array<{
            summaryTitle: string;
            prompt: string;
        }>;
    };
};

export type GetDefaultLlmProxyResponse = GetDefaultLlmProxyResponses[keyof GetDefaultLlmProxyResponses];

export type ImportAgentData = {
    body: {
        /**
         * Schema version for forward compatibility
         */
        version: '1';
        /**
         * ISO 8601 timestamp
         */
        exportedAt: string;
        /**
         * Informational: hostname of the source instance
         */
        sourceInstance?: string | null;
        agent: {
            name: string;
            /**
             * Only internal agents are exportable
             */
            agentType: 'agent';
            description: string | null;
            systemPrompt: string | null;
            icon: string | null;
            /**
             * Original scope; imports always default to personal
             */
            scope: 'personal' | 'team' | 'org';
            considerContextUntrusted: boolean;
            toolAssignmentMode: 'automatic' | 'manual';
            toolExposureMode: 'full' | 'search_and_run_only';
            incomingEmailEnabled: boolean;
            incomingEmailSecurityMode: 'private' | 'internal' | 'public';
            incomingEmailAllowedDomain: string | null;
            passthroughHeaders?: Array<string> | null;
        };
        labels: Array<{
            key: string;
            value: string;
        }>;
        suggestedPrompts: Array<{
            summaryTitle: string;
            prompt: string;
        }>;
        tools: Array<{
            /**
             * Tool name as registered in the MCP catalog
             */
            toolName: string;
            /**
             * MCP catalog item name (null for proxy-sniffed tools)
             */
            catalogName: string | null;
            /**
             * How credentials are resolved for this tool assignment
             */
            credentialResolutionMode?: 'static' | 'dynamic' | 'enterprise_managed';
        }>;
        delegations: Array<{
            /**
             * Name of the target agent for delegation
             */
            targetAgentName: string;
        }>;
        knowledgeBases: Array<{
            /**
             * Knowledge base name
             */
            name: string;
        }>;
        connectors: Array<{
            /**
             * Connector name
             */
            name: string;
            /**
             * Connector type (e.g. confluence, github)
             */
            connectorType: 'jira' | 'confluence' | 'github' | 'gitlab' | 'servicenow' | 'notion' | 'sharepoint' | 'gdrive' | 'file_upload' | 'dropbox' | 'onedrive' | 'asana' | 'linear' | 'outline' | 'salesforce';
        }>;
    };
    path?: never;
    query?: never;
    url: '/api/agents/import';
};

export type ImportAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type ImportAgentError = ImportAgentErrors[keyof ImportAgentErrors];

export type ImportAgentResponses = {
    /**
     * Default Response
     */
    200: {
        agent: {
            id: string;
            organizationId: string;
            authorId: string | null;
            scope: 'personal' | 'team' | 'org';
            name: string;
            slug: string | null;
            isDefault: boolean;
            isPersonalGateway: boolean;
            considerContextUntrusted: boolean;
            agentType: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
            systemPrompt: string | null;
            description: string | null;
            icon: string | null;
            incomingEmailEnabled: boolean;
            incomingEmailSecurityMode: 'private' | 'internal' | 'public';
            incomingEmailAllowedDomain: string | null;
            llmApiKeyId: string | null;
            llmModel: string | null;
            modelId: string | null;
            identityProviderId: string | null;
            passthroughHeaders: Array<string> | null;
            toolExposureMode: 'full' | 'search_and_run_only';
            toolAssignmentMode: 'automatic' | 'manual';
            builtInAgentConfig: {
                name: 'policy-configuration-subagent';
                autoConfigureOnToolDiscovery: boolean;
            } | {
                name: 'dual-llm-main-agent';
                maxRounds: number;
            } | {
                name: 'dual-llm-quarantine-agent';
            } | {
                name: 'context-compaction-subagent';
            } | null;
            builtIn: boolean | null;
            createdAt: string;
            updatedAt: string;
            tools: Array<{
                id: string;
                agentId: string | null;
                catalogId: string | null;
                delegateToAgentId: string | null;
                name: string;
                /**
                 *
                 * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
                 *
                 * The parameters the functions accepts, described as a JSON Schema object. See the
                 * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
                 * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
                 * documentation about the format.
                 *
                 * Omitting parameters defines a function with an empty parameter list.
                 *
                 */
                parameters?: {
                    [key: string]: unknown;
                };
                description: string | null;
                meta: string | number | boolean | null | {
                    [key: string]: unknown;
                } | Array<unknown> | null;
                policiesAutoConfiguredAt: string | null;
                policiesAutoConfiguringStartedAt: string | null;
                policiesAutoConfiguredReasoning: string | null;
                policiesAutoConfiguredModel: string | null;
                createdAt: string;
                updatedAt: string;
            }>;
            teams: Array<{
                id: string;
                name: string;
            }>;
            labels: Array<{
                key: string;
                value: string;
                keyId?: string;
                valueId?: string;
            }>;
            authorName?: string | null;
            knowledgeBaseIds: Array<string>;
            connectorIds: Array<string>;
            suggestedPrompts: Array<{
                summaryTitle: string;
                prompt: string;
            }>;
        };
        warnings: Array<{
            type: 'tool' | 'knowledgeBase' | 'connector' | 'delegation';
            name: string;
            message: string;
        }>;
    };
};

export type ImportAgentResponse = ImportAgentResponses[keyof ImportAgentResponses];

export type DeleteAgentData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/agents/{id}';
};

export type DeleteAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeleteAgentError = DeleteAgentErrors[keyof DeleteAgentErrors];

export type DeleteAgentResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type DeleteAgentResponse = DeleteAgentResponses[keyof DeleteAgentResponses];

export type GetAgentData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/agents/{id}';
};

export type GetAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetAgentError = GetAgentErrors[keyof GetAgentErrors];

export type GetAgentResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        authorId: string | null;
        scope: 'personal' | 'team' | 'org';
        name: string;
        slug: string | null;
        isDefault: boolean;
        isPersonalGateway: boolean;
        considerContextUntrusted: boolean;
        agentType: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
        systemPrompt: string | null;
        description: string | null;
        icon: string | null;
        incomingEmailEnabled: boolean;
        incomingEmailSecurityMode: 'private' | 'internal' | 'public';
        incomingEmailAllowedDomain: string | null;
        llmApiKeyId: string | null;
        llmModel: string | null;
        modelId: string | null;
        identityProviderId: string | null;
        passthroughHeaders: Array<string> | null;
        toolExposureMode: 'full' | 'search_and_run_only';
        toolAssignmentMode: 'automatic' | 'manual';
        builtInAgentConfig: {
            name: 'policy-configuration-subagent';
            autoConfigureOnToolDiscovery: boolean;
        } | {
            name: 'dual-llm-main-agent';
            maxRounds: number;
        } | {
            name: 'dual-llm-quarantine-agent';
        } | {
            name: 'context-compaction-subagent';
        } | null;
        builtIn: boolean | null;
        createdAt: string;
        updatedAt: string;
        tools: Array<{
            id: string;
            agentId: string | null;
            catalogId: string | null;
            delegateToAgentId: string | null;
            name: string;
            /**
             *
             * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
             *
             * The parameters the functions accepts, described as a JSON Schema object. See the
             * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
             * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
             * documentation about the format.
             *
             * Omitting parameters defines a function with an empty parameter list.
             *
             */
            parameters?: {
                [key: string]: unknown;
            };
            description: string | null;
            meta: string | number | boolean | null | {
                [key: string]: unknown;
            } | Array<unknown> | null;
            policiesAutoConfiguredAt: string | null;
            policiesAutoConfiguringStartedAt: string | null;
            policiesAutoConfiguredReasoning: string | null;
            policiesAutoConfiguredModel: string | null;
            createdAt: string;
            updatedAt: string;
        }>;
        teams: Array<{
            id: string;
            name: string;
        }>;
        labels: Array<{
            key: string;
            value: string;
            keyId?: string;
            valueId?: string;
        }>;
        authorName?: string | null;
        knowledgeBaseIds: Array<string>;
        connectorIds: Array<string>;
        suggestedPrompts: Array<{
            summaryTitle: string;
            prompt: string;
        }>;
    };
};

export type GetAgentResponse = GetAgentResponses[keyof GetAgentResponses];

export type UpdateAgentData = {
    body: {
        organizationId?: string;
        scope?: 'personal' | 'team' | 'org';
        name?: string;
        isDefault?: boolean;
        considerContextUntrusted?: boolean;
        agentType?: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
        systemPrompt?: string | null;
        description?: string | null;
        icon?: string | null;
        incomingEmailEnabled?: boolean;
        incomingEmailSecurityMode?: 'private' | 'internal' | 'public';
        incomingEmailAllowedDomain?: string | null;
        llmApiKeyId?: string | null;
        llmModel?: string | null;
        modelId?: string | null;
        identityProviderId?: string | null;
        passthroughHeaders?: Array<string> | null;
        toolExposureMode?: 'full' | 'search_and_run_only';
        toolAssignmentMode?: 'automatic' | 'manual';
        builtInAgentConfig?: {
            name: 'policy-configuration-subagent';
            autoConfigureOnToolDiscovery: boolean;
        } | {
            name: 'dual-llm-main-agent';
            maxRounds: number;
        } | {
            name: 'dual-llm-quarantine-agent';
        } | {
            name: 'context-compaction-subagent';
        } | null;
        teams?: Array<string>;
        labels?: Array<{
            key: string;
            value: string;
            keyId?: string;
            valueId?: string;
        }>;
        knowledgeBaseIds?: Array<string>;
        connectorIds?: Array<string>;
        suggestedPrompts?: Array<{
            summaryTitle: string;
            prompt: string;
        }>;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/agents/{id}';
};

export type UpdateAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateAgentError = UpdateAgentErrors[keyof UpdateAgentErrors];

export type UpdateAgentResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        authorId: string | null;
        scope: 'personal' | 'team' | 'org';
        name: string;
        slug: string | null;
        isDefault: boolean;
        isPersonalGateway: boolean;
        considerContextUntrusted: boolean;
        agentType: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
        systemPrompt: string | null;
        description: string | null;
        icon: string | null;
        incomingEmailEnabled: boolean;
        incomingEmailSecurityMode: 'private' | 'internal' | 'public';
        incomingEmailAllowedDomain: string | null;
        llmApiKeyId: string | null;
        llmModel: string | null;
        modelId: string | null;
        identityProviderId: string | null;
        passthroughHeaders: Array<string> | null;
        toolExposureMode: 'full' | 'search_and_run_only';
        toolAssignmentMode: 'automatic' | 'manual';
        builtInAgentConfig: {
            name: 'policy-configuration-subagent';
            autoConfigureOnToolDiscovery: boolean;
        } | {
            name: 'dual-llm-main-agent';
            maxRounds: number;
        } | {
            name: 'dual-llm-quarantine-agent';
        } | {
            name: 'context-compaction-subagent';
        } | null;
        builtIn: boolean | null;
        createdAt: string;
        updatedAt: string;
        tools: Array<{
            id: string;
            agentId: string | null;
            catalogId: string | null;
            delegateToAgentId: string | null;
            name: string;
            /**
             *
             * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
             *
             * The parameters the functions accepts, described as a JSON Schema object. See the
             * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
             * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
             * documentation about the format.
             *
             * Omitting parameters defines a function with an empty parameter list.
             *
             */
            parameters?: {
                [key: string]: unknown;
            };
            description: string | null;
            meta: string | number | boolean | null | {
                [key: string]: unknown;
            } | Array<unknown> | null;
            policiesAutoConfiguredAt: string | null;
            policiesAutoConfiguringStartedAt: string | null;
            policiesAutoConfiguredReasoning: string | null;
            policiesAutoConfiguredModel: string | null;
            createdAt: string;
            updatedAt: string;
        }>;
        teams: Array<{
            id: string;
            name: string;
        }>;
        labels: Array<{
            key: string;
            value: string;
            keyId?: string;
            valueId?: string;
        }>;
        authorName?: string | null;
        knowledgeBaseIds: Array<string>;
        connectorIds: Array<string>;
        suggestedPrompts: Array<{
            summaryTitle: string;
            prompt: string;
        }>;
    };
};

export type UpdateAgentResponse = UpdateAgentResponses[keyof UpdateAgentResponses];

export type CloneAgentData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/agents/{id}/clone';
};

export type CloneAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CloneAgentError = CloneAgentErrors[keyof CloneAgentErrors];

export type CloneAgentResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        authorId: string | null;
        scope: 'personal' | 'team' | 'org';
        name: string;
        slug: string | null;
        isDefault: boolean;
        isPersonalGateway: boolean;
        considerContextUntrusted: boolean;
        agentType: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
        systemPrompt: string | null;
        description: string | null;
        icon: string | null;
        incomingEmailEnabled: boolean;
        incomingEmailSecurityMode: 'private' | 'internal' | 'public';
        incomingEmailAllowedDomain: string | null;
        llmApiKeyId: string | null;
        llmModel: string | null;
        modelId: string | null;
        identityProviderId: string | null;
        passthroughHeaders: Array<string> | null;
        toolExposureMode: 'full' | 'search_and_run_only';
        toolAssignmentMode: 'automatic' | 'manual';
        builtInAgentConfig: {
            name: 'policy-configuration-subagent';
            autoConfigureOnToolDiscovery: boolean;
        } | {
            name: 'dual-llm-main-agent';
            maxRounds: number;
        } | {
            name: 'dual-llm-quarantine-agent';
        } | {
            name: 'context-compaction-subagent';
        } | null;
        builtIn: boolean | null;
        createdAt: string;
        updatedAt: string;
        tools: Array<{
            id: string;
            agentId: string | null;
            catalogId: string | null;
            delegateToAgentId: string | null;
            name: string;
            /**
             *
             * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
             *
             * The parameters the functions accepts, described as a JSON Schema object. See the
             * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
             * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
             * documentation about the format.
             *
             * Omitting parameters defines a function with an empty parameter list.
             *
             */
            parameters?: {
                [key: string]: unknown;
            };
            description: string | null;
            meta: string | number | boolean | null | {
                [key: string]: unknown;
            } | Array<unknown> | null;
            policiesAutoConfiguredAt: string | null;
            policiesAutoConfiguringStartedAt: string | null;
            policiesAutoConfiguredReasoning: string | null;
            policiesAutoConfiguredModel: string | null;
            createdAt: string;
            updatedAt: string;
        }>;
        teams: Array<{
            id: string;
            name: string;
        }>;
        labels: Array<{
            key: string;
            value: string;
            keyId?: string;
            valueId?: string;
        }>;
        authorName?: string | null;
        knowledgeBaseIds: Array<string>;
        connectorIds: Array<string>;
        suggestedPrompts: Array<{
            summaryTitle: string;
            prompt: string;
        }>;
    };
};

export type CloneAgentResponse = CloneAgentResponses[keyof CloneAgentResponses];

export type ExportAgentData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/agents/{id}/export';
};

export type ExportAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type ExportAgentError = ExportAgentErrors[keyof ExportAgentErrors];

export type ExportAgentResponses = {
    /**
     * Default Response
     */
    200: {
        /**
         * Schema version for forward compatibility
         */
        version: '1';
        /**
         * ISO 8601 timestamp
         */
        exportedAt: string;
        /**
         * Informational: hostname of the source instance
         */
        sourceInstance?: string | null;
        agent: {
            name: string;
            /**
             * Only internal agents are exportable
             */
            agentType: 'agent';
            description: string | null;
            systemPrompt: string | null;
            icon: string | null;
            /**
             * Original scope; imports always default to personal
             */
            scope: 'personal' | 'team' | 'org';
            considerContextUntrusted: boolean;
            toolAssignmentMode: 'automatic' | 'manual';
            toolExposureMode: 'full' | 'search_and_run_only';
            incomingEmailEnabled: boolean;
            incomingEmailSecurityMode: 'private' | 'internal' | 'public';
            incomingEmailAllowedDomain: string | null;
            passthroughHeaders?: Array<unknown> | null;
        };
        labels: Array<{
            key: string;
            value: string;
        }>;
        suggestedPrompts: Array<{
            summaryTitle: string;
            prompt: string;
        }>;
        tools: Array<{
            /**
             * Tool name as registered in the MCP catalog
             */
            toolName: string;
            /**
             * MCP catalog item name (null for proxy-sniffed tools)
             */
            catalogName: string | null;
            /**
             * How credentials are resolved for this tool assignment
             */
            credentialResolutionMode?: 'static' | 'dynamic' | 'enterprise_managed';
        }>;
        delegations: Array<{
            /**
             * Name of the target agent for delegation
             */
            targetAgentName: string;
        }>;
        knowledgeBases: Array<{
            /**
             * Knowledge base name
             */
            name: string;
        }>;
        connectors: Array<{
            /**
             * Connector name
             */
            name: string;
            /**
             * Connector type (e.g. confluence, github)
             */
            connectorType: 'jira' | 'confluence' | 'github' | 'gitlab' | 'servicenow' | 'notion' | 'sharepoint' | 'gdrive' | 'file_upload' | 'dropbox' | 'onedrive' | 'asana' | 'linear' | 'outline' | 'salesforce';
        }>;
    };
};

export type ExportAgentResponse = ExportAgentResponses[keyof ExportAgentResponses];

export type GetLabelKeysData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/agents/labels/keys';
};

export type GetLabelKeysErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetLabelKeysError = GetLabelKeysErrors[keyof GetLabelKeysErrors];

export type GetLabelKeysResponses = {
    /**
     * Default Response
     */
    200: Array<string>;
};

export type GetLabelKeysResponse = GetLabelKeysResponses[keyof GetLabelKeysResponses];

export type GetLabelValuesData = {
    body?: never;
    path?: never;
    query?: {
        /**
         * Filter values by label key
         */
        key?: string;
    };
    url: '/api/agents/labels/values';
};

export type GetLabelValuesErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetLabelValuesError = GetLabelValuesErrors[keyof GetLabelValuesErrors];

export type GetLabelValuesResponses = {
    /**
     * Default Response
     */
    200: Array<string>;
};

export type GetLabelValuesResponse = GetLabelValuesResponses[keyof GetLabelValuesResponses];

export type GetMemberDefaultAgentData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/members/default-agent';
};

export type GetMemberDefaultAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetMemberDefaultAgentError = GetMemberDefaultAgentErrors[keyof GetMemberDefaultAgentErrors];

export type GetMemberDefaultAgentResponses = {
    /**
     * Default Response
     */
    200: {
        defaultAgentId: string | null;
    };
};

export type GetMemberDefaultAgentResponse = GetMemberDefaultAgentResponses[keyof GetMemberDefaultAgentResponses];

export type GetMemberDefaultModelData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/members/default-model';
};

export type GetMemberDefaultModelErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetMemberDefaultModelError = GetMemberDefaultModelErrors[keyof GetMemberDefaultModelErrors];

export type GetMemberDefaultModelResponses = {
    /**
     * Default Response
     */
    200: {
        modelId: string | null;
        chatApiKeyId: string | null;
    };
};

export type GetMemberDefaultModelResponse = GetMemberDefaultModelResponses[keyof GetMemberDefaultModelResponses];

export type UpdateMemberDefaultModelData = {
    body: {
        modelId: string | null;
        chatApiKeyId: string | null;
    };
    path?: never;
    query?: never;
    url: '/api/members/default-model';
};

export type UpdateMemberDefaultModelErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateMemberDefaultModelError = UpdateMemberDefaultModelErrors[keyof UpdateMemberDefaultModelErrors];

export type UpdateMemberDefaultModelResponses = {
    /**
     * Default Response
     */
    200: {
        modelId: string | null;
        chatApiKeyId: string | null;
    };
};

export type UpdateMemberDefaultModelResponse = UpdateMemberDefaultModelResponses[keyof UpdateMemberDefaultModelResponses];

export type GetAllAgentToolsData = {
    body?: never;
    path?: never;
    query?: {
        sortBy?: 'name' | 'agent' | 'origin' | 'createdAt';
        sortDirection?: 'asc' | 'desc';
        search?: string;
        agentId?: string;
        /**
         * A catalogId to filter by
         */
        origin?: string;
        /**
         * Filter by MCP server owner user ID
         */
        mcpServerOwnerId?: string;
        /**
         * For test isolation
         */
        excludeArchestraTools?: boolean;
        limit?: number;
        offset?: number;
        skipPagination?: boolean;
    };
    url: '/api/agent-tools';
};

export type GetAllAgentToolsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetAllAgentToolsError = GetAllAgentToolsErrors[keyof GetAllAgentToolsErrors];

export type GetAllAgentToolsResponses = {
    /**
     * Default Response
     */
    200: {
        data: Array<{
            id: string;
            mcpServerId: string | null;
            credentialResolutionMode: 'static' | 'dynamic' | 'enterprise_managed';
            createdAt: string;
            updatedAt: string;
            agent: {
                id: string;
                name: string;
            };
            tool: {
                id: string;
                name: string;
                description: string | null;
                /**
                 *
                 * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
                 *
                 * The parameters the functions accepts, described as a JSON Schema object. See the
                 * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
                 * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
                 * documentation about the format.
                 *
                 * Omitting parameters defines a function with an empty parameter list.
                 *
                 */
                parameters?: {
                    [key: string]: unknown;
                };
                createdAt: string;
                updatedAt: string;
                catalogId: string | null;
            };
        }>;
        pagination: {
            currentPage: number;
            limit: number;
            total: number;
            totalPages: number;
            hasNext: boolean;
            hasPrev: boolean;
        };
    };
};

export type GetAllAgentToolsResponse = GetAllAgentToolsResponses[keyof GetAllAgentToolsResponses];

export type UnassignToolFromAgentData = {
    body?: never;
    path: {
        agentId: string;
        toolId: string;
    };
    query?: never;
    url: '/api/agents/{agentId}/tools/{toolId}';
};

export type UnassignToolFromAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UnassignToolFromAgentError = UnassignToolFromAgentErrors[keyof UnassignToolFromAgentErrors];

export type UnassignToolFromAgentResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type UnassignToolFromAgentResponse = UnassignToolFromAgentResponses[keyof UnassignToolFromAgentResponses];

export type AssignToolToAgentData = {
    body: {
        resolveAtCallTime?: boolean;
        credentialResolutionMode?: 'static' | 'dynamic' | 'enterprise_managed';
        mcpServerId?: string | null;
    } | null;
    path: {
        agentId: string;
        toolId: string;
    };
    query?: never;
    url: '/api/agents/{agentId}/tools/{toolId}';
};

export type AssignToolToAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type AssignToolToAgentError = AssignToolToAgentErrors[keyof AssignToolToAgentErrors];

export type AssignToolToAgentResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type AssignToolToAgentResponse = AssignToolToAgentResponses[keyof AssignToolToAgentResponses];

export type BulkAssignToolsData = {
    body: {
        assignments: Array<{
            toolId: string;
            resolveAtCallTime?: boolean;
            credentialResolutionMode?: 'static' | 'dynamic' | 'enterprise_managed';
            mcpServerId?: string | null;
            agentId: string;
        }>;
    };
    path?: never;
    query?: never;
    url: '/api/agents/tools/bulk-assign';
};

export type BulkAssignToolsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type BulkAssignToolsError = BulkAssignToolsErrors[keyof BulkAssignToolsErrors];

export type BulkAssignToolsResponses = {
    /**
     * Default Response
     */
    200: {
        succeeded: Array<{
            agentId: string;
            toolId: string;
        }>;
        failed: Array<{
            agentId: string;
            toolId: string;
            error: string;
        }>;
        duplicates: Array<{
            agentId: string;
            toolId: string;
        }>;
    };
};

export type BulkAssignToolsResponse = BulkAssignToolsResponses[keyof BulkAssignToolsResponses];

export type AutoConfigureAgentToolPoliciesData = {
    body: {
        toolIds: Array<string>;
    };
    path?: never;
    query?: never;
    url: '/api/agent-tools/auto-configure-policies';
};

export type AutoConfigureAgentToolPoliciesErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type AutoConfigureAgentToolPoliciesError = AutoConfigureAgentToolPoliciesErrors[keyof AutoConfigureAgentToolPoliciesErrors];

export type AutoConfigureAgentToolPoliciesResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
        results: Array<{
            toolId: string;
            success: boolean;
            config?: {
                toolInvocationAction: 'allow_when_context_is_sensitive' | 'block_when_context_is_sensitive' | 'require_approval' | 'block_always';
                trustedDataAction: 'mark_as_safe' | 'mark_as_sensitive' | 'sanitize_with_dual_llm' | 'block_always';
                reasoning: string;
            };
            error?: string;
        }>;
    };
};

export type AutoConfigureAgentToolPoliciesResponse = AutoConfigureAgentToolPoliciesResponses[keyof AutoConfigureAgentToolPoliciesResponses];

export type GetAgentToolsData = {
    body?: never;
    path: {
        agentId: string;
    };
    query?: never;
    url: '/api/agents/{agentId}/tools';
};

export type GetAgentToolsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetAgentToolsError = GetAgentToolsErrors[keyof GetAgentToolsErrors];

export type GetAgentToolsResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        agentId: string | null;
        catalogId: string | null;
        delegateToAgentId: string | null;
        name: string;
        /**
         *
         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
         *
         * The parameters the functions accepts, described as a JSON Schema object. See the
         * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
         * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
         * documentation about the format.
         *
         * Omitting parameters defines a function with an empty parameter list.
         *
         */
        parameters?: {
            [key: string]: unknown;
        };
        description: string | null;
        meta: string | number | boolean | null | {
            [key: string]: unknown;
        } | Array<unknown> | null;
        policiesAutoConfiguredAt: string | null;
        policiesAutoConfiguringStartedAt: string | null;
        policiesAutoConfiguredReasoning: string | null;
        policiesAutoConfiguredModel: string | null;
        createdAt: string;
        updatedAt: string;
        mcpServerId: string | null;
        credentialResolutionMode: 'static' | 'dynamic' | 'enterprise_managed';
    }>;
};

export type GetAgentToolsResponse = GetAgentToolsResponses[keyof GetAgentToolsResponses];

export type UpdateAgentToolData = {
    body: {
        mcpServerId?: string | null;
        credentialResolutionMode?: 'static' | 'dynamic' | 'enterprise_managed';
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/agent-tools/{id}';
};

export type UpdateAgentToolErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateAgentToolError = UpdateAgentToolErrors[keyof UpdateAgentToolErrors];

export type UpdateAgentToolResponses = {
    /**
     * Default Response
     */
    200: {
        id?: string;
        agentId?: string;
        toolId?: string;
        mcpServerId?: string | null;
        credentialResolutionMode: 'static' | 'dynamic' | 'enterprise_managed';
        createdAt?: string;
        updatedAt?: string;
    };
};

export type UpdateAgentToolResponse = UpdateAgentToolResponses[keyof UpdateAgentToolResponses];

export type GetAgentDelegationsData = {
    body?: never;
    path: {
        agentId: string;
    };
    query?: never;
    url: '/api/agents/{agentId}/delegations';
};

export type GetAgentDelegationsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetAgentDelegationsError = GetAgentDelegationsErrors[keyof GetAgentDelegationsErrors];

export type GetAgentDelegationsResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        name: string;
        description: string | null;
        systemPrompt: string | null;
    }>;
};

export type GetAgentDelegationsResponse = GetAgentDelegationsResponses[keyof GetAgentDelegationsResponses];

export type SyncAgentDelegationsData = {
    body: {
        targetAgentIds: Array<string>;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/api/agents/{agentId}/delegations';
};

export type SyncAgentDelegationsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type SyncAgentDelegationsError = SyncAgentDelegationsErrors[keyof SyncAgentDelegationsErrors];

export type SyncAgentDelegationsResponses = {
    /**
     * Default Response
     */
    200: {
        added: Array<string>;
        removed: Array<string>;
    };
};

export type SyncAgentDelegationsResponse = SyncAgentDelegationsResponses[keyof SyncAgentDelegationsResponses];

export type DeleteAgentDelegationData = {
    body?: never;
    path: {
        agentId: string;
        targetAgentId: string;
    };
    query?: never;
    url: '/api/agents/{agentId}/delegations/{targetAgentId}';
};

export type DeleteAgentDelegationErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeleteAgentDelegationError = DeleteAgentDelegationErrors[keyof DeleteAgentDelegationErrors];

export type DeleteAgentDelegationResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type DeleteAgentDelegationResponse = DeleteAgentDelegationResponses[keyof DeleteAgentDelegationResponses];

export type GetAllDelegationConnectionsData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/agent-delegations';
};

export type GetAllDelegationConnectionsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetAllDelegationConnectionsError = GetAllDelegationConnectionsErrors[keyof GetAllDelegationConnectionsErrors];

export type GetAllDelegationConnectionsResponses = {
    /**
     * Default Response
     */
    200: {
        connections: Array<{
            sourceAgentId: string;
            sourceAgentName: string;
            targetAgentId: string;
            targetAgentName: string;
            toolId: string;
        }>;
        agents: Array<{
            id: string;
            name: string;
            agentType: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
        }>;
    };
};

export type GetAllDelegationConnectionsResponse = GetAllDelegationConnectionsResponses[keyof GetAllDelegationConnectionsResponses];

export type AnthropicMessagesWithDefaultAgentData = {
    body: AnthropicMessagesRequestInput;
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        'anthropic-version': string;
        /**
         * Beta features to enable (comma-separated)
         */
        'anthropic-beta'?: string;
        'x-api-key'?: string;
        /**
         * Authorization header (Bearer token for OAuth)
         */
        authorization?: string;
    };
    path?: never;
    query?: never;
    url: '/v1/anthropic/v1/messages';
};

export type AnthropicMessagesWithDefaultAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type AnthropicMessagesWithDefaultAgentError = AnthropicMessagesWithDefaultAgentErrors[keyof AnthropicMessagesWithDefaultAgentErrors];

export type AnthropicMessagesWithDefaultAgentResponses = {
    /**
     * Default Response
     */
    200: AnthropicMessagesResponse;
};

export type AnthropicMessagesWithDefaultAgentResponse = AnthropicMessagesWithDefaultAgentResponses[keyof AnthropicMessagesWithDefaultAgentResponses];

export type AnthropicMessagesWithAgentData = {
    body: AnthropicMessagesRequestInput;
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        'anthropic-version': string;
        /**
         * Beta features to enable (comma-separated)
         */
        'anthropic-beta'?: string;
        'x-api-key'?: string;
        /**
         * Authorization header (Bearer token for OAuth)
         */
        authorization?: string;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/anthropic/{agentId}/v1/messages';
};

export type AnthropicMessagesWithAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type AnthropicMessagesWithAgentError = AnthropicMessagesWithAgentErrors[keyof AnthropicMessagesWithAgentErrors];

export type AnthropicMessagesWithAgentResponses = {
    /**
     * Default Response
     */
    200: AnthropicMessagesResponse;
};

export type AnthropicMessagesWithAgentResponse = AnthropicMessagesWithAgentResponses[keyof AnthropicMessagesWithAgentResponses];

export type GetApiKeysData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/api-keys';
};

export type GetApiKeysErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetApiKeysError = GetApiKeysErrors[keyof GetApiKeysErrors];

export type GetApiKeysResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        name: string | null;
        start: string | null;
        prefix: string | null;
        userId: string;
        enabled: boolean | null;
        lastRequest: string | null;
        expiresAt: string | null;
        createdAt: string;
        updatedAt: string;
        metadata: {
            [key: string]: unknown;
        } | null;
        permissions: {
            [key: string]: Array<string>;
        } | null;
    }>;
};

export type GetApiKeysResponse = GetApiKeysResponses[keyof GetApiKeysResponses];

export type CreateApiKeyData = {
    body: {
        name?: string | null;
        expiresIn?: number | null;
    };
    path?: never;
    query?: never;
    url: '/api/api-keys';
};

export type CreateApiKeyErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CreateApiKeyError = CreateApiKeyErrors[keyof CreateApiKeyErrors];

export type CreateApiKeyResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string | null;
        start: string | null;
        prefix: string | null;
        userId: string;
        enabled: boolean | null;
        lastRequest: string | null;
        expiresAt: string | null;
        createdAt: string;
        updatedAt: string;
        metadata: {
            [key: string]: unknown;
        } | null;
        permissions: {
            [key: string]: Array<string>;
        } | null;
        key: string;
    };
};

export type CreateApiKeyResponse = CreateApiKeyResponses[keyof CreateApiKeyResponses];

export type DeleteApiKeyData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/api-keys/{id}';
};

export type DeleteApiKeyErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeleteApiKeyError = DeleteApiKeyErrors[keyof DeleteApiKeyErrors];

export type DeleteApiKeyResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type DeleteApiKeyResponse = DeleteApiKeyResponses[keyof DeleteApiKeyResponses];

export type GetApiKeyData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/api-keys/{id}';
};

export type GetApiKeyErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetApiKeyError = GetApiKeyErrors[keyof GetApiKeyErrors];

export type GetApiKeyResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string | null;
        start: string | null;
        prefix: string | null;
        userId: string;
        enabled: boolean | null;
        lastRequest: string | null;
        expiresAt: string | null;
        createdAt: string;
        updatedAt: string;
        metadata: {
            [key: string]: unknown;
        } | null;
        permissions: {
            [key: string]: Array<string>;
        } | null;
    };
};

export type GetApiKeyResponse = GetApiKeyResponses[keyof GetApiKeyResponses];

export type GetDefaultCredentialsStatusData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/auth/default-credentials-status';
};

export type GetDefaultCredentialsStatusErrors = {
    /**
     * Default Response
     */
    500: {
        enabled: boolean;
    };
};

export type GetDefaultCredentialsStatusError = GetDefaultCredentialsStatusErrors[keyof GetDefaultCredentialsStatusErrors];

export type GetDefaultCredentialsStatusResponses = {
    /**
     * Default Response
     */
    200: {
        enabled: boolean;
    };
};

export type GetDefaultCredentialsStatusResponse = GetDefaultCredentialsStatusResponses[keyof GetDefaultCredentialsStatusResponses];

export type PostApiAuthOrganizationRemoveMemberData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/auth/organization/remove-member';
};

export type PostApiAuthOrganizationRemoveMemberResponses = {
    /**
     * Default Response
     */
    200: unknown;
};

export type GetOAuthClientInfoData = {
    body?: never;
    path?: never;
    query: {
        client_id: string;
    };
    url: '/api/auth/oauth2/client-info';
};

export type GetOAuthClientInfoResponses = {
    /**
     * Default Response
     */
    200: {
        client_name: string | null;
    };
};

export type GetOAuthClientInfoResponse = GetOAuthClientInfoResponses[keyof GetOAuthClientInfoResponses];

export type GetApiAuthOauth2AuthorizeData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/auth/oauth2/authorize';
};

export type GetApiAuthOauth2AuthorizeResponses = {
    /**
     * Default Response
     */
    200: unknown;
};

export type PostApiAuthOauth2TokenData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/auth/oauth2/token';
};

export type PostApiAuthOauth2TokenResponses = {
    /**
     * Default Response
     */
    200: unknown;
};

export type SubmitOAuthConsentData = {
    body: {
        accept: boolean;
        scope: string;
        oauth_query: string;
    };
    path?: never;
    query?: never;
    url: '/api/auth/oauth2/consent';
};

export type SubmitOAuthConsentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type SubmitOAuthConsentError = SubmitOAuthConsentErrors[keyof SubmitOAuthConsentErrors];

export type SubmitOAuthConsentResponses = {
    /**
     * Default Response
     */
    200: {
        redirectTo: string;
    };
};

export type SubmitOAuthConsentResponse = SubmitOAuthConsentResponses[keyof SubmitOAuthConsentResponses];

export type PostApiAuthOauth2RegisterData = {
    body: {
        [key: string]: unknown;
    };
    path?: never;
    query?: never;
    url: '/api/auth/oauth2/register';
};

export type PostApiAuthOauth2RegisterResponses = {
    /**
     * Default Response
     */
    200: unknown;
};

export type PostApiAuthSignInSsoData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/auth/sign-in/sso';
};

export type PostApiAuthSignInSsoResponses = {
    /**
     * Default Response
     */
    200: unknown;
};

export type GetApiAuthBy__Data = {
    body?: never;
    path: {
        '*': string;
    };
    query?: never;
    url: '/api/auth/{*}';
};

export type GetApiAuthBy__Responses = {
    /**
     * Default Response
     */
    200: unknown;
};

export type PostApiAuthBy__Data = {
    body?: never;
    path: {
        '*': string;
    };
    query?: never;
    url: '/api/auth/{*}';
};

export type PostApiAuthBy__Responses = {
    /**
     * Default Response
     */
    200: unknown;
};

export type GetOperatorsData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/autonomy-policies/operators';
};

export type GetOperatorsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetOperatorsError = GetOperatorsErrors[keyof GetOperatorsErrors];

export type GetOperatorsResponses = {
    /**
     * Default Response
     */
    200: Array<{
        value: 'equal' | 'notEqual' | 'contains' | 'notContains' | 'startsWith' | 'endsWith' | 'regex';
        label: string;
    }>;
};

export type GetOperatorsResponse = GetOperatorsResponses[keyof GetOperatorsResponses];

export type GetToolInvocationPoliciesData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/autonomy-policies/tool-invocation';
};

export type GetToolInvocationPoliciesErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetToolInvocationPoliciesError = GetToolInvocationPoliciesErrors[keyof GetToolInvocationPoliciesErrors];

export type GetToolInvocationPoliciesResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        toolId: string;
        conditions: Array<{
            key: string;
            operator: 'equal' | 'notEqual' | 'contains' | 'notContains' | 'startsWith' | 'endsWith' | 'regex';
            value: string;
        }>;
        action: 'allow_when_context_is_untrusted' | 'block_when_context_is_untrusted' | 'block_always' | 'require_approval';
        reason: string | null;
        createdAt: string;
        updatedAt: string;
    }>;
};

export type GetToolInvocationPoliciesResponse = GetToolInvocationPoliciesResponses[keyof GetToolInvocationPoliciesResponses];

export type CreateToolInvocationPolicyData = {
    body: {
        toolId: string;
        conditions: Array<{
            key: string;
            operator: 'equal' | 'notEqual' | 'contains' | 'notContains' | 'startsWith' | 'endsWith' | 'regex';
            value: string;
        }>;
        action: 'allow_when_context_is_untrusted' | 'block_when_context_is_untrusted' | 'block_always' | 'require_approval';
        reason?: string | null;
    };
    path?: never;
    query?: never;
    url: '/api/autonomy-policies/tool-invocation';
};

export type CreateToolInvocationPolicyErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CreateToolInvocationPolicyError = CreateToolInvocationPolicyErrors[keyof CreateToolInvocationPolicyErrors];

export type CreateToolInvocationPolicyResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        toolId: string;
        conditions: Array<{
            key: string;
            operator: 'equal' | 'notEqual' | 'contains' | 'notContains' | 'startsWith' | 'endsWith' | 'regex';
            value: string;
        }>;
        action: 'allow_when_context_is_untrusted' | 'block_when_context_is_untrusted' | 'block_always' | 'require_approval';
        reason: string | null;
        createdAt: string;
        updatedAt: string;
    };
};

export type CreateToolInvocationPolicyResponse = CreateToolInvocationPolicyResponses[keyof CreateToolInvocationPolicyResponses];

export type DeleteToolInvocationPolicyData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/autonomy-policies/tool-invocation/{id}';
};

export type DeleteToolInvocationPolicyErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeleteToolInvocationPolicyError = DeleteToolInvocationPolicyErrors[keyof DeleteToolInvocationPolicyErrors];

export type DeleteToolInvocationPolicyResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type DeleteToolInvocationPolicyResponse = DeleteToolInvocationPolicyResponses[keyof DeleteToolInvocationPolicyResponses];

export type GetToolInvocationPolicyData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/autonomy-policies/tool-invocation/{id}';
};

export type GetToolInvocationPolicyErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetToolInvocationPolicyError = GetToolInvocationPolicyErrors[keyof GetToolInvocationPolicyErrors];

export type GetToolInvocationPolicyResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        toolId: string;
        conditions: Array<{
            key: string;
            operator: 'equal' | 'notEqual' | 'contains' | 'notContains' | 'startsWith' | 'endsWith' | 'regex';
            value: string;
        }>;
        action: 'allow_when_context_is_untrusted' | 'block_when_context_is_untrusted' | 'block_always' | 'require_approval';
        reason: string | null;
        createdAt: string;
        updatedAt: string;
    };
};

export type GetToolInvocationPolicyResponse = GetToolInvocationPolicyResponses[keyof GetToolInvocationPolicyResponses];

export type UpdateToolInvocationPolicyData = {
    body: {
        toolId?: string;
        conditions?: Array<{
            key: string;
            operator: 'equal' | 'notEqual' | 'contains' | 'notContains' | 'startsWith' | 'endsWith' | 'regex';
            value: string;
        }>;
        action?: 'allow_when_context_is_untrusted' | 'block_when_context_is_untrusted' | 'block_always' | 'require_approval';
        reason?: string | null;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/autonomy-policies/tool-invocation/{id}';
};

export type UpdateToolInvocationPolicyErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateToolInvocationPolicyError = UpdateToolInvocationPolicyErrors[keyof UpdateToolInvocationPolicyErrors];

export type UpdateToolInvocationPolicyResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        toolId: string;
        conditions: Array<{
            key: string;
            operator: 'equal' | 'notEqual' | 'contains' | 'notContains' | 'startsWith' | 'endsWith' | 'regex';
            value: string;
        }>;
        action: 'allow_when_context_is_untrusted' | 'block_when_context_is_untrusted' | 'block_always' | 'require_approval';
        reason: string | null;
        createdAt: string;
        updatedAt: string;
    };
};

export type UpdateToolInvocationPolicyResponse = UpdateToolInvocationPolicyResponses[keyof UpdateToolInvocationPolicyResponses];

export type GetTrustedDataPoliciesData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/trusted-data-policies';
};

export type GetTrustedDataPoliciesErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetTrustedDataPoliciesError = GetTrustedDataPoliciesErrors[keyof GetTrustedDataPoliciesErrors];

export type GetTrustedDataPoliciesResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        toolId: string;
        description: string | null;
        conditions: Array<{
            key: string;
            operator: 'equal' | 'notEqual' | 'contains' | 'notContains' | 'startsWith' | 'endsWith' | 'regex';
            value: string;
        }>;
        action: 'block_always' | 'mark_as_trusted' | 'mark_as_untrusted' | 'sanitize_with_dual_llm';
        createdAt: string;
        updatedAt: string;
    }>;
};

export type GetTrustedDataPoliciesResponse = GetTrustedDataPoliciesResponses[keyof GetTrustedDataPoliciesResponses];

export type CreateTrustedDataPolicyData = {
    body: {
        toolId: string;
        description?: string | null;
        conditions: Array<{
            key: string;
            operator: 'equal' | 'notEqual' | 'contains' | 'notContains' | 'startsWith' | 'endsWith' | 'regex';
            value: string;
        }>;
        action: 'block_always' | 'mark_as_trusted' | 'mark_as_untrusted' | 'sanitize_with_dual_llm';
    };
    path?: never;
    query?: never;
    url: '/api/trusted-data-policies';
};

export type CreateTrustedDataPolicyErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CreateTrustedDataPolicyError = CreateTrustedDataPolicyErrors[keyof CreateTrustedDataPolicyErrors];

export type CreateTrustedDataPolicyResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        toolId: string;
        description: string | null;
        conditions: Array<{
            key: string;
            operator: 'equal' | 'notEqual' | 'contains' | 'notContains' | 'startsWith' | 'endsWith' | 'regex';
            value: string;
        }>;
        action: 'block_always' | 'mark_as_trusted' | 'mark_as_untrusted' | 'sanitize_with_dual_llm';
        createdAt: string;
        updatedAt: string;
    };
};

export type CreateTrustedDataPolicyResponse = CreateTrustedDataPolicyResponses[keyof CreateTrustedDataPolicyResponses];

export type DeleteTrustedDataPolicyData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/trusted-data-policies/{id}';
};

export type DeleteTrustedDataPolicyErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeleteTrustedDataPolicyError = DeleteTrustedDataPolicyErrors[keyof DeleteTrustedDataPolicyErrors];

export type DeleteTrustedDataPolicyResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type DeleteTrustedDataPolicyResponse = DeleteTrustedDataPolicyResponses[keyof DeleteTrustedDataPolicyResponses];

export type GetTrustedDataPolicyData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/trusted-data-policies/{id}';
};

export type GetTrustedDataPolicyErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetTrustedDataPolicyError = GetTrustedDataPolicyErrors[keyof GetTrustedDataPolicyErrors];

export type GetTrustedDataPolicyResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        toolId: string;
        description: string | null;
        conditions: Array<{
            key: string;
            operator: 'equal' | 'notEqual' | 'contains' | 'notContains' | 'startsWith' | 'endsWith' | 'regex';
            value: string;
        }>;
        action: 'block_always' | 'mark_as_trusted' | 'mark_as_untrusted' | 'sanitize_with_dual_llm';
        createdAt: string;
        updatedAt: string;
    };
};

export type GetTrustedDataPolicyResponse = GetTrustedDataPolicyResponses[keyof GetTrustedDataPolicyResponses];

export type UpdateTrustedDataPolicyData = {
    body: {
        toolId?: string;
        description?: string | null;
        conditions?: Array<{
            key: string;
            operator: 'equal' | 'notEqual' | 'contains' | 'notContains' | 'startsWith' | 'endsWith' | 'regex';
            value: string;
        }>;
        action?: 'block_always' | 'mark_as_trusted' | 'mark_as_untrusted' | 'sanitize_with_dual_llm';
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/trusted-data-policies/{id}';
};

export type UpdateTrustedDataPolicyErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateTrustedDataPolicyError = UpdateTrustedDataPolicyErrors[keyof UpdateTrustedDataPolicyErrors];

export type UpdateTrustedDataPolicyResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        toolId: string;
        description: string | null;
        conditions: Array<{
            key: string;
            operator: 'equal' | 'notEqual' | 'contains' | 'notContains' | 'startsWith' | 'endsWith' | 'regex';
            value: string;
        }>;
        action: 'block_always' | 'mark_as_trusted' | 'mark_as_untrusted' | 'sanitize_with_dual_llm';
        createdAt: string;
        updatedAt: string;
    };
};

export type UpdateTrustedDataPolicyResponse = UpdateTrustedDataPolicyResponses[keyof UpdateTrustedDataPolicyResponses];

export type BulkUpsertDefaultCallPolicyData = {
    body: {
        toolIds: Array<string>;
        action: 'allow_when_context_is_untrusted' | 'block_when_context_is_untrusted' | 'block_always' | 'require_approval';
    };
    path?: never;
    query?: never;
    url: '/api/tool-invocation/bulk-default';
};

export type BulkUpsertDefaultCallPolicyErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type BulkUpsertDefaultCallPolicyError = BulkUpsertDefaultCallPolicyErrors[keyof BulkUpsertDefaultCallPolicyErrors];

export type BulkUpsertDefaultCallPolicyResponses = {
    /**
     * Default Response
     */
    200: {
        updated: number;
        created: number;
    };
};

export type BulkUpsertDefaultCallPolicyResponse = BulkUpsertDefaultCallPolicyResponses[keyof BulkUpsertDefaultCallPolicyResponses];

export type BulkUpsertDefaultResultPolicyData = {
    body: {
        toolIds: Array<string>;
        action: 'mark_as_trusted' | 'mark_as_untrusted' | 'block_always' | 'sanitize_with_dual_llm';
    };
    path?: never;
    query?: never;
    url: '/api/trusted-data-policies/bulk-default';
};

export type BulkUpsertDefaultResultPolicyErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type BulkUpsertDefaultResultPolicyError = BulkUpsertDefaultResultPolicyErrors[keyof BulkUpsertDefaultResultPolicyErrors];

export type BulkUpsertDefaultResultPolicyResponses = {
    /**
     * Default Response
     */
    200: {
        updated: number;
        created: number;
    };
};

export type BulkUpsertDefaultResultPolicyResponse = BulkUpsertDefaultResultPolicyResponses[keyof BulkUpsertDefaultResultPolicyResponses];

export type AzureChatCompletionsWithDefaultAgentData = {
    body: XaiChatCompletionRequestInput;
    headers?: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for Azure AI Foundry
         */
        authorization?: string;
    };
    path?: never;
    query?: never;
    url: '/v1/azure/chat/completions';
};

export type AzureChatCompletionsWithDefaultAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type AzureChatCompletionsWithDefaultAgentError = AzureChatCompletionsWithDefaultAgentErrors[keyof AzureChatCompletionsWithDefaultAgentErrors];

export type AzureChatCompletionsWithDefaultAgentResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        choices: Array<{
            finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';
            index: number;
            logprobs: unknown;
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000
             */
            message: {
                content: string | null;
                refusal?: string | null;
                role: 'assistant';
                annotations?: Array<unknown>;
                audio?: unknown;
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
                 */
                function_call?: {
                    arguments: string;
                    name: string;
                } | null;
                tool_calls?: Array<{
                    id: string;
                    type: 'function';
                    /**
                     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
                     */
                    function: {
                        arguments: string;
                        name: string;
                    };
                } | {
                    id: string;
                    type: 'custom';
                    /**
                     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
                     */
                    custom: {
                        input: string;
                        name: string;
                    };
                }> | null;
            };
        }>;
        created: number;
        model: string;
        object: 'chat.completion';
        server_tier?: string;
        system_fingerprint?: string | null;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113
         */
        usage?: {
            completion_tokens: number;
            prompt_tokens: number;
            total_tokens: number;
            /**
             * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144
             */
            completion_tokens_details?: unknown;
            /**
             * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173
             */
            prompt_tokens_details?: unknown;
        };
        [key: string]: unknown;
    };
};

export type AzureChatCompletionsWithDefaultAgentResponse = AzureChatCompletionsWithDefaultAgentResponses[keyof AzureChatCompletionsWithDefaultAgentResponses];

export type AzureResponsesWithDefaultAgentData = {
    /**
     * https://developers.openai.com/api/reference/resources/responses/methods/create
     */
    body: {
        model: string;
        input?: string | Array<{
            type: string;
            [key: string]: unknown;
        }>;
        instructions?: string | null;
        max_output_tokens?: number | null;
        metadata?: {
            [key: string]: string;
        } | null;
        previous_response_id?: string | null;
        stream?: boolean | null;
        temperature?: number | null;
        text?: unknown;
        tool_choice?: unknown;
        tools?: Array<{
            type: 'function';
            name: string;
            description?: string | null;
            parameters?: {
                [key: string]: unknown;
            } | null;
            strict?: boolean | null;
            [key: string]: unknown;
        } | {
            type: string;
            [key: string]: unknown;
        }>;
        top_p?: number | null;
        user?: string;
        [key: string]: unknown;
    };
    headers?: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for Azure AI Foundry
         */
        authorization?: string;
    };
    path?: never;
    query?: never;
    url: '/v1/azure/responses';
};

export type AzureResponsesWithDefaultAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type AzureResponsesWithDefaultAgentError = AzureResponsesWithDefaultAgentErrors[keyof AzureResponsesWithDefaultAgentErrors];

export type AzureResponsesWithDefaultAgentResponses = {
    /**
     * https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)
     */
    200: {
        id: string;
        object: 'response';
        created_at: number;
        model: string;
        output: Array<{
            id: string;
            type: 'message';
            role: 'assistant';
            status: string;
            content: Array<{
                type: 'output_text';
                text: string;
                [key: string]: unknown;
            } | {
                type: 'refusal';
                refusal: string;
                [key: string]: unknown;
            }>;
            [key: string]: unknown;
        } | {
            type: 'function_call';
            id?: string;
            call_id: string;
            name: string;
            arguments: string;
            status?: string;
            [key: string]: unknown;
        } | {
            type: string;
            [key: string]: unknown;
        }>;
        status: string;
        /**
         * https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_usage%20%3E%20(schema)
         */
        usage?: {
            input_tokens: number;
            output_tokens: number;
            total_tokens: number;
            [key: string]: unknown;
        };
        [key: string]: unknown;
    };
};

export type AzureResponsesWithDefaultAgentResponse = AzureResponsesWithDefaultAgentResponses[keyof AzureResponsesWithDefaultAgentResponses];

export type AzureResponsesWithAgentData = {
    /**
     * https://developers.openai.com/api/reference/resources/responses/methods/create
     */
    body: {
        model: string;
        input?: string | Array<{
            type: string;
            [key: string]: unknown;
        }>;
        instructions?: string | null;
        max_output_tokens?: number | null;
        metadata?: {
            [key: string]: string;
        } | null;
        previous_response_id?: string | null;
        stream?: boolean | null;
        temperature?: number | null;
        text?: unknown;
        tool_choice?: unknown;
        tools?: Array<{
            type: 'function';
            name: string;
            description?: string | null;
            parameters?: {
                [key: string]: unknown;
            } | null;
            strict?: boolean | null;
            [key: string]: unknown;
        } | {
            type: string;
            [key: string]: unknown;
        }>;
        top_p?: number | null;
        user?: string;
        [key: string]: unknown;
    };
    headers?: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for Azure AI Foundry
         */
        authorization?: string;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/azure/{agentId}/responses';
};

export type AzureResponsesWithAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type AzureResponsesWithAgentError = AzureResponsesWithAgentErrors[keyof AzureResponsesWithAgentErrors];

export type AzureResponsesWithAgentResponses = {
    /**
     * https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)
     */
    200: {
        id: string;
        object: 'response';
        created_at: number;
        model: string;
        output: Array<{
            id: string;
            type: 'message';
            role: 'assistant';
            status: string;
            content: Array<{
                type: 'output_text';
                text: string;
                [key: string]: unknown;
            } | {
                type: 'refusal';
                refusal: string;
                [key: string]: unknown;
            }>;
            [key: string]: unknown;
        } | {
            type: 'function_call';
            id?: string;
            call_id: string;
            name: string;
            arguments: string;
            status?: string;
            [key: string]: unknown;
        } | {
            type: string;
            [key: string]: unknown;
        }>;
        status: string;
        /**
         * https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_usage%20%3E%20(schema)
         */
        usage?: {
            input_tokens: number;
            output_tokens: number;
            total_tokens: number;
            [key: string]: unknown;
        };
        [key: string]: unknown;
    };
};

export type AzureResponsesWithAgentResponse = AzureResponsesWithAgentResponses[keyof AzureResponsesWithAgentResponses];

export type AzureChatCompletionsWithAgentData = {
    body: XaiChatCompletionRequestInput;
    headers?: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for Azure AI Foundry
         */
        authorization?: string;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/azure/{agentId}/chat/completions';
};

export type AzureChatCompletionsWithAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type AzureChatCompletionsWithAgentError = AzureChatCompletionsWithAgentErrors[keyof AzureChatCompletionsWithAgentErrors];

export type AzureChatCompletionsWithAgentResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        choices: Array<{
            finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';
            index: number;
            logprobs: unknown;
            /**
             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000
             */
            message: {
                content: string | null;
                refusal?: string | null;
                role: 'assistant';
                annotations?: Array<unknown>;
                audio?: unknown;
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
                 */
                function_call?: {
                    arguments: string;
                    name: string;
                } | null;
                tool_calls?: Array<{
                    id: string;
                    type: 'function';
                    /**
                     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
                     */
                    function: {
                        arguments: string;
                        name: string;
                    };
                } | {
                    id: string;
                    type: 'custom';
                    /**
                     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
                     */
                    custom: {
                        input: string;
                        name: string;
                    };
                }> | null;
            };
        }>;
        created: number;
        model: string;
        object: 'chat.completion';
        server_tier?: string;
        system_fingerprint?: string | null;
        /**
         * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113
         */
        usage?: {
            completion_tokens: number;
            prompt_tokens: number;
            total_tokens: number;
            /**
             * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144
             */
            completion_tokens_details?: unknown;
            /**
             * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173
             */
            prompt_tokens_details?: unknown;
        };
        [key: string]: unknown;
    };
};

export type AzureChatCompletionsWithAgentResponse = AzureChatCompletionsWithAgentResponses[keyof AzureChatCompletionsWithAgentResponses];

export type BedrockOpenaiChatCompletionsWithDefaultAgentData = {
    body: XaiChatCompletionRequestInput;
    headers?: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Authorization header with Bearer token
         */
        authorization?: string;
    };
    path?: never;
    query?: never;
    url: '/v1/bedrock/openai/chat/completions';
};

export type BedrockOpenaiChatCompletionsWithDefaultAgentResponses = {
    /**
     * Default Response
     */
    200: unknown;
};

export type BedrockOpenaiChatCompletionsWithAgentData = {
    body: XaiChatCompletionRequestInput;
    headers?: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Authorization header with Bearer token
         */
        authorization?: string;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/bedrock/openai/{agentId}/chat/completions';
};

export type BedrockOpenaiChatCompletionsWithAgentResponses = {
    /**
     * Default Response
     */
    200: unknown;
};

export type BedrockOpenaiListModelsWithDefaultAgentData = {
    body?: never;
    headers?: {
        /**
         * Bearer token: Archestra virtual API key for Bedrock
         */
        authorization?: string;
    };
    path?: never;
    query?: never;
    url: '/v1/bedrock/openai/models';
};

export type BedrockOpenaiListModelsWithDefaultAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type BedrockOpenaiListModelsWithDefaultAgentError = BedrockOpenaiListModelsWithDefaultAgentErrors[keyof BedrockOpenaiListModelsWithDefaultAgentErrors];

export type BedrockOpenaiListModelsWithDefaultAgentResponses = {
    /**
     * Default Response
     */
    200: {
        object: 'list';
        data: Array<{
            id: string;
            object: 'model';
            created: number;
            owned_by: string;
        }>;
    };
};

export type BedrockOpenaiListModelsWithDefaultAgentResponse = BedrockOpenaiListModelsWithDefaultAgentResponses[keyof BedrockOpenaiListModelsWithDefaultAgentResponses];

export type BedrockOpenaiListModelsWithAgentData = {
    body?: never;
    headers?: {
        /**
         * Bearer token: Archestra virtual API key for Bedrock
         */
        authorization?: string;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/bedrock/openai/{agentId}/models';
};

export type BedrockOpenaiListModelsWithAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type BedrockOpenaiListModelsWithAgentError = BedrockOpenaiListModelsWithAgentErrors[keyof BedrockOpenaiListModelsWithAgentErrors];

export type BedrockOpenaiListModelsWithAgentResponses = {
    /**
     * Default Response
     */
    200: {
        object: 'list';
        data: Array<{
            id: string;
            object: 'model';
            created: number;
            owned_by: string;
        }>;
    };
};

export type BedrockOpenaiListModelsWithAgentResponse = BedrockOpenaiListModelsWithAgentResponses[keyof BedrockOpenaiListModelsWithAgentResponses];

export type BedrockConverseWithDefaultAgentData = {
    body: {
        modelId: string;
        messages?: Array<{
            role: 'user' | 'assistant';
            content: Array<{
                text: string;
            } | {
                image: {
                    format: 'png' | 'jpeg' | 'gif' | 'webp';
                    source: {
                        bytes: string;
                    } | {
                        s3Location: {
                            uri: string;
                            bucketOwner?: string;
                        };
                    };
                };
            } | {
                document: {
                    format: 'pdf' | 'csv' | 'doc' | 'docx' | 'xls' | 'xlsx' | 'html' | 'txt' | 'md';
                    name: string;
                    source: {
                        bytes: string;
                    } | {
                        s3Location: {
                            uri: string;
                            bucketOwner?: string;
                        };
                    };
                };
            } | {
                guardContent: {
                    text: {
                        text: string;
                        qualifiers?: Array<'grounding_source' | 'query' | 'guard_content'>;
                    };
                };
            } | {
                toolUse: {
                    toolUseId: string;
                    name: string;
                    input: {
                        [key: string]: unknown;
                    };
                };
            } | {
                toolResult: {
                    toolUseId: string;
                    content: Array<{
                        text: string;
                    } | {
                        image: {
                            format: 'png' | 'jpeg' | 'gif' | 'webp';
                            source: {
                                bytes: string;
                            } | {
                                s3Location: {
                                    uri: string;
                                    bucketOwner?: string;
                                };
                            };
                        };
                    } | {
                        json: {
                            [key: string]: unknown;
                        };
                    } | {
                        document: {
                            format: 'pdf' | 'csv' | 'doc' | 'docx' | 'xls' | 'xlsx' | 'html' | 'txt' | 'md';
                            name: string;
                            source: {
                                bytes: string;
                            } | {
                                s3Location: {
                                    uri: string;
                                    bucketOwner?: string;
                                };
                            };
                        };
                    }>;
                    status?: 'success' | 'error';
                };
            }>;
        }>;
        system?: Array<{
            type: 'text';
            text: string;
        } | {
            text: string;
        } | {
            guardContent: {
                text: {
                    text: string;
                    qualifiers?: Array<'grounding_source' | 'query' | 'guard_content'>;
                };
            };
        }>;
        inferenceConfig?: {
            maxTokens?: number;
            temperature?: number;
            topP?: number;
            stopSequences?: Array<string>;
        };
        toolConfig?: {
            tools: Array<{
                toolSpec: {
                    name: string;
                    description?: string;
                    inputSchema: {
                        json: {
                            [key: string]: unknown;
                        };
                    };
                };
            }>;
            toolChoice?: {
                tool: {
                    name: string;
                };
                [key: string]: unknown;
            } | {
                any: {
                    [key: string]: unknown;
                };
                [key: string]: unknown;
            } | {
                auto: {
                    [key: string]: unknown;
                };
                [key: string]: unknown;
            };
        };
        guardrailConfig?: {
            guardrailIdentifier: string;
            guardrailVersion: string;
            trace?: 'enabled' | 'disabled';
        };
        additionalModelRequestFields?: {
            [key: string]: unknown;
        };
        additionalModelResponseFieldPaths?: Array<string>;
        promptVariables?: {
            [key: string]: {
                text: string;
            } | {
                json: {
                    [key: string]: unknown;
                };
            };
        };
        performanceConfig?: {
            latency?: 'optimized';
        };
        serviceTier?: {
            type?: 'default' | 'throughput';
        };
        requestMetadata?: {
            [key: string]: string;
        };
        _isStreaming?: boolean;
    };
    headers?: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Authorization header with Bearer token
         */
        authorization?: string;
    };
    path?: never;
    query?: never;
    url: '/v1/bedrock/converse';
};

export type BedrockConverseWithDefaultAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type BedrockConverseWithDefaultAgentError = BedrockConverseWithDefaultAgentErrors[keyof BedrockConverseWithDefaultAgentErrors];

export type BedrockConverseWithDefaultAgentResponses = {
    /**
     * Default Response
     */
    200: {
        $metadata?: {
            httpStatusCode?: number;
            requestId?: string;
            attempts?: number;
            totalRetryDelay?: number;
        };
        output: {
            message?: {
                role: 'assistant';
                content: Array<{
                    text: string;
                } | {
                    toolUse: {
                        toolUseId: string;
                        name: string;
                        input: {
                            [key: string]: unknown;
                        };
                    };
                }>;
            };
        };
        stopReason: 'end_turn' | 'tool_use' | 'max_tokens' | 'stop_sequence' | 'guardrail_intervened' | 'content_filtered' | 'model_context_window_exceeded';
        usage: {
            inputTokens: number;
            outputTokens: number;
            totalTokens?: number;
            cacheReadInputTokens?: number;
            cacheWriteInputTokens?: number;
        };
        metrics?: {
            latencyMs?: number;
        };
        additionalModelResponseFields?: {
            [key: string]: unknown;
        };
        trace?: {
            guardrail?: {
                inputAssessment?: {
                    [key: string]: unknown;
                };
                outputAssessments?: {
                    [key: string]: unknown;
                };
                modelOutput?: Array<string>;
                actionReason?: string;
            };
            promptRouter?: {
                invokedModelId?: string;
            };
        };
        performanceConfig?: {
            latency?: 'optimized';
        };
        serviceTier?: {
            type?: 'default' | 'throughput';
        };
    };
};

export type BedrockConverseWithDefaultAgentResponse = BedrockConverseWithDefaultAgentResponses[keyof BedrockConverseWithDefaultAgentResponses];

export type BedrockConverseWithAgentData = {
    body: {
        modelId: string;
        messages?: Array<{
            role: 'user' | 'assistant';
            content: Array<{
                text: string;
            } | {
                image: {
                    format: 'png' | 'jpeg' | 'gif' | 'webp';
                    source: {
                        bytes: string;
                    } | {
                        s3Location: {
                            uri: string;
                            bucketOwner?: string;
                        };
                    };
                };
            } | {
                document: {
                    format: 'pdf' | 'csv' | 'doc' | 'docx' | 'xls' | 'xlsx' | 'html' | 'txt' | 'md';
                    name: string;
                    source: {
                        bytes: string;
                    } | {
                        s3Location: {
                            uri: string;
                            bucketOwner?: string;
                        };
                    };
                };
            } | {
                guardContent: {
                    text: {
                        text: string;
                        qualifiers?: Array<'grounding_source' | 'query' | 'guard_content'>;
                    };
                };
            } | {
                toolUse: {
                    toolUseId: string;
                    name: string;
                    input: {
                        [key: string]: unknown;
                    };
                };
            } | {
                toolResult: {
                    toolUseId: string;
                    content: Array<{
                        text: string;
                    } | {
                        image: {
                            format: 'png' | 'jpeg' | 'gif' | 'webp';
                            source: {
                                bytes: string;
                            } | {
                                s3Location: {
                                    uri: string;
                                    bucketOwner?: string;
                                };
                            };
                        };
                    } | {
                        json: {
                            [key: string]: unknown;
                        };
                    } | {
                        document: {
                            format: 'pdf' | 'csv' | 'doc' | 'docx' | 'xls' | 'xlsx' | 'html' | 'txt' | 'md';
                            name: string;
                            source: {
                                bytes: string;
                            } | {
                                s3Location: {
                                    uri: string;
                                    bucketOwner?: string;
                                };
                            };
                        };
                    }>;
                    status?: 'success' | 'error';
                };
            }>;
        }>;
        system?: Array<{
            type: 'text';
            text: string;
        } | {
            text: string;
        } | {
            guardContent: {
                text: {
                    text: string;
                    qualifiers?: Array<'grounding_source' | 'query' | 'guard_content'>;
                };
            };
        }>;
        inferenceConfig?: {
            maxTokens?: number;
            temperature?: number;
            topP?: number;
            stopSequences?: Array<string>;
        };
        toolConfig?: {
            tools: Array<{
                toolSpec: {
                    name: string;
                    description?: string;
                    inputSchema: {
                        json: {
                            [key: string]: unknown;
                        };
                    };
                };
            }>;
            toolChoice?: {
                tool: {
                    name: string;
                };
                [key: string]: unknown;
            } | {
                any: {
                    [key: string]: unknown;
                };
                [key: string]: unknown;
            } | {
                auto: {
                    [key: string]: unknown;
                };
                [key: string]: unknown;
            };
        };
        guardrailConfig?: {
            guardrailIdentifier: string;
            guardrailVersion: string;
            trace?: 'enabled' | 'disabled';
        };
        additionalModelRequestFields?: {
            [key: string]: unknown;
        };
        additionalModelResponseFieldPaths?: Array<string>;
        promptVariables?: {
            [key: string]: {
                text: string;
            } | {
                json: {
                    [key: string]: unknown;
                };
            };
        };
        performanceConfig?: {
            latency?: 'optimized';
        };
        serviceTier?: {
            type?: 'default' | 'throughput';
        };
        requestMetadata?: {
            [key: string]: string;
        };
        _isStreaming?: boolean;
    };
    headers?: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Authorization header with Bearer token
         */
        authorization?: string;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/bedrock/{agentId}/converse';
};

export type BedrockConverseWithAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type BedrockConverseWithAgentError = BedrockConverseWithAgentErrors[keyof BedrockConverseWithAgentErrors];

export type BedrockConverseWithAgentResponses = {
    /**
     * Default Response
     */
    200: {
        $metadata?: {
            httpStatusCode?: number;
            requestId?: string;
            attempts?: number;
            totalRetryDelay?: number;
        };
        output: {
            message?: {
                role: 'assistant';
                content: Array<{
                    text: string;
                } | {
                    toolUse: {
                        toolUseId: string;
                        name: string;
                        input: {
                            [key: string]: unknown;
                        };
                    };
                }>;
            };
        };
        stopReason: 'end_turn' | 'tool_use' | 'max_tokens' | 'stop_sequence' | 'guardrail_intervened' | 'content_filtered' | 'model_context_window_exceeded';
        usage: {
            inputTokens: number;
            outputTokens: number;
            totalTokens?: number;
            cacheReadInputTokens?: number;
            cacheWriteInputTokens?: number;
        };
        metrics?: {
            latencyMs?: number;
        };
        additionalModelResponseFields?: {
            [key: string]: unknown;
        };
        trace?: {
            guardrail?: {
                inputAssessment?: {
                    [key: string]: unknown;
                };
                outputAssessments?: {
                    [key: string]: unknown;
                };
                modelOutput?: Array<string>;
                actionReason?: string;
            };
            promptRouter?: {
                invokedModelId?: string;
            };
        };
        performanceConfig?: {
            latency?: 'optimized';
        };
        serviceTier?: {
            type?: 'default' | 'throughput';
        };
    };
};

export type BedrockConverseWithAgentResponse = BedrockConverseWithAgentResponses[keyof BedrockConverseWithAgentResponses];

export type BedrockConverseStreamWithDefaultAgentData = {
    body: {
        modelId: string;
        messages?: Array<{
            role: 'user' | 'assistant';
            content: Array<{
                text: string;
            } | {
                image: {
                    format: 'png' | 'jpeg' | 'gif' | 'webp';
                    source: {
                        bytes: string;
                    } | {
                        s3Location: {
                            uri: string;
                            bucketOwner?: string;
                        };
                    };
                };
            } | {
                document: {
                    format: 'pdf' | 'csv' | 'doc' | 'docx' | 'xls' | 'xlsx' | 'html' | 'txt' | 'md';
                    name: string;
                    source: {
                        bytes: string;
                    } | {
                        s3Location: {
                            uri: string;
                            bucketOwner?: string;
                        };
                    };
                };
            } | {
                guardContent: {
                    text: {
                        text: string;
                        qualifiers?: Array<'grounding_source' | 'query' | 'guard_content'>;
                    };
                };
            } | {
                toolUse: {
                    toolUseId: string;
                    name: string;
                    input: {
                        [key: string]: unknown;
                    };
                };
            } | {
                toolResult: {
                    toolUseId: string;
                    content: Array<{
                        text: string;
                    } | {
                        image: {
                            format: 'png' | 'jpeg' | 'gif' | 'webp';
                            source: {
                                bytes: string;
                            } | {
                                s3Location: {
                                    uri: string;
                                    bucketOwner?: string;
                                };
                            };
                        };
                    } | {
                        json: {
                            [key: string]: unknown;
                        };
                    } | {
                        document: {
                            format: 'pdf' | 'csv' | 'doc' | 'docx' | 'xls' | 'xlsx' | 'html' | 'txt' | 'md';
                            name: string;
                            source: {
                                bytes: string;
                            } | {
                                s3Location: {
                                    uri: string;
                                    bucketOwner?: string;
                                };
                            };
                        };
                    }>;
                    status?: 'success' | 'error';
                };
            }>;
        }>;
        system?: Array<{
            type: 'text';
            text: string;
        } | {
            text: string;
        } | {
            guardContent: {
                text: {
                    text: string;
                    qualifiers?: Array<'grounding_source' | 'query' | 'guard_content'>;
                };
            };
        }>;
        inferenceConfig?: {
            maxTokens?: number;
            temperature?: number;
            topP?: number;
            stopSequences?: Array<string>;
        };
        toolConfig?: {
            tools: Array<{
                toolSpec: {
                    name: string;
                    description?: string;
                    inputSchema: {
                        json: {
                            [key: string]: unknown;
                        };
                    };
                };
            }>;
            toolChoice?: {
                tool: {
                    name: string;
                };
                [key: string]: unknown;
            } | {
                any: {
                    [key: string]: unknown;
                };
                [key: string]: unknown;
            } | {
                auto: {
                    [key: string]: unknown;
                };
                [key: string]: unknown;
            };
        };
        guardrailConfig?: {
            guardrailIdentifier: string;
            guardrailVersion: string;
            trace?: 'enabled' | 'disabled';
        };
        additionalModelRequestFields?: {
            [key: string]: unknown;
        };
        additionalModelResponseFieldPaths?: Array<string>;
        promptVariables?: {
            [key: string]: {
                text: string;
            } | {
                json: {
                    [key: string]: unknown;
                };
            };
        };
        performanceConfig?: {
            latency?: 'optimized';
        };
        serviceTier?: {
            type?: 'default' | 'throughput';
        };
        requestMetadata?: {
            [key: string]: string;
        };
        _isStreaming?: boolean;
    };
    headers?: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Authorization header with Bearer token
         */
        authorization?: string;
    };
    path?: never;
    query?: never;
    url: '/v1/bedrock/converse-stream';
};

export type BedrockConverseStreamWithDefaultAgentResponses = {
    /**
     * Default Response
     */
    200: unknown;
};

export type BedrockConverseStreamWithAgentData = {
    body: {
        modelId: string;
        messages?: Array<{
            role: 'user' | 'assistant';
            content: Array<{
                text: string;
            } | {
                image: {
                    format: 'png' | 'jpeg' | 'gif' | 'webp';
                    source: {
                        bytes: string;
                    } | {
                        s3Location: {
                            uri: string;
                            bucketOwner?: string;
                        };
                    };
                };
            } | {
                document: {
                    format: 'pdf' | 'csv' | 'doc' | 'docx' | 'xls' | 'xlsx' | 'html' | 'txt' | 'md';
                    name: string;
                    source: {
                        bytes: string;
                    } | {
                        s3Location: {
                            uri: string;
                            bucketOwner?: string;
                        };
                    };
                };
            } | {
                guardContent: {
                    text: {
                        text: string;
                        qualifiers?: Array<'grounding_source' | 'query' | 'guard_content'>;
                    };
                };
            } | {
                toolUse: {
                    toolUseId: string;
                    name: string;
                    input: {
                        [key: string]: unknown;
                    };
                };
            } | {
                toolResult: {
                    toolUseId: string;
                    content: Array<{
                        text: string;
                    } | {
                        image: {
                            format: 'png' | 'jpeg' | 'gif' | 'webp';
                            source: {
                                bytes: string;
                            } | {
                                s3Location: {
                                    uri: string;
                                    bucketOwner?: string;
                                };
                            };
                        };
                    } | {
                        json: {
                            [key: string]: unknown;
                        };
                    } | {
                        document: {
                            format: 'pdf' | 'csv' | 'doc' | 'docx' | 'xls' | 'xlsx' | 'html' | 'txt' | 'md';
                            name: string;
                            source: {
                                bytes: string;
                            } | {
                                s3Location: {
                                    uri: string;
                                    bucketOwner?: string;
                                };
                            };
                        };
                    }>;
                    status?: 'success' | 'error';
                };
            }>;
        }>;
        system?: Array<{
            type: 'text';
            text: string;
        } | {
            text: string;
        } | {
            guardContent: {
                text: {
                    text: string;
                    qualifiers?: Array<'grounding_source' | 'query' | 'guard_content'>;
                };
            };
        }>;
        inferenceConfig?: {
            maxTokens?: number;
            temperature?: number;
            topP?: number;
            stopSequences?: Array<string>;
        };
        toolConfig?: {
            tools: Array<{
                toolSpec: {
                    name: string;
                    description?: string;
                    inputSchema: {
                        json: {
                            [key: string]: unknown;
                        };
                    };
                };
            }>;
            toolChoice?: {
                tool: {
                    name: string;
                };
                [key: string]: unknown;
            } | {
                any: {
                    [key: string]: unknown;
                };
                [key: string]: unknown;
            } | {
                auto: {
                    [key: string]: unknown;
                };
                [key: string]: unknown;
            };
        };
        guardrailConfig?: {
            guardrailIdentifier: string;
            guardrailVersion: string;
            trace?: 'enabled' | 'disabled';
        };
        additionalModelRequestFields?: {
            [key: string]: unknown;
        };
        additionalModelResponseFieldPaths?: Array<string>;
        promptVariables?: {
            [key: string]: {
                text: string;
            } | {
                json: {
                    [key: string]: unknown;
                };
            };
        };
        performanceConfig?: {
            latency?: 'optimized';
        };
        serviceTier?: {
            type?: 'default' | 'throughput';
        };
        requestMetadata?: {
            [key: string]: string;
        };
        _isStreaming?: boolean;
    };
    headers?: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Authorization header with Bearer token
         */
        authorization?: string;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/bedrock/{agentId}/converse-stream';
};

export type BedrockConverseStreamWithAgentResponses = {
    /**
     * Default Response
     */
    200: unknown;
};

export type BedrockConverseWithAgentAndModelData = {
    body: {
        modelId?: string;
        messages?: Array<{
            role: 'user' | 'assistant';
            content: Array<{
                text: string;
            } | {
                image: {
                    format: 'png' | 'jpeg' | 'gif' | 'webp';
                    source: {
                        bytes: string;
                    } | {
                        s3Location: {
                            uri: string;
                            bucketOwner?: string;
                        };
                    };
                };
            } | {
                document: {
                    format: 'pdf' | 'csv' | 'doc' | 'docx' | 'xls' | 'xlsx' | 'html' | 'txt' | 'md';
                    name: string;
                    source: {
                        bytes: string;
                    } | {
                        s3Location: {
                            uri: string;
                            bucketOwner?: string;
                        };
                    };
                };
            } | {
                guardContent: {
                    text: {
                        text: string;
                        qualifiers?: Array<'grounding_source' | 'query' | 'guard_content'>;
                    };
                };
            } | {
                toolUse: {
                    toolUseId: string;
                    name: string;
                    input: {
                        [key: string]: unknown;
                    };
                };
            } | {
                toolResult: {
                    toolUseId: string;
                    content: Array<{
                        text: string;
                    } | {
                        image: {
                            format: 'png' | 'jpeg' | 'gif' | 'webp';
                            source: {
                                bytes: string;
                            } | {
                                s3Location: {
                                    uri: string;
                                    bucketOwner?: string;
                                };
                            };
                        };
                    } | {
                        json: {
                            [key: string]: unknown;
                        };
                    } | {
                        document: {
                            format: 'pdf' | 'csv' | 'doc' | 'docx' | 'xls' | 'xlsx' | 'html' | 'txt' | 'md';
                            name: string;
                            source: {
                                bytes: string;
                            } | {
                                s3Location: {
                                    uri: string;
                                    bucketOwner?: string;
                                };
                            };
                        };
                    }>;
                    status?: 'success' | 'error';
                };
            }>;
        }>;
        system?: Array<{
            type: 'text';
            text: string;
        } | {
            text: string;
        } | {
            guardContent: {
                text: {
                    text: string;
                    qualifiers?: Array<'grounding_source' | 'query' | 'guard_content'>;
                };
            };
        }>;
        inferenceConfig?: {
            maxTokens?: number;
            temperature?: number;
            topP?: number;
            stopSequences?: Array<string>;
        };
        toolConfig?: {
            tools: Array<{
                toolSpec: {
                    name: string;
                    description?: string;
                    inputSchema: {
                        json: {
                            [key: string]: unknown;
                        };
                    };
                };
            }>;
            toolChoice?: {
                tool: {
                    name: string;
                };
                [key: string]: unknown;
            } | {
                any: {
                    [key: string]: unknown;
                };
                [key: string]: unknown;
            } | {
                auto: {
                    [key: string]: unknown;
                };
                [key: string]: unknown;
            };
        };
        guardrailConfig?: {
            guardrailIdentifier: string;
            guardrailVersion: string;
            trace?: 'enabled' | 'disabled';
        };
        additionalModelRequestFields?: {
            [key: string]: unknown;
        };
        additionalModelResponseFieldPaths?: Array<string>;
        promptVariables?: {
            [key: string]: {
                text: string;
            } | {
                json: {
                    [key: string]: unknown;
                };
            };
        };
        performanceConfig?: {
            latency?: 'optimized';
        };
        serviceTier?: {
            type?: 'default' | 'throughput';
        };
        requestMetadata?: {
            [key: string]: string;
        };
        _isStreaming?: boolean;
    };
    headers?: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Authorization header with Bearer token
         */
        authorization?: string;
    };
    path: {
        agentId: string;
        modelId: string;
    };
    query?: never;
    url: '/v1/bedrock/{agentId}/model/{modelId}/converse';
};

export type BedrockConverseWithAgentAndModelErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type BedrockConverseWithAgentAndModelError = BedrockConverseWithAgentAndModelErrors[keyof BedrockConverseWithAgentAndModelErrors];

export type BedrockConverseWithAgentAndModelResponses = {
    /**
     * Default Response
     */
    200: {
        $metadata?: {
            httpStatusCode?: number;
            requestId?: string;
            attempts?: number;
            totalRetryDelay?: number;
        };
        output: {
            message?: {
                role: 'assistant';
                content: Array<{
                    text: string;
                } | {
                    toolUse: {
                        toolUseId: string;
                        name: string;
                        input: {
                            [key: string]: unknown;
                        };
                    };
                }>;
            };
        };
        stopReason: 'end_turn' | 'tool_use' | 'max_tokens' | 'stop_sequence' | 'guardrail_intervened' | 'content_filtered' | 'model_context_window_exceeded';
        usage: {
            inputTokens: number;
            outputTokens: number;
            totalTokens?: number;
            cacheReadInputTokens?: number;
            cacheWriteInputTokens?: number;
        };
        metrics?: {
            latencyMs?: number;
        };
        additionalModelResponseFields?: {
            [key: string]: unknown;
        };
        trace?: {
            guardrail?: {
                inputAssessment?: {
                    [key: string]: unknown;
                };
                outputAssessments?: {
                    [key: string]: unknown;
                };
                modelOutput?: Array<string>;
                actionReason?: string;
            };
            promptRouter?: {
                invokedModelId?: string;
            };
        };
        performanceConfig?: {
            latency?: 'optimized';
        };
        serviceTier?: {
            type?: 'default' | 'throughput';
        };
    };
};

export type BedrockConverseWithAgentAndModelResponse = BedrockConverseWithAgentAndModelResponses[keyof BedrockConverseWithAgentAndModelResponses];

export type BedrockConverseStreamWithAgentAndModelData = {
    body: {
        modelId?: string;
        messages?: Array<{
            role: 'user' | 'assistant';
            content: Array<{
                text: string;
            } | {
                image: {
                    format: 'png' | 'jpeg' | 'gif' | 'webp';
                    source: {
                        bytes: string;
                    } | {
                        s3Location: {
                            uri: string;
                            bucketOwner?: string;
                        };
                    };
                };
            } | {
                document: {
                    format: 'pdf' | 'csv' | 'doc' | 'docx' | 'xls' | 'xlsx' | 'html' | 'txt' | 'md';
                    name: string;
                    source: {
                        bytes: string;
                    } | {
                        s3Location: {
                            uri: string;
                            bucketOwner?: string;
                        };
                    };
                };
            } | {
                guardContent: {
                    text: {
                        text: string;
                        qualifiers?: Array<'grounding_source' | 'query' | 'guard_content'>;
                    };
                };
            } | {
                toolUse: {
                    toolUseId: string;
                    name: string;
                    input: {
                        [key: string]: unknown;
                    };
                };
            } | {
                toolResult: {
                    toolUseId: string;
                    content: Array<{
                        text: string;
                    } | {
                        image: {
                            format: 'png' | 'jpeg' | 'gif' | 'webp';
                            source: {
                                bytes: string;
                            } | {
                                s3Location: {
                                    uri: string;
                                    bucketOwner?: string;
                                };
                            };
                        };
                    } | {
                        json: {
                            [key: string]: unknown;
                        };
                    } | {
                        document: {
                            format: 'pdf' | 'csv' | 'doc' | 'docx' | 'xls' | 'xlsx' | 'html' | 'txt' | 'md';
                            name: string;
                            source: {
                                bytes: string;
                            } | {
                                s3Location: {
                                    uri: string;
                                    bucketOwner?: string;
                                };
                            };
                        };
                    }>;
                    status?: 'success' | 'error';
                };
            }>;
        }>;
        system?: Array<{
            type: 'text';
            text: string;
        } | {
            text: string;
        } | {
            guardContent: {
                text: {
                    text: string;
                    qualifiers?: Array<'grounding_source' | 'query' | 'guard_content'>;
                };
            };
        }>;
        inferenceConfig?: {
            maxTokens?: number;
            temperature?: number;
            topP?: number;
            stopSequences?: Array<string>;
        };
        toolConfig?: {
            tools: Array<{
                toolSpec: {
                    name: string;
                    description?: string;
                    inputSchema: {
                        json: {
                            [key: string]: unknown;
                        };
                    };
                };
            }>;
            toolChoice?: {
                tool: {
                    name: string;
                };
                [key: string]: unknown;
            } | {
                any: {
                    [key: string]: unknown;
                };
                [key: string]: unknown;
            } | {
                auto: {
                    [key: string]: unknown;
                };
                [key: string]: unknown;
            };
        };
        guardrailConfig?: {
            guardrailIdentifier: string;
            guardrailVersion: string;
            trace?: 'enabled' | 'disabled';
        };
        additionalModelRequestFields?: {
            [key: string]: unknown;
        };
        additionalModelResponseFieldPaths?: Array<string>;
        promptVariables?: {
            [key: string]: {
                text: string;
            } | {
                json: {
                    [key: string]: unknown;
                };
            };
        };
        performanceConfig?: {
            latency?: 'optimized';
        };
        serviceTier?: {
            type?: 'default' | 'throughput';
        };
        requestMetadata?: {
            [key: string]: string;
        };
        _isStreaming?: boolean;
    };
    headers?: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Authorization header with Bearer token
         */
        authorization?: string;
    };
    path: {
        agentId: string;
        modelId: string;
    };
    query?: never;
    url: '/v1/bedrock/{agentId}/model/{modelId}/converse-stream';
};

export type BedrockConverseStreamWithAgentAndModelResponses = {
    /**
     * Default Response
     */
    200: unknown;
};

export type CerebrasChatCompletionsWithDefaultAgentData = {
    body: XaiChatCompletionRequestInput;
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path?: never;
    query?: never;
    url: '/v1/cerebras/chat/completions';
};

export type CerebrasChatCompletionsWithDefaultAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CerebrasChatCompletionsWithDefaultAgentError = CerebrasChatCompletionsWithDefaultAgentErrors[keyof CerebrasChatCompletionsWithDefaultAgentErrors];

export type CerebrasChatCompletionsWithDefaultAgentResponses = {
    /**
     * Default Response
     */
    200: CerebrasChatCompletionResponse;
};

export type CerebrasChatCompletionsWithDefaultAgentResponse = CerebrasChatCompletionsWithDefaultAgentResponses[keyof CerebrasChatCompletionsWithDefaultAgentResponses];

export type CerebrasChatCompletionsWithAgentData = {
    body: XaiChatCompletionRequestInput;
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/cerebras/{agentId}/chat/completions';
};

export type CerebrasChatCompletionsWithAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CerebrasChatCompletionsWithAgentError = CerebrasChatCompletionsWithAgentErrors[keyof CerebrasChatCompletionsWithAgentErrors];

export type CerebrasChatCompletionsWithAgentResponses = {
    /**
     * Default Response
     */
    200: CerebrasChatCompletionResponse;
};

export type CerebrasChatCompletionsWithAgentResponse = CerebrasChatCompletionsWithAgentResponses[keyof CerebrasChatCompletionsWithAgentResponses];

export type StreamChatData = {
    body: {
        id: string;
        messages: Array<unknown>;
        trigger?: 'submit-message' | 'regenerate-message';
    };
    path?: never;
    query?: never;
    url: '/api/chat';
};

export type StreamChatErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type StreamChatError = StreamChatErrors[keyof StreamChatErrors];

export type StopChatStreamData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/chat/conversations/{id}/stop';
};

export type StopChatStreamErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type StopChatStreamError = StopChatStreamErrors[keyof StopChatStreamErrors];

export type StopChatStreamResponses = {
    /**
     * Default Response
     */
    200: {
        stopped: boolean;
    };
};

export type StopChatStreamResponse = StopChatStreamResponses[keyof StopChatStreamResponses];

export type GetChatConversationsData = {
    body?: never;
    path?: never;
    query?: {
        search?: string;
    };
    url: '/api/chat/conversations';
};

export type GetChatConversationsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetChatConversationsError = GetChatConversationsErrors[keyof GetChatConversationsErrors];

export type GetChatConversationsResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        userId: string;
        organizationId: string;
        agentId: string | null;
        chatApiKeyId: string | null;
        title: string | null;
        selectedModel: string;
        selectedProvider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        modelId: string | null;
        hasCustomToolSelection: boolean;
        todoList: string | number | boolean | null | {
            [key: string]: unknown;
        } | Array<unknown> | null;
        artifact: string | null;
        pinnedAt: string | null;
        createdAt: string;
        updatedAt: string;
        agent: {
            id: string;
            name: string;
            systemPrompt: string | null;
            agentType: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
            llmApiKeyId: string | null;
        } | null;
        share: {
            id: string;
            visibility: 'organization' | 'team' | 'user';
        } | null;
        messages: Array<unknown>;
        chatErrors: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                    status?: number;
                    message?: string;
                    type?: string;
                    raw?: unknown;
                };
            };
            createdAt: string;
        }>;
        compactions: Array<{
            id: string;
            conversationId: string;
            summary: string;
            compactedThroughMessageId: string | null;
            trigger: 'auto' | 'manual';
            provider: string;
            model: string;
            originalTokenEstimate: number;
            compactedTokenEstimate: number;
            createdAt: string;
        }>;
    }>;
};

export type GetChatConversationsResponse = GetChatConversationsResponses[keyof GetChatConversationsResponses];

export type CreateChatConversationData = {
    body: {
        agentId: string;
        title?: string | null;
        modelId?: string | null;
        chatApiKeyId?: string | null;
    };
    path?: never;
    query?: never;
    url: '/api/chat/conversations';
};

export type CreateChatConversationErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CreateChatConversationError = CreateChatConversationErrors[keyof CreateChatConversationErrors];

export type CreateChatConversationResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        userId: string;
        organizationId: string;
        agentId: string | null;
        chatApiKeyId: string | null;
        title: string | null;
        selectedModel: string;
        selectedProvider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        modelId: string | null;
        hasCustomToolSelection: boolean;
        todoList: string | number | boolean | null | {
            [key: string]: unknown;
        } | Array<unknown> | null;
        artifact: string | null;
        pinnedAt: string | null;
        createdAt: string;
        updatedAt: string;
        agent: {
            id: string;
            name: string;
            systemPrompt: string | null;
            agentType: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
            llmApiKeyId: string | null;
        } | null;
        share: {
            id: string;
            visibility: 'organization' | 'team' | 'user';
        } | null;
        messages: Array<unknown>;
        chatErrors: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                    status?: number;
                    message?: string;
                    type?: string;
                    raw?: unknown;
                };
            };
            createdAt: string;
        }>;
        compactions: Array<{
            id: string;
            conversationId: string;
            summary: string;
            compactedThroughMessageId: string | null;
            trigger: 'auto' | 'manual';
            provider: string;
            model: string;
            originalTokenEstimate: number;
            compactedTokenEstimate: number;
            createdAt: string;
        }>;
    };
};

export type CreateChatConversationResponse = CreateChatConversationResponses[keyof CreateChatConversationResponses];

export type DeleteChatConversationData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/chat/conversations/{id}';
};

export type DeleteChatConversationErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeleteChatConversationError = DeleteChatConversationErrors[keyof DeleteChatConversationErrors];

export type DeleteChatConversationResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type DeleteChatConversationResponse = DeleteChatConversationResponses[keyof DeleteChatConversationResponses];

export type GetChatConversationData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/chat/conversations/{id}';
};

export type GetChatConversationErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetChatConversationError = GetChatConversationErrors[keyof GetChatConversationErrors];

export type GetChatConversationResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        userId: string;
        organizationId: string;
        agentId: string | null;
        chatApiKeyId: string | null;
        title: string | null;
        selectedModel: string;
        selectedProvider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        modelId: string | null;
        hasCustomToolSelection: boolean;
        todoList: string | number | boolean | null | {
            [key: string]: unknown;
        } | Array<unknown> | null;
        artifact: string | null;
        pinnedAt: string | null;
        createdAt: string;
        updatedAt: string;
        agent: {
            id: string;
            name: string;
            systemPrompt: string | null;
            agentType: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
            llmApiKeyId: string | null;
        } | null;
        share: {
            id: string;
            visibility: 'organization' | 'team' | 'user';
        } | null;
        messages: Array<unknown>;
        chatErrors: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                    status?: number;
                    message?: string;
                    type?: string;
                    raw?: unknown;
                };
            };
            createdAt: string;
        }>;
        compactions: Array<{
            id: string;
            conversationId: string;
            summary: string;
            compactedThroughMessageId: string | null;
            trigger: 'auto' | 'manual';
            provider: string;
            model: string;
            originalTokenEstimate: number;
            compactedTokenEstimate: number;
            createdAt: string;
        }>;
    };
};

export type GetChatConversationResponse = GetChatConversationResponses[keyof GetChatConversationResponses];

export type UpdateChatConversationData = {
    body: {
        title?: string | null;
        modelId?: string | null;
        chatApiKeyId?: string | null;
        agentId?: string;
        artifact?: string | null;
        pinnedAt?: string | null;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/chat/conversations/{id}';
};

export type UpdateChatConversationErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateChatConversationError = UpdateChatConversationErrors[keyof UpdateChatConversationErrors];

export type UpdateChatConversationResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        userId: string;
        organizationId: string;
        agentId: string | null;
        chatApiKeyId: string | null;
        title: string | null;
        selectedModel: string;
        selectedProvider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        modelId: string | null;
        hasCustomToolSelection: boolean;
        todoList: string | number | boolean | null | {
            [key: string]: unknown;
        } | Array<unknown> | null;
        artifact: string | null;
        pinnedAt: string | null;
        createdAt: string;
        updatedAt: string;
        agent: {
            id: string;
            name: string;
            systemPrompt: string | null;
            agentType: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
            llmApiKeyId: string | null;
        } | null;
        share: {
            id: string;
            visibility: 'organization' | 'team' | 'user';
        } | null;
        messages: Array<unknown>;
        chatErrors: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                    status?: number;
                    message?: string;
                    type?: string;
                    raw?: unknown;
                };
            };
            createdAt: string;
        }>;
        compactions: Array<{
            id: string;
            conversationId: string;
            summary: string;
            compactedThroughMessageId: string | null;
            trigger: 'auto' | 'manual';
            provider: string;
            model: string;
            originalTokenEstimate: number;
            compactedTokenEstimate: number;
            createdAt: string;
        }>;
    };
};

export type UpdateChatConversationResponse = UpdateChatConversationResponses[keyof UpdateChatConversationResponses];

export type ForkChatConversationData = {
    body: {
        agentId: string;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/chat/conversations/{id}/fork';
};

export type ForkChatConversationErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type ForkChatConversationError = ForkChatConversationErrors[keyof ForkChatConversationErrors];

export type ForkChatConversationResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        userId: string;
        organizationId: string;
        agentId: string | null;
        chatApiKeyId: string | null;
        title: string | null;
        selectedModel: string;
        selectedProvider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        modelId: string | null;
        hasCustomToolSelection: boolean;
        todoList: string | number | boolean | null | {
            [key: string]: unknown;
        } | Array<unknown> | null;
        artifact: string | null;
        pinnedAt: string | null;
        createdAt: string;
        updatedAt: string;
        agent: {
            id: string;
            name: string;
            systemPrompt: string | null;
            agentType: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
            llmApiKeyId: string | null;
        } | null;
        share: {
            id: string;
            visibility: 'organization' | 'team' | 'user';
        } | null;
        messages: Array<unknown>;
        chatErrors: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                    status?: number;
                    message?: string;
                    type?: string;
                    raw?: unknown;
                };
            };
            createdAt: string;
        }>;
        compactions: Array<{
            id: string;
            conversationId: string;
            summary: string;
            compactedThroughMessageId: string | null;
            trigger: 'auto' | 'manual';
            provider: string;
            model: string;
            originalTokenEstimate: number;
            compactedTokenEstimate: number;
            createdAt: string;
        }>;
    };
};

export type ForkChatConversationResponse = ForkChatConversationResponses[keyof ForkChatConversationResponses];

export type GetChatAgentMcpToolsData = {
    body?: never;
    path: {
        agentId: string;
    };
    query?: never;
    url: '/api/chat/agents/{agentId}/mcp-tools';
};

export type GetChatAgentMcpToolsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetChatAgentMcpToolsError = GetChatAgentMcpToolsErrors[keyof GetChatAgentMcpToolsErrors];

export type GetChatAgentMcpToolsResponses = {
    /**
     * Default Response
     */
    200: Array<{
        name: string;
        description: string;
        parameters: {
            [key: string]: unknown;
        } | null;
    }>;
};

export type GetChatAgentMcpToolsResponse = GetChatAgentMcpToolsResponses[keyof GetChatAgentMcpToolsResponses];

export type CompactChatConversationData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/chat/conversations/{id}/compact';
};

export type CompactChatConversationErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CompactChatConversationError = CompactChatConversationErrors[keyof CompactChatConversationErrors];

export type CompactChatConversationResponses = {
    /**
     * Default Response
     */
    200: {
        status: 'created' | 'existing' | 'skipped' | 'failed';
        reason?: string;
        compaction: {
            id: string;
            conversationId: string;
            summary: string;
            compactedThroughMessageId: string | null;
            trigger: 'auto' | 'manual';
            provider: string;
            model: string;
            originalTokenEstimate: number;
            compactedTokenEstimate: number;
            createdAt: string;
        } | null;
        conversation: {
            id: string;
            userId: string;
            organizationId: string;
            agentId: string | null;
            chatApiKeyId: string | null;
            title: string | null;
            selectedModel: string;
            selectedProvider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
            modelId: string | null;
            hasCustomToolSelection: boolean;
            todoList: string | number | boolean | null | {
                [key: string]: unknown;
            } | Array<unknown> | null;
            artifact: string | null;
            pinnedAt: string | null;
            createdAt: string;
            updatedAt: string;
            agent: {
                id: string;
                name: string;
                systemPrompt: string | null;
                agentType: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
                llmApiKeyId: string | null;
            } | null;
            share: {
                id: string;
                visibility: 'organization' | 'team' | 'user';
            } | null;
            messages: Array<unknown>;
            chatErrors: Array<{
                id: string;
                conversationId: string;
                error: {
                    code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                        status?: number;
                        message?: string;
                        type?: string;
                        raw?: unknown;
                    };
                };
                createdAt: string;
            }>;
            compactions: Array<{
                id: string;
                conversationId: string;
                summary: string;
                compactedThroughMessageId: string | null;
                trigger: 'auto' | 'manual';
                provider: string;
                model: string;
                originalTokenEstimate: number;
                compactedTokenEstimate: number;
                createdAt: string;
            }>;
        };
    };
};

export type CompactChatConversationResponse = CompactChatConversationResponses[keyof CompactChatConversationResponses];

export type UnshareConversationData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/chat/conversations/{id}/share';
};

export type UnshareConversationErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UnshareConversationError = UnshareConversationErrors[keyof UnshareConversationErrors];

export type UnshareConversationResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type UnshareConversationResponse = UnshareConversationResponses[keyof UnshareConversationResponses];

export type GetConversationShareData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/chat/conversations/{id}/share';
};

export type GetConversationShareErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetConversationShareError = GetConversationShareErrors[keyof GetConversationShareErrors];

export type GetConversationShareResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        conversationId: string;
        organizationId: string;
        createdByUserId: string;
        visibility: 'organization' | 'team' | 'user';
        createdAt: string;
        teamIds: Array<string>;
        userIds: Array<string>;
    } | null;
};

export type GetConversationShareResponse = GetConversationShareResponses[keyof GetConversationShareResponses];

export type ShareConversationData = {
    body: {
        visibility: 'organization' | 'team' | 'user';
        teamIds?: Array<string>;
        userIds?: Array<string>;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/chat/conversations/{id}/share';
};

export type ShareConversationErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type ShareConversationError = ShareConversationErrors[keyof ShareConversationErrors];

export type ShareConversationResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        conversationId: string;
        organizationId: string;
        createdByUserId: string;
        visibility: 'organization' | 'team' | 'user';
        createdAt: string;
        teamIds: Array<string>;
        userIds: Array<string>;
    };
};

export type ShareConversationResponse = ShareConversationResponses[keyof ShareConversationResponses];

export type GetSharedConversationData = {
    body?: never;
    path: {
        shareId: string;
    };
    query?: never;
    url: '/api/chat/shared/{shareId}';
};

export type GetSharedConversationErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetSharedConversationError = GetSharedConversationErrors[keyof GetSharedConversationErrors];

export type GetSharedConversationResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        userId: string;
        organizationId: string;
        agentId: string | null;
        chatApiKeyId: string | null;
        title: string | null;
        selectedModel: string;
        selectedProvider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        modelId: string | null;
        hasCustomToolSelection: boolean;
        todoList: string | number | boolean | null | {
            [key: string]: unknown;
        } | Array<unknown> | null;
        artifact: string | null;
        pinnedAt: string | null;
        createdAt: string;
        updatedAt: string;
        agent: {
            id: string;
            name: string;
            systemPrompt: string | null;
            agentType: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
            llmApiKeyId: string | null;
        } | null;
        share: {
            id: string;
            visibility: 'organization' | 'team' | 'user';
        } | null;
        messages: Array<unknown>;
        chatErrors: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                    status?: number;
                    message?: string;
                    type?: string;
                    raw?: unknown;
                };
            };
            createdAt: string;
        }>;
        compactions: Array<{
            id: string;
            conversationId: string;
            summary: string;
            compactedThroughMessageId: string | null;
            trigger: 'auto' | 'manual';
            provider: string;
            model: string;
            originalTokenEstimate: number;
            compactedTokenEstimate: number;
            createdAt: string;
        }>;
        sharedByUserId: string;
    };
};

export type GetSharedConversationResponse = GetSharedConversationResponses[keyof GetSharedConversationResponses];

export type ForkSharedConversationData = {
    body: {
        agentId: string;
    };
    path: {
        shareId: string;
    };
    query?: never;
    url: '/api/chat/shared/{shareId}/fork';
};

export type ForkSharedConversationErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type ForkSharedConversationError = ForkSharedConversationErrors[keyof ForkSharedConversationErrors];

export type ForkSharedConversationResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        userId: string;
        organizationId: string;
        agentId: string | null;
        chatApiKeyId: string | null;
        title: string | null;
        selectedModel: string;
        selectedProvider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        modelId: string | null;
        hasCustomToolSelection: boolean;
        todoList: string | number | boolean | null | {
            [key: string]: unknown;
        } | Array<unknown> | null;
        artifact: string | null;
        pinnedAt: string | null;
        createdAt: string;
        updatedAt: string;
        agent: {
            id: string;
            name: string;
            systemPrompt: string | null;
            agentType: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
            llmApiKeyId: string | null;
        } | null;
        share: {
            id: string;
            visibility: 'organization' | 'team' | 'user';
        } | null;
        messages: Array<unknown>;
        chatErrors: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                    status?: number;
                    message?: string;
                    type?: string;
                    raw?: unknown;
                };
            };
            createdAt: string;
        }>;
        compactions: Array<{
            id: string;
            conversationId: string;
            summary: string;
            compactedThroughMessageId: string | null;
            trigger: 'auto' | 'manual';
            provider: string;
            model: string;
            originalTokenEstimate: number;
            compactedTokenEstimate: number;
            createdAt: string;
        }>;
    };
};

export type ForkSharedConversationResponse = ForkSharedConversationResponses[keyof ForkSharedConversationResponses];

export type GenerateChatConversationTitleData = {
    body: {
        /**
         * Force regeneration even if title already exists (for manual regeneration)
         */
        regenerate?: boolean;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/chat/conversations/{id}/generate-title';
};

export type GenerateChatConversationTitleErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GenerateChatConversationTitleError = GenerateChatConversationTitleErrors[keyof GenerateChatConversationTitleErrors];

export type GenerateChatConversationTitleResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        userId: string;
        organizationId: string;
        agentId: string | null;
        chatApiKeyId: string | null;
        title: string | null;
        selectedModel: string;
        selectedProvider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        modelId: string | null;
        hasCustomToolSelection: boolean;
        todoList: string | number | boolean | null | {
            [key: string]: unknown;
        } | Array<unknown> | null;
        artifact: string | null;
        pinnedAt: string | null;
        createdAt: string;
        updatedAt: string;
        agent: {
            id: string;
            name: string;
            systemPrompt: string | null;
            agentType: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
            llmApiKeyId: string | null;
        } | null;
        share: {
            id: string;
            visibility: 'organization' | 'team' | 'user';
        } | null;
        messages: Array<unknown>;
        chatErrors: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                    status?: number;
                    message?: string;
                    type?: string;
                    raw?: unknown;
                };
            };
            createdAt: string;
        }>;
        compactions: Array<{
            id: string;
            conversationId: string;
            summary: string;
            compactedThroughMessageId: string | null;
            trigger: 'auto' | 'manual';
            provider: string;
            model: string;
            originalTokenEstimate: number;
            compactedTokenEstimate: number;
            createdAt: string;
        }>;
    };
};

export type GenerateChatConversationTitleResponse = GenerateChatConversationTitleResponses[keyof GenerateChatConversationTitleResponses];

export type UpdateChatMessageData = {
    body: {
        partIndex: number;
        text: string;
        deleteSubsequentMessages?: boolean;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/chat/messages/{id}';
};

export type UpdateChatMessageErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateChatMessageError = UpdateChatMessageErrors[keyof UpdateChatMessageErrors];

export type UpdateChatMessageResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        userId: string;
        organizationId: string;
        agentId: string | null;
        chatApiKeyId: string | null;
        title: string | null;
        selectedModel: string;
        selectedProvider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        modelId: string | null;
        hasCustomToolSelection: boolean;
        todoList: string | number | boolean | null | {
            [key: string]: unknown;
        } | Array<unknown> | null;
        artifact: string | null;
        pinnedAt: string | null;
        createdAt: string;
        updatedAt: string;
        agent: {
            id: string;
            name: string;
            systemPrompt: string | null;
            agentType: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
            llmApiKeyId: string | null;
        } | null;
        share: {
            id: string;
            visibility: 'organization' | 'team' | 'user';
        } | null;
        messages: Array<unknown>;
        chatErrors: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                    status?: number;
                    message?: string;
                    type?: string;
                    raw?: unknown;
                };
            };
            createdAt: string;
        }>;
        compactions: Array<{
            id: string;
            conversationId: string;
            summary: string;
            compactedThroughMessageId: string | null;
            trigger: 'auto' | 'manual';
            provider: string;
            model: string;
            originalTokenEstimate: number;
            compactedTokenEstimate: number;
            createdAt: string;
        }>;
    };
};

export type UpdateChatMessageResponse = UpdateChatMessageResponses[keyof UpdateChatMessageResponses];

export type DeleteConversationEnabledToolsData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/chat/conversations/{id}/enabled-tools';
};

export type DeleteConversationEnabledToolsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeleteConversationEnabledToolsError = DeleteConversationEnabledToolsErrors[keyof DeleteConversationEnabledToolsErrors];

export type DeleteConversationEnabledToolsResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type DeleteConversationEnabledToolsResponse = DeleteConversationEnabledToolsResponses[keyof DeleteConversationEnabledToolsResponses];

export type GetConversationEnabledToolsData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/chat/conversations/{id}/enabled-tools';
};

export type GetConversationEnabledToolsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetConversationEnabledToolsError = GetConversationEnabledToolsErrors[keyof GetConversationEnabledToolsErrors];

export type GetConversationEnabledToolsResponses = {
    /**
     * Default Response
     */
    200: {
        hasCustomSelection: boolean;
        enabledToolIds: Array<string>;
    };
};

export type GetConversationEnabledToolsResponse = GetConversationEnabledToolsResponses[keyof GetConversationEnabledToolsResponses];

export type UpdateConversationEnabledToolsData = {
    body: {
        toolIds: Array<string>;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/chat/conversations/{id}/enabled-tools';
};

export type UpdateConversationEnabledToolsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateConversationEnabledToolsError = UpdateConversationEnabledToolsErrors[keyof UpdateConversationEnabledToolsErrors];

export type UpdateConversationEnabledToolsResponses = {
    /**
     * Default Response
     */
    200: {
        hasCustomSelection: boolean;
        enabledToolIds: Array<string>;
    };
};

export type UpdateConversationEnabledToolsResponse = UpdateConversationEnabledToolsResponses[keyof UpdateConversationEnabledToolsResponses];

export type PostApiWebhooksChatopsMsTeamsData = {
    body: unknown;
    path?: never;
    query?: never;
    url: '/api/webhooks/chatops/ms-teams';
};

export type PostApiWebhooksChatopsMsTeamsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: string;
        };
    };
    /**
     * Default Response
     */
    429: {
        error: {
            message: string;
            type: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: string;
        };
    };
};

export type PostApiWebhooksChatopsMsTeamsError = PostApiWebhooksChatopsMsTeamsErrors[keyof PostApiWebhooksChatopsMsTeamsErrors];

export type PostApiWebhooksChatopsMsTeamsResponses = {
    /**
     * Default Response
     */
    200: {
        status: string;
    } | {
        success: boolean;
    };
};

export type PostApiWebhooksChatopsMsTeamsResponse = PostApiWebhooksChatopsMsTeamsResponses[keyof PostApiWebhooksChatopsMsTeamsResponses];

export type PostApiWebhooksChatopsSlackData = {
    body: unknown;
    path?: never;
    query?: never;
    url: '/api/webhooks/chatops/slack';
};

export type PostApiWebhooksChatopsSlackErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: string;
        };
    };
    /**
     * Default Response
     */
    429: {
        error: {
            message: string;
            type: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: string;
        };
    };
};

export type PostApiWebhooksChatopsSlackError = PostApiWebhooksChatopsSlackErrors[keyof PostApiWebhooksChatopsSlackErrors];

export type PostApiWebhooksChatopsSlackResponses = {
    /**
     * Default Response
     */
    200: {
        challenge: string;
    } | {
        ok: boolean;
    };
};

export type PostApiWebhooksChatopsSlackResponse = PostApiWebhooksChatopsSlackResponses[keyof PostApiWebhooksChatopsSlackResponses];

export type PostApiWebhooksChatopsSlackInteractiveData = {
    body: unknown;
    path?: never;
    query?: never;
    url: '/api/webhooks/chatops/slack/interactive';
};

export type PostApiWebhooksChatopsSlackInteractiveErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: string;
        };
    };
    /**
     * Default Response
     */
    429: {
        error: {
            message: string;
            type: string;
        };
    };
};

export type PostApiWebhooksChatopsSlackInteractiveError = PostApiWebhooksChatopsSlackInteractiveErrors[keyof PostApiWebhooksChatopsSlackInteractiveErrors];

export type PostApiWebhooksChatopsSlackInteractiveResponses = {
    /**
     * Default Response
     */
    200: {
        ok: boolean;
    };
};

export type PostApiWebhooksChatopsSlackInteractiveResponse = PostApiWebhooksChatopsSlackInteractiveResponses[keyof PostApiWebhooksChatopsSlackInteractiveResponses];

export type PostApiWebhooksChatopsSlackSlashCommandData = {
    body: unknown;
    path?: never;
    query?: never;
    url: '/api/webhooks/chatops/slack/slash-command';
};

export type PostApiWebhooksChatopsSlackSlashCommandErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: string;
        };
    };
    /**
     * Default Response
     */
    429: {
        error: {
            message: string;
            type: string;
        };
    };
};

export type PostApiWebhooksChatopsSlackSlashCommandError = PostApiWebhooksChatopsSlackSlashCommandErrors[keyof PostApiWebhooksChatopsSlackSlashCommandErrors];

export type PostApiWebhooksChatopsSlackSlashCommandResponses = {
    /**
     * Default Response
     */
    200: unknown;
};

export type GetChatOpsStatusData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/chatops/status';
};

export type GetChatOpsStatusErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetChatOpsStatusError = GetChatOpsStatusErrors[keyof GetChatOpsStatusErrors];

export type GetChatOpsStatusResponses = {
    /**
     * Default Response
     */
    200: {
        providers: Array<{
            id: 'ms-teams' | 'slack';
            displayName: string;
            configured: boolean;
            credentials?: {
                botToken?: string;
                appId?: string;
                appSecret?: string;
                tenantId?: string;
                signingSecret?: string;
                appLevelToken?: string;
                connectionMode?: 'webhook' | 'socket';
            };
            dmInfo?: {
                botUserId?: string;
                teamId?: string;
                appId?: string;
            };
        }>;
    };
};

export type GetChatOpsStatusResponse = GetChatOpsStatusResponses[keyof GetChatOpsStatusResponses];

export type ListChatOpsBindingsData = {
    body?: never;
    path?: never;
    query?: {
        provider?: 'ms-teams' | 'slack';
        workspaceId?: string;
        search?: string;
        status?: 'configured' | 'unassigned';
        limit?: number;
        offset?: number;
        sortBy?: 'channelName' | 'createdAt';
        sortDirection?: 'asc' | 'desc';
    };
    url: '/api/chatops/bindings';
};

export type ListChatOpsBindingsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type ListChatOpsBindingsError = ListChatOpsBindingsErrors[keyof ListChatOpsBindingsErrors];

export type ListChatOpsBindingsResponses = {
    /**
     * Default Response
     */
    200: {
        data: Array<{
            id: string;
            organizationId: string;
            provider: 'ms-teams' | 'slack';
            channelId: string;
            workspaceId: string | null;
            channelName: string | null;
            workspaceName: string | null;
            isDm: boolean;
            dmOwnerEmail: string | null;
            agentId: string | null;
            createdAt: string;
            updatedAt: string;
        }>;
        pagination: {
            currentPage: number;
            limit: number;
            total: number;
            totalPages: number;
            hasNext: boolean;
            hasPrev: boolean;
        };
        counts: {
            configured: number;
            unassigned: number;
        };
        workspaces: Array<{
            id: string;
            name: string;
        }>;
        hasDmBinding: boolean;
    };
};

export type ListChatOpsBindingsResponse = ListChatOpsBindingsResponses[keyof ListChatOpsBindingsResponses];

export type BulkUpdateChatOpsBindingsData = {
    body: {
        ids: Array<string>;
        agentId: string | null;
    };
    path?: never;
    query?: never;
    url: '/api/chatops/bindings';
};

export type BulkUpdateChatOpsBindingsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type BulkUpdateChatOpsBindingsError = BulkUpdateChatOpsBindingsErrors[keyof BulkUpdateChatOpsBindingsErrors];

export type BulkUpdateChatOpsBindingsResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        organizationId: string;
        provider: 'ms-teams' | 'slack';
        channelId: string;
        workspaceId: string | null;
        channelName: string | null;
        workspaceName: string | null;
        isDm: boolean;
        dmOwnerEmail: string | null;
        agentId: string | null;
        createdAt: string;
        updatedAt: string;
    }>;
};

export type BulkUpdateChatOpsBindingsResponse = BulkUpdateChatOpsBindingsResponses[keyof BulkUpdateChatOpsBindingsResponses];

export type DeleteChatOpsBindingData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/chatops/bindings/{id}';
};

export type DeleteChatOpsBindingErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeleteChatOpsBindingError = DeleteChatOpsBindingErrors[keyof DeleteChatOpsBindingErrors];

export type DeleteChatOpsBindingResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type DeleteChatOpsBindingResponse = DeleteChatOpsBindingResponses[keyof DeleteChatOpsBindingResponses];

export type UpdateChatOpsBindingData = {
    body: {
        agentId?: string | null;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/chatops/bindings/{id}';
};

export type UpdateChatOpsBindingErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateChatOpsBindingError = UpdateChatOpsBindingErrors[keyof UpdateChatOpsBindingErrors];

export type UpdateChatOpsBindingResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        provider: 'ms-teams' | 'slack';
        channelId: string;
        workspaceId: string | null;
        channelName: string | null;
        workspaceName: string | null;
        isDm: boolean;
        dmOwnerEmail: string | null;
        agentId: string | null;
        createdAt: string;
        updatedAt: string;
    };
};

export type UpdateChatOpsBindingResponse = UpdateChatOpsBindingResponses[keyof UpdateChatOpsBindingResponses];

export type CreateChatOpsDmBindingData = {
    body: {
        provider: 'ms-teams' | 'slack';
        agentId: string | null;
    };
    path?: never;
    query?: never;
    url: '/api/chatops/bindings/dm';
};

export type CreateChatOpsDmBindingErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CreateChatOpsDmBindingError = CreateChatOpsDmBindingErrors[keyof CreateChatOpsDmBindingErrors];

export type CreateChatOpsDmBindingResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        provider: 'ms-teams' | 'slack';
        channelId: string;
        workspaceId: string | null;
        channelName: string | null;
        workspaceName: string | null;
        isDm: boolean;
        dmOwnerEmail: string | null;
        agentId: string | null;
        createdAt: string;
        updatedAt: string;
    };
};

export type CreateChatOpsDmBindingResponse = CreateChatOpsDmBindingResponses[keyof CreateChatOpsDmBindingResponses];

export type UpdateChatOpsConfigInQuickstartData = {
    body: {
        enabled?: boolean;
        appId?: string;
        appSecret?: string;
        tenantId?: string;
    };
    path?: never;
    query?: never;
    url: '/api/chatops/config/ms-teams';
};

export type UpdateChatOpsConfigInQuickstartErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateChatOpsConfigInQuickstartError = UpdateChatOpsConfigInQuickstartErrors[keyof UpdateChatOpsConfigInQuickstartErrors];

export type UpdateChatOpsConfigInQuickstartResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type UpdateChatOpsConfigInQuickstartResponse = UpdateChatOpsConfigInQuickstartResponses[keyof UpdateChatOpsConfigInQuickstartResponses];

export type UpdateSlackChatOpsConfigData = {
    body: {
        enabled?: boolean;
        botToken?: string;
        signingSecret?: string;
        appId?: string;
        connectionMode?: 'webhook' | 'socket';
        appLevelToken?: string;
    };
    path?: never;
    query?: never;
    url: '/api/chatops/config/slack';
};

export type UpdateSlackChatOpsConfigErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateSlackChatOpsConfigError = UpdateSlackChatOpsConfigErrors[keyof UpdateSlackChatOpsConfigErrors];

export type UpdateSlackChatOpsConfigResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type UpdateSlackChatOpsConfigResponse = UpdateSlackChatOpsConfigResponses[keyof UpdateSlackChatOpsConfigResponses];

export type RefreshChatOpsChannelDiscoveryData = {
    body: {
        provider: 'ms-teams' | 'slack';
    };
    path?: never;
    query?: never;
    url: '/api/chatops/channel-discovery/refresh';
};

export type RefreshChatOpsChannelDiscoveryErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type RefreshChatOpsChannelDiscoveryError = RefreshChatOpsChannelDiscoveryErrors[keyof RefreshChatOpsChannelDiscoveryErrors];

export type RefreshChatOpsChannelDiscoveryResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type RefreshChatOpsChannelDiscoveryResponse = RefreshChatOpsChannelDiscoveryResponses[keyof RefreshChatOpsChannelDiscoveryResponses];

export type CohereChatWithDefaultAgentData = {
    body: CohereChatRequestInput;
    headers?: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for API auth
         */
        authorization?: string;
    };
    path?: never;
    query?: never;
    url: '/v1/cohere/chat';
};

export type CohereChatWithDefaultAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CohereChatWithDefaultAgentError = CohereChatWithDefaultAgentErrors[keyof CohereChatWithDefaultAgentErrors];

export type CohereChatWithDefaultAgentResponses = {
    /**
     * Default Response
     */
    200: CohereChatResponse;
};

export type CohereChatWithDefaultAgentResponse = CohereChatWithDefaultAgentResponses[keyof CohereChatWithDefaultAgentResponses];

export type CohereChatWithAgentData = {
    body: CohereChatRequestInput;
    headers?: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for API auth
         */
        authorization?: string;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/cohere/{agentId}/chat';
};

export type CohereChatWithAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CohereChatWithAgentError = CohereChatWithAgentErrors[keyof CohereChatWithAgentErrors];

export type CohereChatWithAgentResponses = {
    /**
     * Default Response
     */
    200: CohereChatResponse;
};

export type CohereChatWithAgentResponse = CohereChatWithAgentResponses[keyof CohereChatWithAgentResponses];

export type GetPublicConfigData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/config/public';
};

export type GetPublicConfigResponses = {
    /**
     * Default Response
     */
    200: {
        disableBasicAuth: boolean;
        disableInvitations: boolean;
        analytics: {
            enabled: boolean;
            posthog: {
                key: string;
                host: string;
            };
        };
    };
};

export type GetPublicConfigResponse = GetPublicConfigResponses[keyof GetPublicConfigResponses];

export type GetConfigData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/config';
};

export type GetConfigResponses = {
    /**
     * Default Response
     */
    200: {
        enterpriseFeatures: {
            core: boolean;
            knowledgeBase: boolean;
            fullWhiteLabeling: boolean;
        };
        features: {
            orchestratorK8sRuntime: boolean;
            advancedToolFeaturesEnabled: boolean;
            byosEnabled: boolean;
            byosVaultKvVersion: '1' | '2';
            azureOpenAiEntraIdEnabled: boolean;
            bedrockIamAuthEnabled: boolean;
            geminiVertexAiEnabled: boolean;
            globalToolPolicy: 'permissive' | 'restrictive';
            incomingEmail: {
                enabled: boolean;
                provider?: 'outlook';
                displayName?: string;
                emailDomain?: string;
            };
            mcpServerBaseImage: string;
            orchestratorK8sNamespace: string;
            isQuickstart: boolean;
            ngrokDomain: string;
            virtualKeyDefaultExpirationSeconds: number;
            mcpSandboxDomain: string | null;
        };
        providerBaseUrls: {
            [key: string]: string | null;
        };
    };
};

export type GetConfigResponse = GetConfigResponses[keyof GetConfigResponses];

export type DeepseekChatCompletionsWithDefaultAgentData = {
    body: DeepSeekChatCompletionRequestInput;
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path?: never;
    query?: never;
    url: '/v1/deepseek/chat/completions';
};

export type DeepseekChatCompletionsWithDefaultAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeepseekChatCompletionsWithDefaultAgentError = DeepseekChatCompletionsWithDefaultAgentErrors[keyof DeepseekChatCompletionsWithDefaultAgentErrors];

export type DeepseekChatCompletionsWithDefaultAgentResponses = {
    /**
     * Default Response
     */
    200: DeepSeekChatCompletionResponse;
};

export type DeepseekChatCompletionsWithDefaultAgentResponse = DeepseekChatCompletionsWithDefaultAgentResponses[keyof DeepseekChatCompletionsWithDefaultAgentResponses];

export type DeepseekChatCompletionsWithAgentData = {
    body: DeepSeekChatCompletionRequestInput;
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/deepseek/{agentId}/chat/completions';
};

export type DeepseekChatCompletionsWithAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeepseekChatCompletionsWithAgentError = DeepseekChatCompletionsWithAgentErrors[keyof DeepseekChatCompletionsWithAgentErrors];

export type DeepseekChatCompletionsWithAgentResponses = {
    /**
     * Default Response
     */
    200: DeepSeekChatCompletionResponse;
};

export type DeepseekChatCompletionsWithAgentResponse = DeepseekChatCompletionsWithAgentResponses[keyof DeepseekChatCompletionsWithAgentResponses];

export type PostV1GeminiV1BetaModelsByModelGenerateContentData = {
    body: GeminiGenerateContentRequestInput;
    headers?: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * API key for Google Gemini. Required for Google AI Studio mode, optional for Vertex AI mode (uses ADC).
         */
        'x-goog-api-key'?: string;
    };
    path: {
        /**
         * The model to use
         */
        model: string;
    };
    query?: never;
    url: '/v1/gemini/v1beta/models/{model}:generateContent';
};

export type PostV1GeminiV1BetaModelsByModelGenerateContentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type PostV1GeminiV1BetaModelsByModelGenerateContentError = PostV1GeminiV1BetaModelsByModelGenerateContentErrors[keyof PostV1GeminiV1BetaModelsByModelGenerateContentErrors];

export type PostV1GeminiV1BetaModelsByModelGenerateContentResponses = {
    /**
     * Default Response
     */
    200: GeminiGenerateContentResponse;
};

export type PostV1GeminiV1BetaModelsByModelGenerateContentResponse = PostV1GeminiV1BetaModelsByModelGenerateContentResponses[keyof PostV1GeminiV1BetaModelsByModelGenerateContentResponses];

export type PostV1GeminiV1BetaModelsByModelStreamGenerateContentData = {
    body: GeminiGenerateContentRequestInput;
    headers?: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * API key for Google Gemini. Required for Google AI Studio mode, optional for Vertex AI mode (uses ADC).
         */
        'x-goog-api-key'?: string;
    };
    path: {
        /**
         * The model to use
         */
        model: string;
    };
    query?: never;
    url: '/v1/gemini/v1beta/models/{model}:streamGenerateContent';
};

export type PostV1GeminiV1BetaModelsByModelStreamGenerateContentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type PostV1GeminiV1BetaModelsByModelStreamGenerateContentError = PostV1GeminiV1BetaModelsByModelStreamGenerateContentErrors[keyof PostV1GeminiV1BetaModelsByModelStreamGenerateContentErrors];

export type PostV1GeminiByAgentIdV1BetaModelsByModelGenerateContentData = {
    body: GeminiGenerateContentRequestInput;
    headers?: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * API key for Google Gemini. Required for Google AI Studio mode, optional for Vertex AI mode (uses ADC).
         */
        'x-goog-api-key'?: string;
    };
    path: {
        agentId: string;
        /**
         * The model to use
         */
        model: string;
    };
    query?: never;
    url: '/v1/gemini/{agentId}/v1beta/models/{model}:generateContent';
};

export type PostV1GeminiByAgentIdV1BetaModelsByModelGenerateContentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type PostV1GeminiByAgentIdV1BetaModelsByModelGenerateContentError = PostV1GeminiByAgentIdV1BetaModelsByModelGenerateContentErrors[keyof PostV1GeminiByAgentIdV1BetaModelsByModelGenerateContentErrors];

export type PostV1GeminiByAgentIdV1BetaModelsByModelGenerateContentResponses = {
    /**
     * Default Response
     */
    200: GeminiGenerateContentResponse;
};

export type PostV1GeminiByAgentIdV1BetaModelsByModelGenerateContentResponse = PostV1GeminiByAgentIdV1BetaModelsByModelGenerateContentResponses[keyof PostV1GeminiByAgentIdV1BetaModelsByModelGenerateContentResponses];

export type PostV1GeminiByAgentIdV1BetaModelsByModelStreamGenerateContentData = {
    body: GeminiGenerateContentRequestInput;
    headers?: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * API key for Google Gemini. Required for Google AI Studio mode, optional for Vertex AI mode (uses ADC).
         */
        'x-goog-api-key'?: string;
    };
    path: {
        agentId: string;
        /**
         * The model to use
         */
        model: string;
    };
    query?: never;
    url: '/v1/gemini/{agentId}/v1beta/models/{model}:streamGenerateContent';
};

export type PostV1GeminiByAgentIdV1BetaModelsByModelStreamGenerateContentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type PostV1GeminiByAgentIdV1BetaModelsByModelStreamGenerateContentError = PostV1GeminiByAgentIdV1BetaModelsByModelStreamGenerateContentErrors[keyof PostV1GeminiByAgentIdV1BetaModelsByModelStreamGenerateContentErrors];

export type GroqChatCompletionsWithDefaultAgentData = {
    body: XaiChatCompletionRequestInput;
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path?: never;
    query?: never;
    url: '/v1/groq/chat/completions';
};

export type GroqChatCompletionsWithDefaultAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GroqChatCompletionsWithDefaultAgentError = GroqChatCompletionsWithDefaultAgentErrors[keyof GroqChatCompletionsWithDefaultAgentErrors];

export type GroqChatCompletionsWithDefaultAgentResponses = {
    /**
     * Default Response
     */
    200: GroqChatCompletionResponse;
};

export type GroqChatCompletionsWithDefaultAgentResponse = GroqChatCompletionsWithDefaultAgentResponses[keyof GroqChatCompletionsWithDefaultAgentResponses];

export type GroqChatCompletionsWithAgentData = {
    body: XaiChatCompletionRequestInput;
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/groq/{agentId}/chat/completions';
};

export type GroqChatCompletionsWithAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GroqChatCompletionsWithAgentError = GroqChatCompletionsWithAgentErrors[keyof GroqChatCompletionsWithAgentErrors];

export type GroqChatCompletionsWithAgentResponses = {
    /**
     * Default Response
     */
    200: GroqChatCompletionResponse;
};

export type GroqChatCompletionsWithAgentResponse = GroqChatCompletionsWithAgentResponses[keyof GroqChatCompletionsWithAgentResponses];

export type GetHealthData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/health';
};

export type GetHealthResponses = {
    /**
     * Default Response
     */
    200: {
        name: string;
        status: string;
        version: string;
    };
};

export type GetHealthResponse = GetHealthResponses[keyof GetHealthResponses];

export type GetReadyData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/ready';
};

export type GetReadyErrors = {
    /**
     * Default Response
     */
    503: {
        name: string;
        status: string;
        version: string;
        database: string;
    };
};

export type GetReadyError = GetReadyErrors[keyof GetReadyErrors];

export type GetReadyResponses = {
    /**
     * Default Response
     */
    200: {
        name: string;
        status: string;
        version: string;
        database: string;
    };
};

export type GetReadyResponse = GetReadyResponses[keyof GetReadyResponses];

export type PostApiWebhooksIncomingEmailData = {
    body: unknown;
    path?: never;
    query?: never;
    url: '/api/webhooks/incoming-email';
};

export type PostApiWebhooksIncomingEmailErrors = {
    /**
     * Default Response
     */
    400: {
        error: string;
    };
    /**
     * Default Response
     */
    429: {
        error: string;
    };
    /**
     * Default Response
     */
    500: {
        error: string;
    };
};

export type PostApiWebhooksIncomingEmailError = PostApiWebhooksIncomingEmailErrors[keyof PostApiWebhooksIncomingEmailErrors];

export type PostApiWebhooksIncomingEmailResponses = {
    /**
     * Default Response
     */
    200: string | {
        success: boolean;
        processed?: number;
        errors?: number;
    };
};

export type PostApiWebhooksIncomingEmailResponse = PostApiWebhooksIncomingEmailResponses[keyof PostApiWebhooksIncomingEmailResponses];

export type GetAgentEmailAddressData = {
    body?: never;
    path: {
        agentId: string;
    };
    query?: never;
    url: '/api/agents/{agentId}/email-address';
};

export type GetAgentEmailAddressErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetAgentEmailAddressError = GetAgentEmailAddressErrors[keyof GetAgentEmailAddressErrors];

export type GetAgentEmailAddressResponses = {
    /**
     * Default Response
     */
    200: {
        providerEnabled: boolean;
        emailAddress: string | null;
        agentIncomingEmailEnabled: boolean;
        agentSecurityMode: 'private' | 'internal' | 'public';
        agentAllowedDomain: string | null;
    };
};

export type GetAgentEmailAddressResponse = GetAgentEmailAddressResponses[keyof GetAgentEmailAddressResponses];

export type GetIncomingEmailStatusData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/incoming-email/status';
};

export type GetIncomingEmailStatusErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetIncomingEmailStatusError = GetIncomingEmailStatusErrors[keyof GetIncomingEmailStatusErrors];

export type GetIncomingEmailStatusResponses = {
    /**
     * Default Response
     */
    200: {
        isActive: boolean;
        subscription: {
            id: string;
            subscriptionId: string;
            provider: string;
            webhookUrl: string;
            expiresAt: string;
        } | null;
    };
};

export type GetIncomingEmailStatusResponse = GetIncomingEmailStatusResponses[keyof GetIncomingEmailStatusResponses];

export type SetupIncomingEmailWebhookData = {
    body: {
        webhookUrl: string;
    };
    path?: never;
    query?: never;
    url: '/api/incoming-email/setup';
};

export type SetupIncomingEmailWebhookErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type SetupIncomingEmailWebhookError = SetupIncomingEmailWebhookErrors[keyof SetupIncomingEmailWebhookErrors];

export type SetupIncomingEmailWebhookResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
        subscriptionId?: string;
        expiresAt?: string;
        message?: string;
    };
};

export type SetupIncomingEmailWebhookResponse = SetupIncomingEmailWebhookResponses[keyof SetupIncomingEmailWebhookResponses];

export type RenewIncomingEmailSubscriptionData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/incoming-email/renew';
};

export type RenewIncomingEmailSubscriptionErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type RenewIncomingEmailSubscriptionError = RenewIncomingEmailSubscriptionErrors[keyof RenewIncomingEmailSubscriptionErrors];

export type RenewIncomingEmailSubscriptionResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
        subscriptionId?: string;
        expiresAt?: string;
        message?: string;
    };
};

export type RenewIncomingEmailSubscriptionResponse = RenewIncomingEmailSubscriptionResponses[keyof RenewIncomingEmailSubscriptionResponses];

export type DeleteIncomingEmailSubscriptionData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/incoming-email/subscription';
};

export type DeleteIncomingEmailSubscriptionErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeleteIncomingEmailSubscriptionError = DeleteIncomingEmailSubscriptionErrors[keyof DeleteIncomingEmailSubscriptionErrors];

export type DeleteIncomingEmailSubscriptionResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type DeleteIncomingEmailSubscriptionResponse = DeleteIncomingEmailSubscriptionResponses[keyof DeleteIncomingEmailSubscriptionResponses];

export type GetInteractionsData = {
    body?: never;
    path?: never;
    query?: {
        /**
         * Filter by profile ID (internal Archestra profile)
         */
        profileId?: string;
        /**
         * Filter by external agent ID (from X-Archestra-Agent-Id header)
         */
        externalAgentId?: string;
        /**
         * Filter by user ID (from X-Archestra-User-Id header)
         */
        userId?: string;
        /**
         * Filter by session ID
         */
        sessionId?: string;
        /**
         * Filter by start date (ISO 8601 format)
         */
        startDate?: string;
        /**
         * Filter by end date (ISO 8601 format)
         */
        endDate?: string;
        limit?: number;
        offset?: number;
        sortBy?: 'createdAt' | 'profileId' | 'externalAgentId' | 'model' | 'userId';
        sortDirection?: 'asc' | 'desc';
    };
    url: '/api/interactions';
};

export type GetInteractionsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetInteractionsError = GetInteractionsErrors[keyof GetInteractionsErrors];

export type GetInteractionsResponses = {
    /**
     * Default Response
     */
    200: {
        data: Array<{
            id: string;
            profileId: string | null;
            externalAgentId: string | null;
            executionId: string | null;
            userId: string | null;
            virtualKeyId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
            authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: XaiChatCompletionRequest;
            processedRequest?: XaiChatCompletionRequest | null;
            response: OpenAiChatCompletionResponse;
            dualLlmAnalyses?: Array<{
                toolCallId: string;
                conversations: Array<{
                    role: 'user' | 'assistant';
                    content: string;
                }>;
                result: string;
            }> | null;
            unsafeContextBoundary?: {
                kind: 'preexisting_untrusted';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            } | {
                kind: 'tool_result';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
                toolCallId: string;
                toolName: string;
            } | null;
            type: 'openai:chatCompletions';
            model: string | null;
            baselineModel: string | null;
            inputTokens: number | null;
            outputTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            toonTokensBefore: number | null;
            toonTokensAfter: number | null;
            toonCostSavings: string | null;
            toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
            createdAt: string;
            chatErrors?: Array<{
                id: string;
                conversationId: string;
                error: {
                    code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                        status?: number;
                        message?: string;
                        type?: string;
                        raw?: unknown;
                    };
                };
                createdAt: string;
            }>;
            requestType?: 'main' | 'subagent';
            externalAgentIdLabel?: string | null;
        } | {
            id: string;
            profileId: string | null;
            externalAgentId: string | null;
            executionId: string | null;
            userId: string | null;
            virtualKeyId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
            authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            /**
             * https://developers.openai.com/api/reference/resources/responses/methods/create
             */
            request: {
                model: string;
                input?: string | Array<{
                    type: string;
                    [key: string]: unknown;
                }>;
                instructions?: string | null;
                max_output_tokens?: number | null;
                metadata?: {
                    [key: string]: string;
                } | null;
                previous_response_id?: string | null;
                stream?: boolean | null;
                temperature?: number | null;
                text?: unknown;
                tool_choice?: unknown;
                tools?: Array<{
                    type: 'function';
                    name: string;
                    description?: string | null;
                    parameters?: {
                        [key: string]: unknown;
                    } | null;
                    strict?: boolean | null;
                    [key: string]: unknown;
                } | {
                    type: string;
                    [key: string]: unknown;
                }>;
                top_p?: number | null;
                user?: string;
                [key: string]: unknown;
            };
            /**
             * https://developers.openai.com/api/reference/resources/responses/methods/create
             */
            processedRequest?: {
                model: string;
                input?: string | Array<{
                    type: string;
                    [key: string]: unknown;
                }>;
                instructions?: string | null;
                max_output_tokens?: number | null;
                metadata?: {
                    [key: string]: string;
                } | null;
                previous_response_id?: string | null;
                stream?: boolean | null;
                temperature?: number | null;
                text?: unknown;
                tool_choice?: unknown;
                tools?: Array<{
                    type: 'function';
                    name: string;
                    description?: string | null;
                    parameters?: {
                        [key: string]: unknown;
                    } | null;
                    strict?: boolean | null;
                    [key: string]: unknown;
                } | {
                    type: string;
                    [key: string]: unknown;
                }>;
                top_p?: number | null;
                user?: string;
                [key: string]: unknown;
            } | null;
            /**
             * https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)
             */
            response: {
                id: string;
                object: 'response';
                created_at: number;
                model: string;
                output: Array<{
                    id: string;
                    type: 'message';
                    role: 'assistant';
                    status: string;
                    content: Array<{
                        type: 'output_text';
                        text: string;
                        [key: string]: unknown;
                    } | {
                        type: 'refusal';
                        refusal: string;
                        [key: string]: unknown;
                    }>;
                    [key: string]: unknown;
                } | {
                    type: 'function_call';
                    id?: string;
                    call_id: string;
                    name: string;
                    arguments: string;
                    status?: string;
                    [key: string]: unknown;
                } | {
                    type: string;
                    [key: string]: unknown;
                }>;
                status: string;
                /**
                 * https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_usage%20%3E%20(schema)
                 */
                usage?: {
                    input_tokens: number;
                    output_tokens: number;
                    total_tokens: number;
                    [key: string]: unknown;
                };
                [key: string]: unknown;
            };
            dualLlmAnalyses?: Array<{
                toolCallId: string;
                conversations: Array<{
                    role: 'user' | 'assistant';
                    content: string;
                }>;
                result: string;
            }> | null;
            unsafeContextBoundary?: {
                kind: 'preexisting_untrusted';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            } | {
                kind: 'tool_result';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
                toolCallId: string;
                toolName: string;
            } | null;
            type: 'openai:responses';
            model: string | null;
            baselineModel: string | null;
            inputTokens: number | null;
            outputTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            toonTokensBefore: number | null;
            toonTokensAfter: number | null;
            toonCostSavings: string | null;
            toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
            createdAt: string;
            chatErrors?: Array<{
                id: string;
                conversationId: string;
                error: {
                    code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                        status?: number;
                        message?: string;
                        type?: string;
                        raw?: unknown;
                    };
                };
                createdAt: string;
            }>;
            requestType?: 'main' | 'subagent';
            externalAgentIdLabel?: string | null;
        } | {
            id: string;
            profileId: string | null;
            externalAgentId: string | null;
            executionId: string | null;
            userId: string | null;
            virtualKeyId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
            authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: {
                model: string;
                input: string | Array<string>;
                dimensions?: number;
                encoding_format?: 'float' | 'base64';
            };
            processedRequest?: {
                model: string;
                input: string | Array<string>;
                dimensions?: number;
                encoding_format?: 'float' | 'base64';
            } | null;
            response: {
                object: 'list';
                data: Array<{
                    object: 'embedding';
                    embedding: Array<number>;
                    index: number;
                }>;
                model: string;
                usage: {
                    prompt_tokens: number;
                    total_tokens: number;
                };
            };
            dualLlmAnalyses?: Array<{
                toolCallId: string;
                conversations: Array<{
                    role: 'user' | 'assistant';
                    content: string;
                }>;
                result: string;
            }> | null;
            unsafeContextBoundary?: {
                kind: 'preexisting_untrusted';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            } | {
                kind: 'tool_result';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
                toolCallId: string;
                toolName: string;
            } | null;
            type: 'openai:embeddings';
            model: string | null;
            baselineModel: string | null;
            inputTokens: number | null;
            outputTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            toonTokensBefore: number | null;
            toonTokensAfter: number | null;
            toonCostSavings: string | null;
            toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
            createdAt: string;
            chatErrors?: Array<{
                id: string;
                conversationId: string;
                error: {
                    code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                        status?: number;
                        message?: string;
                        type?: string;
                        raw?: unknown;
                    };
                };
                createdAt: string;
            }>;
        } | {
            id: string;
            profileId: string | null;
            externalAgentId: string | null;
            executionId: string | null;
            userId: string | null;
            virtualKeyId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
            authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: GeminiGenerateContentRequest;
            processedRequest?: GeminiGenerateContentRequest | null;
            response: GeminiGenerateContentResponse;
            dualLlmAnalyses?: Array<{
                toolCallId: string;
                conversations: Array<{
                    role: 'user' | 'assistant';
                    content: string;
                }>;
                result: string;
            }> | null;
            unsafeContextBoundary?: {
                kind: 'preexisting_untrusted';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            } | {
                kind: 'tool_result';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
                toolCallId: string;
                toolName: string;
            } | null;
            type: 'gemini:generateContent';
            model: string | null;
            baselineModel: string | null;
            inputTokens: number | null;
            outputTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            toonTokensBefore: number | null;
            toonTokensAfter: number | null;
            toonCostSavings: string | null;
            toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
            createdAt: string;
            chatErrors?: Array<{
                id: string;
                conversationId: string;
                error: {
                    code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                        status?: number;
                        message?: string;
                        type?: string;
                        raw?: unknown;
                    };
                };
                createdAt: string;
            }>;
            requestType?: 'main' | 'subagent';
            externalAgentIdLabel?: string | null;
        } | {
            id: string;
            profileId: string | null;
            externalAgentId: string | null;
            executionId: string | null;
            userId: string | null;
            virtualKeyId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
            authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: AnthropicMessagesRequest;
            processedRequest?: AnthropicMessagesRequest | null;
            response: AnthropicMessagesResponse;
            dualLlmAnalyses?: Array<{
                toolCallId: string;
                conversations: Array<{
                    role: 'user' | 'assistant';
                    content: string;
                }>;
                result: string;
            }> | null;
            unsafeContextBoundary?: {
                kind: 'preexisting_untrusted';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            } | {
                kind: 'tool_result';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
                toolCallId: string;
                toolName: string;
            } | null;
            type: 'anthropic:messages';
            model: string | null;
            baselineModel: string | null;
            inputTokens: number | null;
            outputTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            toonTokensBefore: number | null;
            toonTokensAfter: number | null;
            toonCostSavings: string | null;
            toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
            createdAt: string;
            chatErrors?: Array<{
                id: string;
                conversationId: string;
                error: {
                    code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                        status?: number;
                        message?: string;
                        type?: string;
                        raw?: unknown;
                    };
                };
                createdAt: string;
            }>;
            requestType?: 'main' | 'subagent';
            externalAgentIdLabel?: string | null;
        } | {
            id: string;
            profileId: string | null;
            externalAgentId: string | null;
            executionId: string | null;
            userId: string | null;
            virtualKeyId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
            authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: {
                modelId: string;
                messages?: Array<{
                    role: 'user' | 'assistant';
                    content: Array<{
                        text: string;
                    } | {
                        image: {
                            format: 'png' | 'jpeg' | 'gif' | 'webp';
                            source: {
                                bytes: string;
                            } | {
                                s3Location: {
                                    uri: string;
                                    bucketOwner?: string;
                                };
                            };
                        };
                    } | {
                        document: {
                            format: 'pdf' | 'csv' | 'doc' | 'docx' | 'xls' | 'xlsx' | 'html' | 'txt' | 'md';
                            name: string;
                            source: {
                                bytes: string;
                            } | {
                                s3Location: {
                                    uri: string;
                                    bucketOwner?: string;
                                };
                            };
                        };
                    } | {
                        guardContent: {
                            text: {
                                text: string;
                                qualifiers?: Array<'grounding_source' | 'query' | 'guard_content'>;
                            };
                        };
                    } | {
                        toolUse: {
                            toolUseId: string;
                            name: string;
                            input: {
                                [key: string]: unknown;
                            };
                        };
                    } | {
                        toolResult: {
                            toolUseId: string;
                            content: Array<{
                                text: string;
                            } | {
                                image: {
                                    format: 'png' | 'jpeg' | 'gif' | 'webp';
                                    source: {
                                        bytes: string;
                                    } | {
                                        s3Location: {
                                            uri: string;
                                            bucketOwner?: string;
                                        };
                                    };
                                };
                            } | {
                                json: {
                                    [key: string]: unknown;
                                };
                            } | {
                                document: {
                                    format: 'pdf' | 'csv' | 'doc' | 'docx' | 'xls' | 'xlsx' | 'html' | 'txt' | 'md';
                                    name: string;
                                    source: {
                                        bytes: string;
                                    } | {
                                        s3Location: {
                                            uri: string;
                                            bucketOwner?: string;
                                        };
                                    };
                                };
                            }>;
                            status?: 'success' | 'error';
                        };
                    }>;
                }>;
                system?: Array<{
                    text: string;
                } | {
                    guardContent: {
                        text: {
                            text: string;
                            qualifiers?: Array<'grounding_source' | 'query' | 'guard_content'>;
                        };
                    };
                }>;
                inferenceConfig?: {
                    maxTokens?: number;
                    temperature?: number;
                    topP?: number;
                    stopSequences?: Array<string>;
                };
                toolConfig?: {
                    tools: Array<{
                        toolSpec: {
                            name: string;
                            description?: string;
                            inputSchema: {
                                json: {
                                    [key: string]: unknown;
                                };
                            };
                        };
                    }>;
                    toolChoice?: {
                        tool: {
                            name: string;
                        };
                        [key: string]: unknown;
                    } | {
                        any: {
                            [key: string]: unknown;
                        };
                        [key: string]: unknown;
                    } | {
                        auto: {
                            [key: string]: unknown;
                        };
                        [key: string]: unknown;
                    };
                };
                guardrailConfig?: {
                    guardrailIdentifier: string;
                    guardrailVersion: string;
                    trace?: 'enabled' | 'disabled';
                };
                additionalModelRequestFields?: {
                    [key: string]: unknown;
                };
                additionalModelResponseFieldPaths?: Array<string>;
                promptVariables?: {
                    [key: string]: {
                        text: string;
                    } | {
                        json: {
                            [key: string]: unknown;
                        };
                    };
                };
                performanceConfig?: {
                    latency?: 'optimized';
                };
                serviceTier?: {
                    type?: 'default' | 'throughput';
                };
                requestMetadata?: {
                    [key: string]: string;
                };
                _isStreaming?: boolean;
            };
            processedRequest?: {
                modelId: string;
                messages?: Array<{
                    role: 'user' | 'assistant';
                    content: Array<{
                        text: string;
                    } | {
                        image: {
                            format: 'png' | 'jpeg' | 'gif' | 'webp';
                            source: {
                                bytes: string;
                            } | {
                                s3Location: {
                                    uri: string;
                                    bucketOwner?: string;
                                };
                            };
                        };
                    } | {
                        document: {
                            format: 'pdf' | 'csv' | 'doc' | 'docx' | 'xls' | 'xlsx' | 'html' | 'txt' | 'md';
                            name: string;
                            source: {
                                bytes: string;
                            } | {
                                s3Location: {
                                    uri: string;
                                    bucketOwner?: string;
                                };
                            };
                        };
                    } | {
                        guardContent: {
                            text: {
                                text: string;
                                qualifiers?: Array<'grounding_source' | 'query' | 'guard_content'>;
                            };
                        };
                    } | {
                        toolUse: {
                            toolUseId: string;
                            name: string;
                            input: {
                                [key: string]: unknown;
                            };
                        };
                    } | {
                        toolResult: {
                            toolUseId: string;
                            content: Array<{
                                text: string;
                            } | {
                                image: {
                                    format: 'png' | 'jpeg' | 'gif' | 'webp';
                                    source: {
                                        bytes: string;
                                    } | {
                                        s3Location: {
                                            uri: string;
                                            bucketOwner?: string;
                                        };
                                    };
                                };
                            } | {
                                json: {
                                    [key: string]: unknown;
                                };
                            } | {
                                document: {
                                    format: 'pdf' | 'csv' | 'doc' | 'docx' | 'xls' | 'xlsx' | 'html' | 'txt' | 'md';
                                    name: string;
                                    source: {
                                        bytes: string;
                                    } | {
                                        s3Location: {
                                            uri: string;
                                            bucketOwner?: string;
                                        };
                                    };
                                };
                            }>;
                            status?: 'success' | 'error';
                        };
                    }>;
                }>;
                system?: Array<{
                    text: string;
                } | {
                    guardContent: {
                        text: {
                            text: string;
                            qualifiers?: Array<'grounding_source' | 'query' | 'guard_content'>;
                        };
                    };
                }>;
                inferenceConfig?: {
                    maxTokens?: number;
                    temperature?: number;
                    topP?: number;
                    stopSequences?: Array<string>;
                };
                toolConfig?: {
                    tools: Array<{
                        toolSpec: {
                            name: string;
                            description?: string;
                            inputSchema: {
                                json: {
                                    [key: string]: unknown;
                                };
                            };
                        };
                    }>;
                    toolChoice?: {
                        tool: {
                            name: string;
                        };
                        [key: string]: unknown;
                    } | {
                        any: {
                            [key: string]: unknown;
                        };
                        [key: string]: unknown;
                    } | {
                        auto: {
                            [key: string]: unknown;
                        };
                        [key: string]: unknown;
                    };
                };
                guardrailConfig?: {
                    guardrailIdentifier: string;
                    guardrailVersion: string;
                    trace?: 'enabled' | 'disabled';
                };
                additionalModelRequestFields?: {
                    [key: string]: unknown;
                };
                additionalModelResponseFieldPaths?: Array<string>;
                promptVariables?: {
                    [key: string]: {
                        text: string;
                    } | {
                        json: {
                            [key: string]: unknown;
                        };
                    };
                };
                performanceConfig?: {
                    latency?: 'optimized';
                };
                serviceTier?: {
                    type?: 'default' | 'throughput';
                };
                requestMetadata?: {
                    [key: string]: string;
                };
                _isStreaming?: boolean;
            } | null;
            response: {
                $metadata?: {
                    httpStatusCode?: number;
                    requestId?: string;
                    attempts?: number;
                    totalRetryDelay?: number;
                };
                output: {
                    message?: {
                        role: 'assistant';
                        content: Array<{
                            text: string;
                        } | {
                            toolUse: {
                                toolUseId: string;
                                name: string;
                                input: {
                                    [key: string]: unknown;
                                };
                            };
                        }>;
                    };
                };
                stopReason: 'end_turn' | 'tool_use' | 'max_tokens' | 'stop_sequence' | 'guardrail_intervened' | 'content_filtered' | 'model_context_window_exceeded';
                usage: {
                    inputTokens: number;
                    outputTokens: number;
                    totalTokens?: number;
                    cacheReadInputTokens?: number;
                    cacheWriteInputTokens?: number;
                };
                metrics?: {
                    latencyMs?: number;
                };
                additionalModelResponseFields?: {
                    [key: string]: unknown;
                };
                trace?: {
                    guardrail?: {
                        inputAssessment?: {
                            [key: string]: unknown;
                        };
                        outputAssessments?: {
                            [key: string]: unknown;
                        };
                        modelOutput?: Array<string>;
                        actionReason?: string;
                    };
                    promptRouter?: {
                        invokedModelId?: string;
                    };
                };
                performanceConfig?: {
                    latency?: 'optimized';
                };
                serviceTier?: {
                    type?: 'default' | 'throughput';
                };
            };
            dualLlmAnalyses?: Array<{
                toolCallId: string;
                conversations: Array<{
                    role: 'user' | 'assistant';
                    content: string;
                }>;
                result: string;
            }> | null;
            unsafeContextBoundary?: {
                kind: 'preexisting_untrusted';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            } | {
                kind: 'tool_result';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
                toolCallId: string;
                toolName: string;
            } | null;
            type: 'bedrock:converse';
            model: string | null;
            baselineModel: string | null;
            inputTokens: number | null;
            outputTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            toonTokensBefore: number | null;
            toonTokensAfter: number | null;
            toonCostSavings: string | null;
            toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
            createdAt: string;
            chatErrors?: Array<{
                id: string;
                conversationId: string;
                error: {
                    code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                        status?: number;
                        message?: string;
                        type?: string;
                        raw?: unknown;
                    };
                };
                createdAt: string;
            }>;
            requestType?: 'main' | 'subagent';
            externalAgentIdLabel?: string | null;
        } | {
            id: string;
            profileId: string | null;
            externalAgentId: string | null;
            executionId: string | null;
            userId: string | null;
            virtualKeyId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
            authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: XaiChatCompletionRequest;
            processedRequest?: XaiChatCompletionRequest | null;
            response: CerebrasChatCompletionResponse;
            dualLlmAnalyses?: Array<{
                toolCallId: string;
                conversations: Array<{
                    role: 'user' | 'assistant';
                    content: string;
                }>;
                result: string;
            }> | null;
            unsafeContextBoundary?: {
                kind: 'preexisting_untrusted';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            } | {
                kind: 'tool_result';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
                toolCallId: string;
                toolName: string;
            } | null;
            type: 'cerebras:chatCompletions';
            model: string | null;
            baselineModel: string | null;
            inputTokens: number | null;
            outputTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            toonTokensBefore: number | null;
            toonTokensAfter: number | null;
            toonCostSavings: string | null;
            toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
            createdAt: string;
            chatErrors?: Array<{
                id: string;
                conversationId: string;
                error: {
                    code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                        status?: number;
                        message?: string;
                        type?: string;
                        raw?: unknown;
                    };
                };
                createdAt: string;
            }>;
            requestType?: 'main' | 'subagent';
            externalAgentIdLabel?: string | null;
        } | {
            id: string;
            profileId: string | null;
            externalAgentId: string | null;
            executionId: string | null;
            userId: string | null;
            virtualKeyId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
            authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: XaiChatCompletionRequest;
            processedRequest?: XaiChatCompletionRequest | null;
            response: MistralChatCompletionResponse;
            dualLlmAnalyses?: Array<{
                toolCallId: string;
                conversations: Array<{
                    role: 'user' | 'assistant';
                    content: string;
                }>;
                result: string;
            }> | null;
            unsafeContextBoundary?: {
                kind: 'preexisting_untrusted';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            } | {
                kind: 'tool_result';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
                toolCallId: string;
                toolName: string;
            } | null;
            type: 'mistral:chatCompletions';
            model: string | null;
            baselineModel: string | null;
            inputTokens: number | null;
            outputTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            toonTokensBefore: number | null;
            toonTokensAfter: number | null;
            toonCostSavings: string | null;
            toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
            createdAt: string;
            chatErrors?: Array<{
                id: string;
                conversationId: string;
                error: {
                    code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                        status?: number;
                        message?: string;
                        type?: string;
                        raw?: unknown;
                    };
                };
                createdAt: string;
            }>;
            requestType?: 'main' | 'subagent';
            externalAgentIdLabel?: string | null;
        } | {
            id: string;
            profileId: string | null;
            externalAgentId: string | null;
            executionId: string | null;
            userId: string | null;
            virtualKeyId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
            authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: XaiChatCompletionRequest;
            processedRequest?: XaiChatCompletionRequest | null;
            response: PerplexityChatCompletionResponse;
            dualLlmAnalyses?: Array<{
                toolCallId: string;
                conversations: Array<{
                    role: 'user' | 'assistant';
                    content: string;
                }>;
                result: string;
            }> | null;
            unsafeContextBoundary?: {
                kind: 'preexisting_untrusted';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            } | {
                kind: 'tool_result';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
                toolCallId: string;
                toolName: string;
            } | null;
            type: 'perplexity:chatCompletions';
            model: string | null;
            baselineModel: string | null;
            inputTokens: number | null;
            outputTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            toonTokensBefore: number | null;
            toonTokensAfter: number | null;
            toonCostSavings: string | null;
            toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
            createdAt: string;
            chatErrors?: Array<{
                id: string;
                conversationId: string;
                error: {
                    code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                        status?: number;
                        message?: string;
                        type?: string;
                        raw?: unknown;
                    };
                };
                createdAt: string;
            }>;
            requestType?: 'main' | 'subagent';
            externalAgentIdLabel?: string | null;
        } | {
            id: string;
            profileId: string | null;
            externalAgentId: string | null;
            executionId: string | null;
            userId: string | null;
            virtualKeyId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
            authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: XaiChatCompletionRequest;
            processedRequest?: XaiChatCompletionRequest | null;
            response: GroqChatCompletionResponse;
            dualLlmAnalyses?: Array<{
                toolCallId: string;
                conversations: Array<{
                    role: 'user' | 'assistant';
                    content: string;
                }>;
                result: string;
            }> | null;
            unsafeContextBoundary?: {
                kind: 'preexisting_untrusted';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            } | {
                kind: 'tool_result';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
                toolCallId: string;
                toolName: string;
            } | null;
            type: 'groq:chatCompletions';
            model: string | null;
            baselineModel: string | null;
            inputTokens: number | null;
            outputTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            toonTokensBefore: number | null;
            toonTokensAfter: number | null;
            toonCostSavings: string | null;
            toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
            createdAt: string;
            chatErrors?: Array<{
                id: string;
                conversationId: string;
                error: {
                    code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                        status?: number;
                        message?: string;
                        type?: string;
                        raw?: unknown;
                    };
                };
                createdAt: string;
            }>;
            requestType?: 'main' | 'subagent';
            externalAgentIdLabel?: string | null;
        } | {
            id: string;
            profileId: string | null;
            externalAgentId: string | null;
            executionId: string | null;
            userId: string | null;
            virtualKeyId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
            authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: XaiChatCompletionRequest;
            processedRequest?: XaiChatCompletionRequest | null;
            response: XaiChatCompletionResponse;
            dualLlmAnalyses?: Array<{
                toolCallId: string;
                conversations: Array<{
                    role: 'user' | 'assistant';
                    content: string;
                }>;
                result: string;
            }> | null;
            unsafeContextBoundary?: {
                kind: 'preexisting_untrusted';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            } | {
                kind: 'tool_result';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
                toolCallId: string;
                toolName: string;
            } | null;
            type: 'xai:chatCompletions';
            model: string | null;
            baselineModel: string | null;
            inputTokens: number | null;
            outputTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            toonTokensBefore: number | null;
            toonTokensAfter: number | null;
            toonCostSavings: string | null;
            toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
            createdAt: string;
            chatErrors?: Array<{
                id: string;
                conversationId: string;
                error: {
                    code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                        status?: number;
                        message?: string;
                        type?: string;
                        raw?: unknown;
                    };
                };
                createdAt: string;
            }>;
            requestType?: 'main' | 'subagent';
            externalAgentIdLabel?: string | null;
        } | {
            id: string;
            profileId: string | null;
            externalAgentId: string | null;
            executionId: string | null;
            userId: string | null;
            virtualKeyId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
            authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: XaiChatCompletionRequest;
            processedRequest?: XaiChatCompletionRequest | null;
            response: OpenrouterChatCompletionResponse;
            dualLlmAnalyses?: Array<{
                toolCallId: string;
                conversations: Array<{
                    role: 'user' | 'assistant';
                    content: string;
                }>;
                result: string;
            }> | null;
            unsafeContextBoundary?: {
                kind: 'preexisting_untrusted';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            } | {
                kind: 'tool_result';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
                toolCallId: string;
                toolName: string;
            } | null;
            type: 'openrouter:chatCompletions';
            model: string | null;
            baselineModel: string | null;
            inputTokens: number | null;
            outputTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            toonTokensBefore: number | null;
            toonTokensAfter: number | null;
            toonCostSavings: string | null;
            toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
            createdAt: string;
            chatErrors?: Array<{
                id: string;
                conversationId: string;
                error: {
                    code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                        status?: number;
                        message?: string;
                        type?: string;
                        raw?: unknown;
                    };
                };
                createdAt: string;
            }>;
            requestType?: 'main' | 'subagent';
            externalAgentIdLabel?: string | null;
        } | {
            id: string;
            profileId: string | null;
            externalAgentId: string | null;
            executionId: string | null;
            userId: string | null;
            virtualKeyId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
            authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: VllmChatCompletionRequest;
            processedRequest?: VllmChatCompletionRequest | null;
            response: VllmChatCompletionResponse;
            dualLlmAnalyses?: Array<{
                toolCallId: string;
                conversations: Array<{
                    role: 'user' | 'assistant';
                    content: string;
                }>;
                result: string;
            }> | null;
            unsafeContextBoundary?: {
                kind: 'preexisting_untrusted';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            } | {
                kind: 'tool_result';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
                toolCallId: string;
                toolName: string;
            } | null;
            type: 'vllm:chatCompletions';
            model: string | null;
            baselineModel: string | null;
            inputTokens: number | null;
            outputTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            toonTokensBefore: number | null;
            toonTokensAfter: number | null;
            toonCostSavings: string | null;
            toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
            createdAt: string;
            chatErrors?: Array<{
                id: string;
                conversationId: string;
                error: {
                    code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                        status?: number;
                        message?: string;
                        type?: string;
                        raw?: unknown;
                    };
                };
                createdAt: string;
            }>;
        } | {
            id: string;
            profileId: string | null;
            externalAgentId: string | null;
            executionId: string | null;
            userId: string | null;
            virtualKeyId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
            authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: OllamaChatCompletionRequest;
            processedRequest?: OllamaChatCompletionRequest | null;
            response: OllamaChatCompletionResponse;
            dualLlmAnalyses?: Array<{
                toolCallId: string;
                conversations: Array<{
                    role: 'user' | 'assistant';
                    content: string;
                }>;
                result: string;
            }> | null;
            unsafeContextBoundary?: {
                kind: 'preexisting_untrusted';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            } | {
                kind: 'tool_result';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
                toolCallId: string;
                toolName: string;
            } | null;
            type: 'ollama:chatCompletions';
            model: string | null;
            baselineModel: string | null;
            inputTokens: number | null;
            outputTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            toonTokensBefore: number | null;
            toonTokensAfter: number | null;
            toonCostSavings: string | null;
            toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
            createdAt: string;
            chatErrors?: Array<{
                id: string;
                conversationId: string;
                error: {
                    code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                        status?: number;
                        message?: string;
                        type?: string;
                        raw?: unknown;
                    };
                };
                createdAt: string;
            }>;
        } | {
            id: string;
            profileId: string | null;
            externalAgentId: string | null;
            executionId: string | null;
            userId: string | null;
            virtualKeyId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
            authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: CohereChatRequest;
            processedRequest?: CohereChatRequest | null;
            response: CohereChatResponse;
            dualLlmAnalyses?: Array<{
                toolCallId: string;
                conversations: Array<{
                    role: 'user' | 'assistant';
                    content: string;
                }>;
                result: string;
            }> | null;
            unsafeContextBoundary?: {
                kind: 'preexisting_untrusted';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            } | {
                kind: 'tool_result';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
                toolCallId: string;
                toolName: string;
            } | null;
            type: 'cohere:chat';
            model: string | null;
            baselineModel: string | null;
            inputTokens: number | null;
            outputTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            toonTokensBefore: number | null;
            toonTokensAfter: number | null;
            toonCostSavings: string | null;
            toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
            createdAt: string;
            chatErrors?: Array<{
                id: string;
                conversationId: string;
                error: {
                    code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                        status?: number;
                        message?: string;
                        type?: string;
                        raw?: unknown;
                    };
                };
                createdAt: string;
            }>;
            requestType?: 'main' | 'subagent';
            externalAgentIdLabel?: string | null;
        } | {
            id: string;
            profileId: string | null;
            externalAgentId: string | null;
            executionId: string | null;
            userId: string | null;
            virtualKeyId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
            authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: ZhipuaiChatCompletionRequest;
            processedRequest?: ZhipuaiChatCompletionRequest | null;
            response: ZhipuaiChatCompletionResponse;
            dualLlmAnalyses?: Array<{
                toolCallId: string;
                conversations: Array<{
                    role: 'user' | 'assistant';
                    content: string;
                }>;
                result: string;
            }> | null;
            unsafeContextBoundary?: {
                kind: 'preexisting_untrusted';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            } | {
                kind: 'tool_result';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
                toolCallId: string;
                toolName: string;
            } | null;
            type: 'zhipuai:chatCompletions';
            model: string | null;
            baselineModel: string | null;
            inputTokens: number | null;
            outputTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            toonTokensBefore: number | null;
            toonTokensAfter: number | null;
            toonCostSavings: string | null;
            toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
            createdAt: string;
            chatErrors?: Array<{
                id: string;
                conversationId: string;
                error: {
                    code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                        status?: number;
                        message?: string;
                        type?: string;
                        raw?: unknown;
                    };
                };
                createdAt: string;
            }>;
            requestType?: 'main' | 'subagent';
            externalAgentIdLabel?: string | null;
        } | {
            id: string;
            profileId: string | null;
            externalAgentId: string | null;
            executionId: string | null;
            userId: string | null;
            virtualKeyId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
            authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: DeepSeekChatCompletionRequest;
            processedRequest?: DeepSeekChatCompletionRequest | null;
            response: DeepSeekChatCompletionResponse;
            dualLlmAnalyses?: Array<{
                toolCallId: string;
                conversations: Array<{
                    role: 'user' | 'assistant';
                    content: string;
                }>;
                result: string;
            }> | null;
            unsafeContextBoundary?: {
                kind: 'preexisting_untrusted';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            } | {
                kind: 'tool_result';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
                toolCallId: string;
                toolName: string;
            } | null;
            type: 'deepseek:chatCompletions';
            model: string | null;
            baselineModel: string | null;
            inputTokens: number | null;
            outputTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            toonTokensBefore: number | null;
            toonTokensAfter: number | null;
            toonCostSavings: string | null;
            toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
            createdAt: string;
            chatErrors?: Array<{
                id: string;
                conversationId: string;
                error: {
                    code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                        status?: number;
                        message?: string;
                        type?: string;
                        raw?: unknown;
                    };
                };
                createdAt: string;
            }>;
            requestType?: 'main' | 'subagent';
            externalAgentIdLabel?: string | null;
        } | {
            id: string;
            profileId: string | null;
            externalAgentId: string | null;
            executionId: string | null;
            userId: string | null;
            virtualKeyId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
            authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: MinimaxChatCompletionRequest;
            processedRequest?: MinimaxChatCompletionRequest | null;
            response: MinimaxChatCompletionResponse;
            dualLlmAnalyses?: Array<{
                toolCallId: string;
                conversations: Array<{
                    role: 'user' | 'assistant';
                    content: string;
                }>;
                result: string;
            }> | null;
            unsafeContextBoundary?: {
                kind: 'preexisting_untrusted';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            } | {
                kind: 'tool_result';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
                toolCallId: string;
                toolName: string;
            } | null;
            type: 'minimax:chatCompletions';
            model: string | null;
            baselineModel: string | null;
            inputTokens: number | null;
            outputTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            toonTokensBefore: number | null;
            toonTokensAfter: number | null;
            toonCostSavings: string | null;
            toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
            createdAt: string;
            chatErrors?: Array<{
                id: string;
                conversationId: string;
                error: {
                    code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                        status?: number;
                        message?: string;
                        type?: string;
                        raw?: unknown;
                    };
                };
                createdAt: string;
            }>;
            requestType?: 'main' | 'subagent';
            externalAgentIdLabel?: string | null;
        } | {
            id: string;
            profileId: string | null;
            externalAgentId: string | null;
            executionId: string | null;
            userId: string | null;
            virtualKeyId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
            authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: XaiChatCompletionRequest;
            processedRequest?: XaiChatCompletionRequest | null;
            response: {
                id: string;
                choices: Array<{
                    finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';
                    index: number;
                    logprobs: unknown;
                    /**
                     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000
                     */
                    message: {
                        content: string | null;
                        refusal?: string | null;
                        role: 'assistant';
                        annotations?: Array<unknown>;
                        audio?: unknown;
                        /**
                         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
                         */
                        function_call?: {
                            arguments: string;
                            name: string;
                        } | null;
                        tool_calls?: Array<{
                            id: string;
                            type: 'function';
                            /**
                             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
                             */
                            function: {
                                arguments: string;
                                name: string;
                            };
                        } | {
                            id: string;
                            type: 'custom';
                            /**
                             * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
                             */
                            custom: {
                                input: string;
                                name: string;
                            };
                        }> | null;
                    };
                }>;
                created: number;
                model: string;
                object: 'chat.completion';
                server_tier?: string;
                system_fingerprint?: string | null;
                /**
                 * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113
                 */
                usage?: {
                    completion_tokens: number;
                    prompt_tokens: number;
                    total_tokens: number;
                    /**
                     * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144
                     */
                    completion_tokens_details?: unknown;
                    /**
                     * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173
                     */
                    prompt_tokens_details?: unknown;
                };
                [key: string]: unknown;
            };
            dualLlmAnalyses?: Array<{
                toolCallId: string;
                conversations: Array<{
                    role: 'user' | 'assistant';
                    content: string;
                }>;
                result: string;
            }> | null;
            unsafeContextBoundary?: {
                kind: 'preexisting_untrusted';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            } | {
                kind: 'tool_result';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
                toolCallId: string;
                toolName: string;
            } | null;
            type: 'azure:chatCompletions';
            model: string | null;
            baselineModel: string | null;
            inputTokens: number | null;
            outputTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            toonTokensBefore: number | null;
            toonTokensAfter: number | null;
            toonCostSavings: string | null;
            toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
            createdAt: string;
            chatErrors?: Array<{
                id: string;
                conversationId: string;
                error: {
                    code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                        status?: number;
                        message?: string;
                        type?: string;
                        raw?: unknown;
                    };
                };
                createdAt: string;
            }>;
            requestType?: 'main' | 'subagent';
            externalAgentIdLabel?: string | null;
        } | {
            id: string;
            profileId: string | null;
            externalAgentId: string | null;
            executionId: string | null;
            userId: string | null;
            virtualKeyId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
            authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            /**
             * https://developers.openai.com/api/reference/resources/responses/methods/create
             */
            request: {
                model: string;
                input?: string | Array<{
                    type: string;
                    [key: string]: unknown;
                }>;
                instructions?: string | null;
                max_output_tokens?: number | null;
                metadata?: {
                    [key: string]: string;
                } | null;
                previous_response_id?: string | null;
                stream?: boolean | null;
                temperature?: number | null;
                text?: unknown;
                tool_choice?: unknown;
                tools?: Array<{
                    type: 'function';
                    name: string;
                    description?: string | null;
                    parameters?: {
                        [key: string]: unknown;
                    } | null;
                    strict?: boolean | null;
                    [key: string]: unknown;
                } | {
                    type: string;
                    [key: string]: unknown;
                }>;
                top_p?: number | null;
                user?: string;
                [key: string]: unknown;
            };
            /**
             * https://developers.openai.com/api/reference/resources/responses/methods/create
             */
            processedRequest?: {
                model: string;
                input?: string | Array<{
                    type: string;
                    [key: string]: unknown;
                }>;
                instructions?: string | null;
                max_output_tokens?: number | null;
                metadata?: {
                    [key: string]: string;
                } | null;
                previous_response_id?: string | null;
                stream?: boolean | null;
                temperature?: number | null;
                text?: unknown;
                tool_choice?: unknown;
                tools?: Array<{
                    type: 'function';
                    name: string;
                    description?: string | null;
                    parameters?: {
                        [key: string]: unknown;
                    } | null;
                    strict?: boolean | null;
                    [key: string]: unknown;
                } | {
                    type: string;
                    [key: string]: unknown;
                }>;
                top_p?: number | null;
                user?: string;
                [key: string]: unknown;
            } | null;
            /**
             * https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)
             */
            response: {
                id: string;
                object: 'response';
                created_at: number;
                model: string;
                output: Array<{
                    id: string;
                    type: 'message';
                    role: 'assistant';
                    status: string;
                    content: Array<{
                        type: 'output_text';
                        text: string;
                        [key: string]: unknown;
                    } | {
                        type: 'refusal';
                        refusal: string;
                        [key: string]: unknown;
                    }>;
                    [key: string]: unknown;
                } | {
                    type: 'function_call';
                    id?: string;
                    call_id: string;
                    name: string;
                    arguments: string;
                    status?: string;
                    [key: string]: unknown;
                } | {
                    type: string;
                    [key: string]: unknown;
                }>;
                status: string;
                /**
                 * https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_usage%20%3E%20(schema)
                 */
                usage?: {
                    input_tokens: number;
                    output_tokens: number;
                    total_tokens: number;
                    [key: string]: unknown;
                };
                [key: string]: unknown;
            };
            dualLlmAnalyses?: Array<{
                toolCallId: string;
                conversations: Array<{
                    role: 'user' | 'assistant';
                    content: string;
                }>;
                result: string;
            }> | null;
            unsafeContextBoundary?: {
                kind: 'preexisting_untrusted';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            } | {
                kind: 'tool_result';
                reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
                toolCallId: string;
                toolName: string;
            } | null;
            type: 'azure:responses';
            model: string | null;
            baselineModel: string | null;
            inputTokens: number | null;
            outputTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            toonTokensBefore: number | null;
            toonTokensAfter: number | null;
            toonCostSavings: string | null;
            toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
            createdAt: string;
            chatErrors?: Array<{
                id: string;
                conversationId: string;
                error: {
                    code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                        status?: number;
                        message?: string;
                        type?: string;
                        raw?: unknown;
                    };
                };
                createdAt: string;
            }>;
            requestType?: 'main' | 'subagent';
            externalAgentIdLabel?: string | null;
        }>;
        pagination: {
            currentPage: number;
            limit: number;
            total: number;
            totalPages: number;
            hasNext: boolean;
            hasPrev: boolean;
        };
    };
};

export type GetInteractionsResponse = GetInteractionsResponses[keyof GetInteractionsResponses];

export type GetInteractionSessionsData = {
    body?: never;
    path?: never;
    query?: {
        /**
         * Filter by profile ID (internal Archestra profile)
         */
        profileId?: string;
        /**
         * Filter by user ID (from X-Archestra-User-Id header)
         */
        userId?: string;
        /**
         * Filter by interaction source
         */
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
        /**
         * Filter by session ID
         */
        sessionId?: string;
        /**
         * Filter by start date (ISO 8601 format)
         */
        startDate?: string;
        /**
         * Filter by end date (ISO 8601 format)
         */
        endDate?: string;
        /**
         * Free-text search across session content (case-insensitive)
         */
        search?: string;
        limit?: number;
        offset?: number;
    };
    url: '/api/interactions/sessions';
};

export type GetInteractionSessionsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetInteractionSessionsError = GetInteractionSessionsErrors[keyof GetInteractionSessionsErrors];

export type GetInteractionSessionsResponses = {
    /**
     * Default Response
     */
    200: {
        data: Array<{
            sessionId: string | null;
            sessionSource: string | null;
            source: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
            sources: Array<'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion'>;
            interactionId: string | null;
            requestCount: number;
            totalInputTokens: number;
            totalOutputTokens: number;
            totalCost: string | null;
            totalBaselineCost: string | null;
            totalToonCostSavings: string | null;
            toonSkipReasonCounts: {
                applied: number;
                notEnabled: number;
                notEffective: number;
                noToolResults: number;
            };
            firstRequestTime: string;
            lastRequestTime: string;
            models: Array<string>;
            profileId: string | null;
            profileName: string | null;
            externalAgentIds: Array<string>;
            externalAgentIdLabels: Array<string | null>;
            authMethods: Array<'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown'>;
            authenticatedAppNames: Array<string>;
            userNames: Array<string>;
            lastInteractionRequest: unknown;
            lastInteractionType: string | null;
            conversationTitle: string | null;
            claudeCodeTitle: string | null;
        }>;
        pagination: {
            currentPage: number;
            limit: number;
            total: number;
            totalPages: number;
            hasNext: boolean;
            hasPrev: boolean;
        };
    };
};

export type GetInteractionSessionsResponse = GetInteractionSessionsResponses[keyof GetInteractionSessionsResponses];

export type GetUniqueExternalAgentIdsData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/interactions/external-agent-ids';
};

export type GetUniqueExternalAgentIdsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetUniqueExternalAgentIdsError = GetUniqueExternalAgentIdsErrors[keyof GetUniqueExternalAgentIdsErrors];

export type GetUniqueExternalAgentIdsResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        displayName: string;
    }>;
};

export type GetUniqueExternalAgentIdsResponse = GetUniqueExternalAgentIdsResponses[keyof GetUniqueExternalAgentIdsResponses];

export type GetUniqueUserIdsData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/interactions/user-ids';
};

export type GetUniqueUserIdsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetUniqueUserIdsError = GetUniqueUserIdsErrors[keyof GetUniqueUserIdsErrors];

export type GetUniqueUserIdsResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        name: string;
    }>;
};

export type GetUniqueUserIdsResponse = GetUniqueUserIdsResponses[keyof GetUniqueUserIdsResponses];

export type GetInteractionData = {
    body?: never;
    path: {
        interactionId: string;
    };
    query?: never;
    url: '/api/interactions/{interactionId}';
};

export type GetInteractionErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetInteractionError = GetInteractionErrors[keyof GetInteractionErrors];

export type GetInteractionResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        profileId: string | null;
        externalAgentId: string | null;
        executionId: string | null;
        userId: string | null;
        virtualKeyId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
        authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: XaiChatCompletionRequest;
        processedRequest?: XaiChatCompletionRequest | null;
        response: OpenAiChatCompletionResponse;
        dualLlmAnalyses?: Array<{
            toolCallId: string;
            conversations: Array<{
                role: 'user' | 'assistant';
                content: string;
            }>;
            result: string;
        }> | null;
        unsafeContextBoundary?: {
            kind: 'preexisting_untrusted';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
        } | {
            kind: 'tool_result';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            toolCallId: string;
            toolName: string;
        } | null;
        type: 'openai:chatCompletions';
        model: string | null;
        baselineModel: string | null;
        inputTokens: number | null;
        outputTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        toonTokensBefore: number | null;
        toonTokensAfter: number | null;
        toonCostSavings: string | null;
        toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
        createdAt: string;
        chatErrors?: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                    status?: number;
                    message?: string;
                    type?: string;
                    raw?: unknown;
                };
            };
            createdAt: string;
        }>;
        requestType?: 'main' | 'subagent';
        externalAgentIdLabel?: string | null;
    } | {
        id: string;
        profileId: string | null;
        externalAgentId: string | null;
        executionId: string | null;
        userId: string | null;
        virtualKeyId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
        authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        /**
         * https://developers.openai.com/api/reference/resources/responses/methods/create
         */
        request: {
            model: string;
            input?: string | Array<{
                type: string;
                [key: string]: unknown;
            }>;
            instructions?: string | null;
            max_output_tokens?: number | null;
            metadata?: {
                [key: string]: string;
            } | null;
            previous_response_id?: string | null;
            stream?: boolean | null;
            temperature?: number | null;
            text?: unknown;
            tool_choice?: unknown;
            tools?: Array<{
                type: 'function';
                name: string;
                description?: string | null;
                parameters?: {
                    [key: string]: unknown;
                } | null;
                strict?: boolean | null;
                [key: string]: unknown;
            } | {
                type: string;
                [key: string]: unknown;
            }>;
            top_p?: number | null;
            user?: string;
            [key: string]: unknown;
        };
        /**
         * https://developers.openai.com/api/reference/resources/responses/methods/create
         */
        processedRequest?: {
            model: string;
            input?: string | Array<{
                type: string;
                [key: string]: unknown;
            }>;
            instructions?: string | null;
            max_output_tokens?: number | null;
            metadata?: {
                [key: string]: string;
            } | null;
            previous_response_id?: string | null;
            stream?: boolean | null;
            temperature?: number | null;
            text?: unknown;
            tool_choice?: unknown;
            tools?: Array<{
                type: 'function';
                name: string;
                description?: string | null;
                parameters?: {
                    [key: string]: unknown;
                } | null;
                strict?: boolean | null;
                [key: string]: unknown;
            } | {
                type: string;
                [key: string]: unknown;
            }>;
            top_p?: number | null;
            user?: string;
            [key: string]: unknown;
        } | null;
        /**
         * https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)
         */
        response: {
            id: string;
            object: 'response';
            created_at: number;
            model: string;
            output: Array<{
                id: string;
                type: 'message';
                role: 'assistant';
                status: string;
                content: Array<{
                    type: 'output_text';
                    text: string;
                    [key: string]: unknown;
                } | {
                    type: 'refusal';
                    refusal: string;
                    [key: string]: unknown;
                }>;
                [key: string]: unknown;
            } | {
                type: 'function_call';
                id?: string;
                call_id: string;
                name: string;
                arguments: string;
                status?: string;
                [key: string]: unknown;
            } | {
                type: string;
                [key: string]: unknown;
            }>;
            status: string;
            /**
             * https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_usage%20%3E%20(schema)
             */
            usage?: {
                input_tokens: number;
                output_tokens: number;
                total_tokens: number;
                [key: string]: unknown;
            };
            [key: string]: unknown;
        };
        dualLlmAnalyses?: Array<{
            toolCallId: string;
            conversations: Array<{
                role: 'user' | 'assistant';
                content: string;
            }>;
            result: string;
        }> | null;
        unsafeContextBoundary?: {
            kind: 'preexisting_untrusted';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
        } | {
            kind: 'tool_result';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            toolCallId: string;
            toolName: string;
        } | null;
        type: 'openai:responses';
        model: string | null;
        baselineModel: string | null;
        inputTokens: number | null;
        outputTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        toonTokensBefore: number | null;
        toonTokensAfter: number | null;
        toonCostSavings: string | null;
        toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
        createdAt: string;
        chatErrors?: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                    status?: number;
                    message?: string;
                    type?: string;
                    raw?: unknown;
                };
            };
            createdAt: string;
        }>;
        requestType?: 'main' | 'subagent';
        externalAgentIdLabel?: string | null;
    } | {
        id: string;
        profileId: string | null;
        externalAgentId: string | null;
        executionId: string | null;
        userId: string | null;
        virtualKeyId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
        authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: {
            model: string;
            input: string | Array<string>;
            dimensions?: number;
            encoding_format?: 'float' | 'base64';
        };
        processedRequest?: {
            model: string;
            input: string | Array<string>;
            dimensions?: number;
            encoding_format?: 'float' | 'base64';
        } | null;
        response: {
            object: 'list';
            data: Array<{
                object: 'embedding';
                embedding: Array<number>;
                index: number;
            }>;
            model: string;
            usage: {
                prompt_tokens: number;
                total_tokens: number;
            };
        };
        dualLlmAnalyses?: Array<{
            toolCallId: string;
            conversations: Array<{
                role: 'user' | 'assistant';
                content: string;
            }>;
            result: string;
        }> | null;
        unsafeContextBoundary?: {
            kind: 'preexisting_untrusted';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
        } | {
            kind: 'tool_result';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            toolCallId: string;
            toolName: string;
        } | null;
        type: 'openai:embeddings';
        model: string | null;
        baselineModel: string | null;
        inputTokens: number | null;
        outputTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        toonTokensBefore: number | null;
        toonTokensAfter: number | null;
        toonCostSavings: string | null;
        toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
        createdAt: string;
        chatErrors?: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                    status?: number;
                    message?: string;
                    type?: string;
                    raw?: unknown;
                };
            };
            createdAt: string;
        }>;
    } | {
        id: string;
        profileId: string | null;
        externalAgentId: string | null;
        executionId: string | null;
        userId: string | null;
        virtualKeyId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
        authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: GeminiGenerateContentRequest;
        processedRequest?: GeminiGenerateContentRequest | null;
        response: GeminiGenerateContentResponse;
        dualLlmAnalyses?: Array<{
            toolCallId: string;
            conversations: Array<{
                role: 'user' | 'assistant';
                content: string;
            }>;
            result: string;
        }> | null;
        unsafeContextBoundary?: {
            kind: 'preexisting_untrusted';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
        } | {
            kind: 'tool_result';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            toolCallId: string;
            toolName: string;
        } | null;
        type: 'gemini:generateContent';
        model: string | null;
        baselineModel: string | null;
        inputTokens: number | null;
        outputTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        toonTokensBefore: number | null;
        toonTokensAfter: number | null;
        toonCostSavings: string | null;
        toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
        createdAt: string;
        chatErrors?: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                    status?: number;
                    message?: string;
                    type?: string;
                    raw?: unknown;
                };
            };
            createdAt: string;
        }>;
        requestType?: 'main' | 'subagent';
        externalAgentIdLabel?: string | null;
    } | {
        id: string;
        profileId: string | null;
        externalAgentId: string | null;
        executionId: string | null;
        userId: string | null;
        virtualKeyId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
        authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: AnthropicMessagesRequest;
        processedRequest?: AnthropicMessagesRequest | null;
        response: AnthropicMessagesResponse;
        dualLlmAnalyses?: Array<{
            toolCallId: string;
            conversations: Array<{
                role: 'user' | 'assistant';
                content: string;
            }>;
            result: string;
        }> | null;
        unsafeContextBoundary?: {
            kind: 'preexisting_untrusted';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
        } | {
            kind: 'tool_result';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            toolCallId: string;
            toolName: string;
        } | null;
        type: 'anthropic:messages';
        model: string | null;
        baselineModel: string | null;
        inputTokens: number | null;
        outputTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        toonTokensBefore: number | null;
        toonTokensAfter: number | null;
        toonCostSavings: string | null;
        toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
        createdAt: string;
        chatErrors?: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                    status?: number;
                    message?: string;
                    type?: string;
                    raw?: unknown;
                };
            };
            createdAt: string;
        }>;
        requestType?: 'main' | 'subagent';
        externalAgentIdLabel?: string | null;
    } | {
        id: string;
        profileId: string | null;
        externalAgentId: string | null;
        executionId: string | null;
        userId: string | null;
        virtualKeyId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
        authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: {
            modelId: string;
            messages?: Array<{
                role: 'user' | 'assistant';
                content: Array<{
                    text: string;
                } | {
                    image: {
                        format: 'png' | 'jpeg' | 'gif' | 'webp';
                        source: {
                            bytes: string;
                        } | {
                            s3Location: {
                                uri: string;
                                bucketOwner?: string;
                            };
                        };
                    };
                } | {
                    document: {
                        format: 'pdf' | 'csv' | 'doc' | 'docx' | 'xls' | 'xlsx' | 'html' | 'txt' | 'md';
                        name: string;
                        source: {
                            bytes: string;
                        } | {
                            s3Location: {
                                uri: string;
                                bucketOwner?: string;
                            };
                        };
                    };
                } | {
                    guardContent: {
                        text: {
                            text: string;
                            qualifiers?: Array<'grounding_source' | 'query' | 'guard_content'>;
                        };
                    };
                } | {
                    toolUse: {
                        toolUseId: string;
                        name: string;
                        input: {
                            [key: string]: unknown;
                        };
                    };
                } | {
                    toolResult: {
                        toolUseId: string;
                        content: Array<{
                            text: string;
                        } | {
                            image: {
                                format: 'png' | 'jpeg' | 'gif' | 'webp';
                                source: {
                                    bytes: string;
                                } | {
                                    s3Location: {
                                        uri: string;
                                        bucketOwner?: string;
                                    };
                                };
                            };
                        } | {
                            json: {
                                [key: string]: unknown;
                            };
                        } | {
                            document: {
                                format: 'pdf' | 'csv' | 'doc' | 'docx' | 'xls' | 'xlsx' | 'html' | 'txt' | 'md';
                                name: string;
                                source: {
                                    bytes: string;
                                } | {
                                    s3Location: {
                                        uri: string;
                                        bucketOwner?: string;
                                    };
                                };
                            };
                        }>;
                        status?: 'success' | 'error';
                    };
                }>;
            }>;
            system?: Array<{
                text: string;
            } | {
                guardContent: {
                    text: {
                        text: string;
                        qualifiers?: Array<'grounding_source' | 'query' | 'guard_content'>;
                    };
                };
            }>;
            inferenceConfig?: {
                maxTokens?: number;
                temperature?: number;
                topP?: number;
                stopSequences?: Array<string>;
            };
            toolConfig?: {
                tools: Array<{
                    toolSpec: {
                        name: string;
                        description?: string;
                        inputSchema: {
                            json: {
                                [key: string]: unknown;
                            };
                        };
                    };
                }>;
                toolChoice?: {
                    tool: {
                        name: string;
                    };
                    [key: string]: unknown;
                } | {
                    any: {
                        [key: string]: unknown;
                    };
                    [key: string]: unknown;
                } | {
                    auto: {
                        [key: string]: unknown;
                    };
                    [key: string]: unknown;
                };
            };
            guardrailConfig?: {
                guardrailIdentifier: string;
                guardrailVersion: string;
                trace?: 'enabled' | 'disabled';
            };
            additionalModelRequestFields?: {
                [key: string]: unknown;
            };
            additionalModelResponseFieldPaths?: Array<string>;
            promptVariables?: {
                [key: string]: {
                    text: string;
                } | {
                    json: {
                        [key: string]: unknown;
                    };
                };
            };
            performanceConfig?: {
                latency?: 'optimized';
            };
            serviceTier?: {
                type?: 'default' | 'throughput';
            };
            requestMetadata?: {
                [key: string]: string;
            };
            _isStreaming?: boolean;
        };
        processedRequest?: {
            modelId: string;
            messages?: Array<{
                role: 'user' | 'assistant';
                content: Array<{
                    text: string;
                } | {
                    image: {
                        format: 'png' | 'jpeg' | 'gif' | 'webp';
                        source: {
                            bytes: string;
                        } | {
                            s3Location: {
                                uri: string;
                                bucketOwner?: string;
                            };
                        };
                    };
                } | {
                    document: {
                        format: 'pdf' | 'csv' | 'doc' | 'docx' | 'xls' | 'xlsx' | 'html' | 'txt' | 'md';
                        name: string;
                        source: {
                            bytes: string;
                        } | {
                            s3Location: {
                                uri: string;
                                bucketOwner?: string;
                            };
                        };
                    };
                } | {
                    guardContent: {
                        text: {
                            text: string;
                            qualifiers?: Array<'grounding_source' | 'query' | 'guard_content'>;
                        };
                    };
                } | {
                    toolUse: {
                        toolUseId: string;
                        name: string;
                        input: {
                            [key: string]: unknown;
                        };
                    };
                } | {
                    toolResult: {
                        toolUseId: string;
                        content: Array<{
                            text: string;
                        } | {
                            image: {
                                format: 'png' | 'jpeg' | 'gif' | 'webp';
                                source: {
                                    bytes: string;
                                } | {
                                    s3Location: {
                                        uri: string;
                                        bucketOwner?: string;
                                    };
                                };
                            };
                        } | {
                            json: {
                                [key: string]: unknown;
                            };
                        } | {
                            document: {
                                format: 'pdf' | 'csv' | 'doc' | 'docx' | 'xls' | 'xlsx' | 'html' | 'txt' | 'md';
                                name: string;
                                source: {
                                    bytes: string;
                                } | {
                                    s3Location: {
                                        uri: string;
                                        bucketOwner?: string;
                                    };
                                };
                            };
                        }>;
                        status?: 'success' | 'error';
                    };
                }>;
            }>;
            system?: Array<{
                text: string;
            } | {
                guardContent: {
                    text: {
                        text: string;
                        qualifiers?: Array<'grounding_source' | 'query' | 'guard_content'>;
                    };
                };
            }>;
            inferenceConfig?: {
                maxTokens?: number;
                temperature?: number;
                topP?: number;
                stopSequences?: Array<string>;
            };
            toolConfig?: {
                tools: Array<{
                    toolSpec: {
                        name: string;
                        description?: string;
                        inputSchema: {
                            json: {
                                [key: string]: unknown;
                            };
                        };
                    };
                }>;
                toolChoice?: {
                    tool: {
                        name: string;
                    };
                    [key: string]: unknown;
                } | {
                    any: {
                        [key: string]: unknown;
                    };
                    [key: string]: unknown;
                } | {
                    auto: {
                        [key: string]: unknown;
                    };
                    [key: string]: unknown;
                };
            };
            guardrailConfig?: {
                guardrailIdentifier: string;
                guardrailVersion: string;
                trace?: 'enabled' | 'disabled';
            };
            additionalModelRequestFields?: {
                [key: string]: unknown;
            };
            additionalModelResponseFieldPaths?: Array<string>;
            promptVariables?: {
                [key: string]: {
                    text: string;
                } | {
                    json: {
                        [key: string]: unknown;
                    };
                };
            };
            performanceConfig?: {
                latency?: 'optimized';
            };
            serviceTier?: {
                type?: 'default' | 'throughput';
            };
            requestMetadata?: {
                [key: string]: string;
            };
            _isStreaming?: boolean;
        } | null;
        response: {
            $metadata?: {
                httpStatusCode?: number;
                requestId?: string;
                attempts?: number;
                totalRetryDelay?: number;
            };
            output: {
                message?: {
                    role: 'assistant';
                    content: Array<{
                        text: string;
                    } | {
                        toolUse: {
                            toolUseId: string;
                            name: string;
                            input: {
                                [key: string]: unknown;
                            };
                        };
                    }>;
                };
            };
            stopReason: 'end_turn' | 'tool_use' | 'max_tokens' | 'stop_sequence' | 'guardrail_intervened' | 'content_filtered' | 'model_context_window_exceeded';
            usage: {
                inputTokens: number;
                outputTokens: number;
                totalTokens?: number;
                cacheReadInputTokens?: number;
                cacheWriteInputTokens?: number;
            };
            metrics?: {
                latencyMs?: number;
            };
            additionalModelResponseFields?: {
                [key: string]: unknown;
            };
            trace?: {
                guardrail?: {
                    inputAssessment?: {
                        [key: string]: unknown;
                    };
                    outputAssessments?: {
                        [key: string]: unknown;
                    };
                    modelOutput?: Array<string>;
                    actionReason?: string;
                };
                promptRouter?: {
                    invokedModelId?: string;
                };
            };
            performanceConfig?: {
                latency?: 'optimized';
            };
            serviceTier?: {
                type?: 'default' | 'throughput';
            };
        };
        dualLlmAnalyses?: Array<{
            toolCallId: string;
            conversations: Array<{
                role: 'user' | 'assistant';
                content: string;
            }>;
            result: string;
        }> | null;
        unsafeContextBoundary?: {
            kind: 'preexisting_untrusted';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
        } | {
            kind: 'tool_result';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            toolCallId: string;
            toolName: string;
        } | null;
        type: 'bedrock:converse';
        model: string | null;
        baselineModel: string | null;
        inputTokens: number | null;
        outputTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        toonTokensBefore: number | null;
        toonTokensAfter: number | null;
        toonCostSavings: string | null;
        toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
        createdAt: string;
        chatErrors?: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                    status?: number;
                    message?: string;
                    type?: string;
                    raw?: unknown;
                };
            };
            createdAt: string;
        }>;
        requestType?: 'main' | 'subagent';
        externalAgentIdLabel?: string | null;
    } | {
        id: string;
        profileId: string | null;
        externalAgentId: string | null;
        executionId: string | null;
        userId: string | null;
        virtualKeyId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
        authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: XaiChatCompletionRequest;
        processedRequest?: XaiChatCompletionRequest | null;
        response: CerebrasChatCompletionResponse;
        dualLlmAnalyses?: Array<{
            toolCallId: string;
            conversations: Array<{
                role: 'user' | 'assistant';
                content: string;
            }>;
            result: string;
        }> | null;
        unsafeContextBoundary?: {
            kind: 'preexisting_untrusted';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
        } | {
            kind: 'tool_result';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            toolCallId: string;
            toolName: string;
        } | null;
        type: 'cerebras:chatCompletions';
        model: string | null;
        baselineModel: string | null;
        inputTokens: number | null;
        outputTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        toonTokensBefore: number | null;
        toonTokensAfter: number | null;
        toonCostSavings: string | null;
        toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
        createdAt: string;
        chatErrors?: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                    status?: number;
                    message?: string;
                    type?: string;
                    raw?: unknown;
                };
            };
            createdAt: string;
        }>;
        requestType?: 'main' | 'subagent';
        externalAgentIdLabel?: string | null;
    } | {
        id: string;
        profileId: string | null;
        externalAgentId: string | null;
        executionId: string | null;
        userId: string | null;
        virtualKeyId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
        authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: XaiChatCompletionRequest;
        processedRequest?: XaiChatCompletionRequest | null;
        response: MistralChatCompletionResponse;
        dualLlmAnalyses?: Array<{
            toolCallId: string;
            conversations: Array<{
                role: 'user' | 'assistant';
                content: string;
            }>;
            result: string;
        }> | null;
        unsafeContextBoundary?: {
            kind: 'preexisting_untrusted';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
        } | {
            kind: 'tool_result';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            toolCallId: string;
            toolName: string;
        } | null;
        type: 'mistral:chatCompletions';
        model: string | null;
        baselineModel: string | null;
        inputTokens: number | null;
        outputTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        toonTokensBefore: number | null;
        toonTokensAfter: number | null;
        toonCostSavings: string | null;
        toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
        createdAt: string;
        chatErrors?: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                    status?: number;
                    message?: string;
                    type?: string;
                    raw?: unknown;
                };
            };
            createdAt: string;
        }>;
        requestType?: 'main' | 'subagent';
        externalAgentIdLabel?: string | null;
    } | {
        id: string;
        profileId: string | null;
        externalAgentId: string | null;
        executionId: string | null;
        userId: string | null;
        virtualKeyId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
        authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: XaiChatCompletionRequest;
        processedRequest?: XaiChatCompletionRequest | null;
        response: PerplexityChatCompletionResponse;
        dualLlmAnalyses?: Array<{
            toolCallId: string;
            conversations: Array<{
                role: 'user' | 'assistant';
                content: string;
            }>;
            result: string;
        }> | null;
        unsafeContextBoundary?: {
            kind: 'preexisting_untrusted';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
        } | {
            kind: 'tool_result';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            toolCallId: string;
            toolName: string;
        } | null;
        type: 'perplexity:chatCompletions';
        model: string | null;
        baselineModel: string | null;
        inputTokens: number | null;
        outputTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        toonTokensBefore: number | null;
        toonTokensAfter: number | null;
        toonCostSavings: string | null;
        toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
        createdAt: string;
        chatErrors?: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                    status?: number;
                    message?: string;
                    type?: string;
                    raw?: unknown;
                };
            };
            createdAt: string;
        }>;
        requestType?: 'main' | 'subagent';
        externalAgentIdLabel?: string | null;
    } | {
        id: string;
        profileId: string | null;
        externalAgentId: string | null;
        executionId: string | null;
        userId: string | null;
        virtualKeyId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
        authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: XaiChatCompletionRequest;
        processedRequest?: XaiChatCompletionRequest | null;
        response: GroqChatCompletionResponse;
        dualLlmAnalyses?: Array<{
            toolCallId: string;
            conversations: Array<{
                role: 'user' | 'assistant';
                content: string;
            }>;
            result: string;
        }> | null;
        unsafeContextBoundary?: {
            kind: 'preexisting_untrusted';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
        } | {
            kind: 'tool_result';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            toolCallId: string;
            toolName: string;
        } | null;
        type: 'groq:chatCompletions';
        model: string | null;
        baselineModel: string | null;
        inputTokens: number | null;
        outputTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        toonTokensBefore: number | null;
        toonTokensAfter: number | null;
        toonCostSavings: string | null;
        toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
        createdAt: string;
        chatErrors?: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                    status?: number;
                    message?: string;
                    type?: string;
                    raw?: unknown;
                };
            };
            createdAt: string;
        }>;
        requestType?: 'main' | 'subagent';
        externalAgentIdLabel?: string | null;
    } | {
        id: string;
        profileId: string | null;
        externalAgentId: string | null;
        executionId: string | null;
        userId: string | null;
        virtualKeyId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
        authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: XaiChatCompletionRequest;
        processedRequest?: XaiChatCompletionRequest | null;
        response: XaiChatCompletionResponse;
        dualLlmAnalyses?: Array<{
            toolCallId: string;
            conversations: Array<{
                role: 'user' | 'assistant';
                content: string;
            }>;
            result: string;
        }> | null;
        unsafeContextBoundary?: {
            kind: 'preexisting_untrusted';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
        } | {
            kind: 'tool_result';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            toolCallId: string;
            toolName: string;
        } | null;
        type: 'xai:chatCompletions';
        model: string | null;
        baselineModel: string | null;
        inputTokens: number | null;
        outputTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        toonTokensBefore: number | null;
        toonTokensAfter: number | null;
        toonCostSavings: string | null;
        toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
        createdAt: string;
        chatErrors?: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                    status?: number;
                    message?: string;
                    type?: string;
                    raw?: unknown;
                };
            };
            createdAt: string;
        }>;
        requestType?: 'main' | 'subagent';
        externalAgentIdLabel?: string | null;
    } | {
        id: string;
        profileId: string | null;
        externalAgentId: string | null;
        executionId: string | null;
        userId: string | null;
        virtualKeyId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
        authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: XaiChatCompletionRequest;
        processedRequest?: XaiChatCompletionRequest | null;
        response: OpenrouterChatCompletionResponse;
        dualLlmAnalyses?: Array<{
            toolCallId: string;
            conversations: Array<{
                role: 'user' | 'assistant';
                content: string;
            }>;
            result: string;
        }> | null;
        unsafeContextBoundary?: {
            kind: 'preexisting_untrusted';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
        } | {
            kind: 'tool_result';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            toolCallId: string;
            toolName: string;
        } | null;
        type: 'openrouter:chatCompletions';
        model: string | null;
        baselineModel: string | null;
        inputTokens: number | null;
        outputTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        toonTokensBefore: number | null;
        toonTokensAfter: number | null;
        toonCostSavings: string | null;
        toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
        createdAt: string;
        chatErrors?: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                    status?: number;
                    message?: string;
                    type?: string;
                    raw?: unknown;
                };
            };
            createdAt: string;
        }>;
        requestType?: 'main' | 'subagent';
        externalAgentIdLabel?: string | null;
    } | {
        id: string;
        profileId: string | null;
        externalAgentId: string | null;
        executionId: string | null;
        userId: string | null;
        virtualKeyId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
        authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: VllmChatCompletionRequest;
        processedRequest?: VllmChatCompletionRequest | null;
        response: VllmChatCompletionResponse;
        dualLlmAnalyses?: Array<{
            toolCallId: string;
            conversations: Array<{
                role: 'user' | 'assistant';
                content: string;
            }>;
            result: string;
        }> | null;
        unsafeContextBoundary?: {
            kind: 'preexisting_untrusted';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
        } | {
            kind: 'tool_result';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            toolCallId: string;
            toolName: string;
        } | null;
        type: 'vllm:chatCompletions';
        model: string | null;
        baselineModel: string | null;
        inputTokens: number | null;
        outputTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        toonTokensBefore: number | null;
        toonTokensAfter: number | null;
        toonCostSavings: string | null;
        toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
        createdAt: string;
        chatErrors?: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                    status?: number;
                    message?: string;
                    type?: string;
                    raw?: unknown;
                };
            };
            createdAt: string;
        }>;
    } | {
        id: string;
        profileId: string | null;
        externalAgentId: string | null;
        executionId: string | null;
        userId: string | null;
        virtualKeyId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
        authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: OllamaChatCompletionRequest;
        processedRequest?: OllamaChatCompletionRequest | null;
        response: OllamaChatCompletionResponse;
        dualLlmAnalyses?: Array<{
            toolCallId: string;
            conversations: Array<{
                role: 'user' | 'assistant';
                content: string;
            }>;
            result: string;
        }> | null;
        unsafeContextBoundary?: {
            kind: 'preexisting_untrusted';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
        } | {
            kind: 'tool_result';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            toolCallId: string;
            toolName: string;
        } | null;
        type: 'ollama:chatCompletions';
        model: string | null;
        baselineModel: string | null;
        inputTokens: number | null;
        outputTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        toonTokensBefore: number | null;
        toonTokensAfter: number | null;
        toonCostSavings: string | null;
        toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
        createdAt: string;
        chatErrors?: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                    status?: number;
                    message?: string;
                    type?: string;
                    raw?: unknown;
                };
            };
            createdAt: string;
        }>;
    } | {
        id: string;
        profileId: string | null;
        externalAgentId: string | null;
        executionId: string | null;
        userId: string | null;
        virtualKeyId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
        authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: CohereChatRequest;
        processedRequest?: CohereChatRequest | null;
        response: CohereChatResponse;
        dualLlmAnalyses?: Array<{
            toolCallId: string;
            conversations: Array<{
                role: 'user' | 'assistant';
                content: string;
            }>;
            result: string;
        }> | null;
        unsafeContextBoundary?: {
            kind: 'preexisting_untrusted';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
        } | {
            kind: 'tool_result';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            toolCallId: string;
            toolName: string;
        } | null;
        type: 'cohere:chat';
        model: string | null;
        baselineModel: string | null;
        inputTokens: number | null;
        outputTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        toonTokensBefore: number | null;
        toonTokensAfter: number | null;
        toonCostSavings: string | null;
        toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
        createdAt: string;
        chatErrors?: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                    status?: number;
                    message?: string;
                    type?: string;
                    raw?: unknown;
                };
            };
            createdAt: string;
        }>;
        requestType?: 'main' | 'subagent';
        externalAgentIdLabel?: string | null;
    } | {
        id: string;
        profileId: string | null;
        externalAgentId: string | null;
        executionId: string | null;
        userId: string | null;
        virtualKeyId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
        authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: ZhipuaiChatCompletionRequest;
        processedRequest?: ZhipuaiChatCompletionRequest | null;
        response: ZhipuaiChatCompletionResponse;
        dualLlmAnalyses?: Array<{
            toolCallId: string;
            conversations: Array<{
                role: 'user' | 'assistant';
                content: string;
            }>;
            result: string;
        }> | null;
        unsafeContextBoundary?: {
            kind: 'preexisting_untrusted';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
        } | {
            kind: 'tool_result';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            toolCallId: string;
            toolName: string;
        } | null;
        type: 'zhipuai:chatCompletions';
        model: string | null;
        baselineModel: string | null;
        inputTokens: number | null;
        outputTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        toonTokensBefore: number | null;
        toonTokensAfter: number | null;
        toonCostSavings: string | null;
        toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
        createdAt: string;
        chatErrors?: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                    status?: number;
                    message?: string;
                    type?: string;
                    raw?: unknown;
                };
            };
            createdAt: string;
        }>;
        requestType?: 'main' | 'subagent';
        externalAgentIdLabel?: string | null;
    } | {
        id: string;
        profileId: string | null;
        externalAgentId: string | null;
        executionId: string | null;
        userId: string | null;
        virtualKeyId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
        authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: DeepSeekChatCompletionRequest;
        processedRequest?: DeepSeekChatCompletionRequest | null;
        response: DeepSeekChatCompletionResponse;
        dualLlmAnalyses?: Array<{
            toolCallId: string;
            conversations: Array<{
                role: 'user' | 'assistant';
                content: string;
            }>;
            result: string;
        }> | null;
        unsafeContextBoundary?: {
            kind: 'preexisting_untrusted';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
        } | {
            kind: 'tool_result';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            toolCallId: string;
            toolName: string;
        } | null;
        type: 'deepseek:chatCompletions';
        model: string | null;
        baselineModel: string | null;
        inputTokens: number | null;
        outputTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        toonTokensBefore: number | null;
        toonTokensAfter: number | null;
        toonCostSavings: string | null;
        toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
        createdAt: string;
        chatErrors?: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                    status?: number;
                    message?: string;
                    type?: string;
                    raw?: unknown;
                };
            };
            createdAt: string;
        }>;
        requestType?: 'main' | 'subagent';
        externalAgentIdLabel?: string | null;
    } | {
        id: string;
        profileId: string | null;
        externalAgentId: string | null;
        executionId: string | null;
        userId: string | null;
        virtualKeyId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
        authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: MinimaxChatCompletionRequest;
        processedRequest?: MinimaxChatCompletionRequest | null;
        response: MinimaxChatCompletionResponse;
        dualLlmAnalyses?: Array<{
            toolCallId: string;
            conversations: Array<{
                role: 'user' | 'assistant';
                content: string;
            }>;
            result: string;
        }> | null;
        unsafeContextBoundary?: {
            kind: 'preexisting_untrusted';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
        } | {
            kind: 'tool_result';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            toolCallId: string;
            toolName: string;
        } | null;
        type: 'minimax:chatCompletions';
        model: string | null;
        baselineModel: string | null;
        inputTokens: number | null;
        outputTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        toonTokensBefore: number | null;
        toonTokensAfter: number | null;
        toonCostSavings: string | null;
        toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
        createdAt: string;
        chatErrors?: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                    status?: number;
                    message?: string;
                    type?: string;
                    raw?: unknown;
                };
            };
            createdAt: string;
        }>;
        requestType?: 'main' | 'subagent';
        externalAgentIdLabel?: string | null;
    } | {
        id: string;
        profileId: string | null;
        externalAgentId: string | null;
        executionId: string | null;
        userId: string | null;
        virtualKeyId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
        authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: XaiChatCompletionRequest;
        processedRequest?: XaiChatCompletionRequest | null;
        response: {
            id: string;
            choices: Array<{
                finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';
                index: number;
                logprobs: unknown;
                /**
                 * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000
                 */
                message: {
                    content: string | null;
                    refusal?: string | null;
                    role: 'assistant';
                    annotations?: Array<unknown>;
                    audio?: unknown;
                    /**
                     * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431
                     */
                    function_call?: {
                        arguments: string;
                        name: string;
                    } | null;
                    tool_calls?: Array<{
                        id: string;
                        type: 'function';
                        /**
                         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165
                         */
                        function: {
                            arguments: string;
                            name: string;
                        };
                    } | {
                        id: string;
                        type: 'custom';
                        /**
                         * https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128
                         */
                        custom: {
                            input: string;
                            name: string;
                        };
                    }> | null;
                };
            }>;
            created: number;
            model: string;
            object: 'chat.completion';
            server_tier?: string;
            system_fingerprint?: string | null;
            /**
             * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113
             */
            usage?: {
                completion_tokens: number;
                prompt_tokens: number;
                total_tokens: number;
                /**
                 * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144
                 */
                completion_tokens_details?: unknown;
                /**
                 * https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173
                 */
                prompt_tokens_details?: unknown;
            };
            [key: string]: unknown;
        };
        dualLlmAnalyses?: Array<{
            toolCallId: string;
            conversations: Array<{
                role: 'user' | 'assistant';
                content: string;
            }>;
            result: string;
        }> | null;
        unsafeContextBoundary?: {
            kind: 'preexisting_untrusted';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
        } | {
            kind: 'tool_result';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            toolCallId: string;
            toolName: string;
        } | null;
        type: 'azure:chatCompletions';
        model: string | null;
        baselineModel: string | null;
        inputTokens: number | null;
        outputTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        toonTokensBefore: number | null;
        toonTokensAfter: number | null;
        toonCostSavings: string | null;
        toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
        createdAt: string;
        chatErrors?: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                    status?: number;
                    message?: string;
                    type?: string;
                    raw?: unknown;
                };
            };
            createdAt: string;
        }>;
        requestType?: 'main' | 'subagent';
        externalAgentIdLabel?: string | null;
    } | {
        id: string;
        profileId: string | null;
        externalAgentId: string | null;
        executionId: string | null;
        userId: string | null;
        virtualKeyId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion';
        authMethod?: 'provider_key' | 'virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        /**
         * https://developers.openai.com/api/reference/resources/responses/methods/create
         */
        request: {
            model: string;
            input?: string | Array<{
                type: string;
                [key: string]: unknown;
            }>;
            instructions?: string | null;
            max_output_tokens?: number | null;
            metadata?: {
                [key: string]: string;
            } | null;
            previous_response_id?: string | null;
            stream?: boolean | null;
            temperature?: number | null;
            text?: unknown;
            tool_choice?: unknown;
            tools?: Array<{
                type: 'function';
                name: string;
                description?: string | null;
                parameters?: {
                    [key: string]: unknown;
                } | null;
                strict?: boolean | null;
                [key: string]: unknown;
            } | {
                type: string;
                [key: string]: unknown;
            }>;
            top_p?: number | null;
            user?: string;
            [key: string]: unknown;
        };
        /**
         * https://developers.openai.com/api/reference/resources/responses/methods/create
         */
        processedRequest?: {
            model: string;
            input?: string | Array<{
                type: string;
                [key: string]: unknown;
            }>;
            instructions?: string | null;
            max_output_tokens?: number | null;
            metadata?: {
                [key: string]: string;
            } | null;
            previous_response_id?: string | null;
            stream?: boolean | null;
            temperature?: number | null;
            text?: unknown;
            tool_choice?: unknown;
            tools?: Array<{
                type: 'function';
                name: string;
                description?: string | null;
                parameters?: {
                    [key: string]: unknown;
                } | null;
                strict?: boolean | null;
                [key: string]: unknown;
            } | {
                type: string;
                [key: string]: unknown;
            }>;
            top_p?: number | null;
            user?: string;
            [key: string]: unknown;
        } | null;
        /**
         * https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)
         */
        response: {
            id: string;
            object: 'response';
            created_at: number;
            model: string;
            output: Array<{
                id: string;
                type: 'message';
                role: 'assistant';
                status: string;
                content: Array<{
                    type: 'output_text';
                    text: string;
                    [key: string]: unknown;
                } | {
                    type: 'refusal';
                    refusal: string;
                    [key: string]: unknown;
                }>;
                [key: string]: unknown;
            } | {
                type: 'function_call';
                id?: string;
                call_id: string;
                name: string;
                arguments: string;
                status?: string;
                [key: string]: unknown;
            } | {
                type: string;
                [key: string]: unknown;
            }>;
            status: string;
            /**
             * https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_usage%20%3E%20(schema)
             */
            usage?: {
                input_tokens: number;
                output_tokens: number;
                total_tokens: number;
                [key: string]: unknown;
            };
            [key: string]: unknown;
        };
        dualLlmAnalyses?: Array<{
            toolCallId: string;
            conversations: Array<{
                role: 'user' | 'assistant';
                content: string;
            }>;
            result: string;
        }> | null;
        unsafeContextBoundary?: {
            kind: 'preexisting_untrusted';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
        } | {
            kind: 'tool_result';
            reason: 'agent_configured_untrusted' | 'inherited_from_parent' | 'tool_result_marked_untrusted' | 'tool_result_blocked';
            toolCallId: string;
            toolName: string;
        } | null;
        type: 'azure:responses';
        model: string | null;
        baselineModel: string | null;
        inputTokens: number | null;
        outputTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        toonTokensBefore: number | null;
        toonTokensAfter: number | null;
        toonCostSavings: string | null;
        toonSkipReason?: 'not_enabled' | 'not_effective' | 'no_tool_results';
        createdAt: string;
        chatErrors?: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                    status?: number;
                    message?: string;
                    type?: string;
                    raw?: unknown;
                };
            };
            createdAt: string;
        }>;
        requestType?: 'main' | 'subagent';
        externalAgentIdLabel?: string | null;
    };
};

export type GetInteractionResponse = GetInteractionResponses[keyof GetInteractionResponses];

export type GetInternalMcpCatalogData = {
    body?: never;
    path?: never;
    query?: {
        includeChildren?: boolean | 'true' | 'false';
    };
    url: '/api/internal_mcp_catalog';
};

export type GetInternalMcpCatalogErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetInternalMcpCatalogError = GetInternalMcpCatalogErrors[keyof GetInternalMcpCatalogErrors];

export type GetInternalMcpCatalogResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        name: string;
        version: string | null;
        description: string | null;
        instructions: string | null;
        repository: string | null;
        installationCommand: string | null;
        requiresAuth: boolean;
        authDescription: string | null;
        authFields: Array<{
            name: string;
            label: string;
            type: string;
            required: boolean;
            description?: string;
        }> | null;
        serverType: 'local' | 'remote' | 'builtin';
        multitenant: boolean;
        serverUrl: string | null;
        docsUrl: string | null;
        clientSecretId: string | null;
        localConfigSecretId: string | null;
        localConfig: {
            command?: string;
            arguments?: Array<string>;
            environment?: Array<{
                key: string;
                type: 'plain_text' | 'secret' | 'boolean' | 'number';
                value?: string;
                promptOnInstallation: boolean;
                promptOnPreset?: boolean;
                required?: boolean;
                description?: string;
                default?: LocalConfigEnvironmentDefault;
                mounted?: boolean;
            }>;
            envFrom?: Array<{
                type: 'secret' | 'configMap';
                name: string;
                prefix?: string;
            }>;
            dockerImage?: string;
            serviceAccount?: string;
            transportType?: 'stdio' | 'streamable-http';
            httpPort?: number;
            httpPath?: string;
            nodePort?: number;
            imagePullSecrets?: Array<{
                source: 'existing';
                name: string;
            } | {
                source: 'credentials';
                server: string;
                username: string;
                password?: string;
                email?: string;
            }>;
        } | null;
        deploymentSpecYaml: string | null;
        userConfig: {
            [key: string]: UserConfigField;
        } | null;
        oauthConfig: {
            name: string;
            server_url: string;
            grant_type?: 'authorization_code' | 'client_credentials';
            auth_server_url?: string;
            authorization_endpoint?: string;
            resource_metadata_url?: string;
            client_id: string;
            client_secret?: string;
            audience?: string;
            redirect_uris: Array<string>;
            scopes: Array<string>;
            description?: string;
            well_known_url?: string;
            default_scopes: Array<string>;
            supports_resource_metadata: boolean;
            generic_oauth?: boolean;
            token_endpoint?: string;
            access_token_env_var?: string;
            requires_proxy?: boolean;
            provider_name?: string;
            browser_auth?: boolean;
            streamable_http_url?: string;
            streamable_http_port?: number;
        } | null;
        enterpriseManagedConfig: {
            identityProviderId?: string;
            assertionMode?: 'exchange' | 'passthrough';
            resourceType?: 'mcp' | 'oauth_protected_resource' | 'secret' | 'service_account' | 'custom_http';
            resourceIdentifier?: string;
            requestedIssuer?: string;
            requestedCredentialType?: 'id_jag' | 'bearer_token' | 'secret' | 'service_account' | 'opaque_json';
            scopes?: Array<string>;
            audience?: string;
            clientIdOverride?: string;
            clientSecretOverride?: string;
            tokenInjectionMode?: 'authorization_bearer' | 'raw_authorization' | 'header' | 'env' | 'body_field';
            headerName?: string;
            envVarName?: string;
            bodyFieldName?: string;
            responseFieldPath?: string;
            fallbackMode?: 'fail_closed' | 'fallback_to_dynamic' | 'fallback_to_static';
            cacheTtlSeconds?: number;
        } | null;
        icon: string | null;
        organizationId: string | null;
        authorId: string | null;
        scope: 'personal' | 'team' | 'org';
        parentCatalogItemId: string | null;
        childName: string | null;
        presetEntryId: string | null;
        presetFieldValues: {
            [key: string]: UserConfigFieldDefault;
        };
        presetSecretId: string | null;
        catalogReinstallRequired: boolean;
        createdAt: string;
        updatedAt: string;
        labels: Array<{
            key: string;
            value: string;
        }>;
        teams: Array<{
            id: string;
            name: string;
        }>;
        authorName?: string | null;
        toolCount: number;
    }>;
};

export type GetInternalMcpCatalogResponse = GetInternalMcpCatalogResponses[keyof GetInternalMcpCatalogResponses];

export type CreateInternalMcpCatalogItemData = {
    body: {
        id?: string;
        name: string;
        version?: string | null;
        description?: string | null;
        instructions?: string | null;
        repository?: string | null;
        installationCommand?: string | null;
        requiresAuth?: boolean;
        authDescription?: string | null;
        authFields?: Array<{
            name: string;
            label: string;
            type: string;
            required?: boolean;
            description?: string;
        }> | null;
        serverType: 'local' | 'remote' | 'builtin';
        multitenant?: boolean;
        serverUrl?: string | null;
        docsUrl?: string | null;
        clientSecretId?: string | null;
        localConfigSecretId?: string | null;
        localConfig?: {
            command?: string;
            arguments?: Array<string>;
            environment?: Array<{
                key: string;
                type: 'plain_text' | 'secret' | 'boolean' | 'number';
                value?: string;
                promptOnInstallation: boolean;
                promptOnPreset?: boolean;
                required?: boolean;
                description?: string;
                default?: LocalConfigEnvironmentDefaultInput;
                mounted?: boolean;
            }>;
            envFrom?: Array<{
                type: 'secret' | 'configMap';
                name: string;
                prefix?: string;
            }>;
            dockerImage?: string;
            transportType?: 'stdio' | 'streamable-http';
            httpPort?: number;
            httpPath?: string;
            nodePort?: number;
            serviceAccount?: string;
            imagePullSecrets?: Array<{
                source: 'existing';
                name: string;
            } | {
                source: 'credentials';
                server: string;
                username: string;
                password?: string;
                email?: string;
            }>;
        } | null;
        deploymentSpecYaml?: string | null;
        userConfig?: {
            [key: string]: UserConfigFieldInput;
        } | null;
        oauthConfig?: {
            name: string;
            server_url: string;
            grant_type?: 'authorization_code' | 'client_credentials';
            auth_server_url?: string;
            authorization_endpoint?: string;
            resource_metadata_url?: string;
            client_id: string;
            client_secret?: string;
            audience?: string;
            redirect_uris: Array<string>;
            scopes: Array<string>;
            description?: string;
            well_known_url?: string;
            default_scopes: Array<string>;
            supports_resource_metadata: boolean;
            generic_oauth?: boolean;
            token_endpoint?: string;
            access_token_env_var?: string;
            requires_proxy?: boolean;
            provider_name?: string;
            browser_auth?: boolean;
            streamable_http_url?: string;
            streamable_http_port?: number;
        } | null;
        enterpriseManagedConfig?: {
            identityProviderId?: string;
            assertionMode?: 'exchange' | 'passthrough';
            resourceType?: 'mcp' | 'oauth_protected_resource' | 'secret' | 'service_account' | 'custom_http';
            resourceIdentifier?: string;
            requestedIssuer?: string;
            requestedCredentialType?: 'id_jag' | 'bearer_token' | 'secret' | 'service_account' | 'opaque_json';
            scopes?: Array<string>;
            audience?: string;
            clientIdOverride?: string;
            clientSecretOverride?: string;
            tokenInjectionMode?: 'authorization_bearer' | 'raw_authorization' | 'header' | 'env' | 'body_field';
            headerName?: string;
            envVarName?: string;
            bodyFieldName?: string;
            responseFieldPath?: string;
            fallbackMode?: 'fail_closed' | 'fallback_to_dynamic' | 'fallback_to_static';
            cacheTtlSeconds?: number;
        } | null;
        icon?: string | null;
        scope?: 'personal' | 'team' | 'org';
        parentCatalogItemId?: string | null;
        childName?: string | null;
        presetEntryId?: string | null;
        presetFieldValues?: {
            [key: string]: UserConfigFieldDefaultInput;
        };
        presetSecretId?: string | null;
        catalogReinstallRequired?: boolean;
        labels?: Array<{
            key: string;
            value: string;
        }>;
        teams?: Array<string>;
        oauthClientSecretVaultPath?: string;
        oauthClientSecretVaultKey?: string;
        localConfigVaultPath?: string;
        localConfigVaultKey?: string;
    };
    path?: never;
    query?: never;
    url: '/api/internal_mcp_catalog';
};

export type CreateInternalMcpCatalogItemErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CreateInternalMcpCatalogItemError = CreateInternalMcpCatalogItemErrors[keyof CreateInternalMcpCatalogItemErrors];

export type CreateInternalMcpCatalogItemResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        version: string | null;
        description: string | null;
        instructions: string | null;
        repository: string | null;
        installationCommand: string | null;
        requiresAuth: boolean;
        authDescription: string | null;
        authFields: Array<{
            name: string;
            label: string;
            type: string;
            required: boolean;
            description?: string;
        }> | null;
        serverType: 'local' | 'remote' | 'builtin';
        multitenant: boolean;
        serverUrl: string | null;
        docsUrl: string | null;
        clientSecretId: string | null;
        localConfigSecretId: string | null;
        localConfig: {
            command?: string;
            arguments?: Array<string>;
            environment?: Array<{
                key: string;
                type: 'plain_text' | 'secret' | 'boolean' | 'number';
                value?: string;
                promptOnInstallation: boolean;
                promptOnPreset?: boolean;
                required?: boolean;
                description?: string;
                default?: LocalConfigEnvironmentDefault;
                mounted?: boolean;
            }>;
            envFrom?: Array<{
                type: 'secret' | 'configMap';
                name: string;
                prefix?: string;
            }>;
            dockerImage?: string;
            serviceAccount?: string;
            transportType?: 'stdio' | 'streamable-http';
            httpPort?: number;
            httpPath?: string;
            nodePort?: number;
            imagePullSecrets?: Array<{
                source: 'existing';
                name: string;
            } | {
                source: 'credentials';
                server: string;
                username: string;
                password?: string;
                email?: string;
            }>;
        } | null;
        deploymentSpecYaml: string | null;
        userConfig: {
            [key: string]: UserConfigField;
        } | null;
        oauthConfig: {
            name: string;
            server_url: string;
            grant_type?: 'authorization_code' | 'client_credentials';
            auth_server_url?: string;
            authorization_endpoint?: string;
            resource_metadata_url?: string;
            client_id: string;
            client_secret?: string;
            audience?: string;
            redirect_uris: Array<string>;
            scopes: Array<string>;
            description?: string;
            well_known_url?: string;
            default_scopes: Array<string>;
            supports_resource_metadata: boolean;
            generic_oauth?: boolean;
            token_endpoint?: string;
            access_token_env_var?: string;
            requires_proxy?: boolean;
            provider_name?: string;
            browser_auth?: boolean;
            streamable_http_url?: string;
            streamable_http_port?: number;
        } | null;
        enterpriseManagedConfig: {
            identityProviderId?: string;
            assertionMode?: 'exchange' | 'passthrough';
            resourceType?: 'mcp' | 'oauth_protected_resource' | 'secret' | 'service_account' | 'custom_http';
            resourceIdentifier?: string;
            requestedIssuer?: string;
            requestedCredentialType?: 'id_jag' | 'bearer_token' | 'secret' | 'service_account' | 'opaque_json';
            scopes?: Array<string>;
            audience?: string;
            clientIdOverride?: string;
            clientSecretOverride?: string;
            tokenInjectionMode?: 'authorization_bearer' | 'raw_authorization' | 'header' | 'env' | 'body_field';
            headerName?: string;
            envVarName?: string;
            bodyFieldName?: string;
            responseFieldPath?: string;
            fallbackMode?: 'fail_closed' | 'fallback_to_dynamic' | 'fallback_to_static';
            cacheTtlSeconds?: number;
        } | null;
        icon: string | null;
        organizationId: string | null;
        authorId: string | null;
        scope: 'personal' | 'team' | 'org';
        parentCatalogItemId: string | null;
        childName: string | null;
        presetEntryId: string | null;
        presetFieldValues: {
            [key: string]: UserConfigFieldDefault;
        };
        presetSecretId: string | null;
        catalogReinstallRequired: boolean;
        createdAt: string;
        updatedAt: string;
        labels: Array<{
            key: string;
            value: string;
        }>;
        teams: Array<{
            id: string;
            name: string;
        }>;
        authorName?: string | null;
    };
};

export type CreateInternalMcpCatalogItemResponse = CreateInternalMcpCatalogItemResponses[keyof CreateInternalMcpCatalogItemResponses];

export type DeleteInternalMcpCatalogItemData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/internal_mcp_catalog/{id}';
};

export type DeleteInternalMcpCatalogItemErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeleteInternalMcpCatalogItemError = DeleteInternalMcpCatalogItemErrors[keyof DeleteInternalMcpCatalogItemErrors];

export type DeleteInternalMcpCatalogItemResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type DeleteInternalMcpCatalogItemResponse = DeleteInternalMcpCatalogItemResponses[keyof DeleteInternalMcpCatalogItemResponses];

export type GetInternalMcpCatalogItemData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/internal_mcp_catalog/{id}';
};

export type GetInternalMcpCatalogItemErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetInternalMcpCatalogItemError = GetInternalMcpCatalogItemErrors[keyof GetInternalMcpCatalogItemErrors];

export type GetInternalMcpCatalogItemResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        version: string | null;
        description: string | null;
        instructions: string | null;
        repository: string | null;
        installationCommand: string | null;
        requiresAuth: boolean;
        authDescription: string | null;
        authFields: Array<{
            name: string;
            label: string;
            type: string;
            required: boolean;
            description?: string;
        }> | null;
        serverType: 'local' | 'remote' | 'builtin';
        multitenant: boolean;
        serverUrl: string | null;
        docsUrl: string | null;
        clientSecretId: string | null;
        localConfigSecretId: string | null;
        localConfig: {
            command?: string;
            arguments?: Array<string>;
            environment?: Array<{
                key: string;
                type: 'plain_text' | 'secret' | 'boolean' | 'number';
                value?: string;
                promptOnInstallation: boolean;
                promptOnPreset?: boolean;
                required?: boolean;
                description?: string;
                default?: LocalConfigEnvironmentDefault;
                mounted?: boolean;
            }>;
            envFrom?: Array<{
                type: 'secret' | 'configMap';
                name: string;
                prefix?: string;
            }>;
            dockerImage?: string;
            serviceAccount?: string;
            transportType?: 'stdio' | 'streamable-http';
            httpPort?: number;
            httpPath?: string;
            nodePort?: number;
            imagePullSecrets?: Array<{
                source: 'existing';
                name: string;
            } | {
                source: 'credentials';
                server: string;
                username: string;
                password?: string;
                email?: string;
            }>;
        } | null;
        deploymentSpecYaml: string | null;
        userConfig: {
            [key: string]: UserConfigField;
        } | null;
        oauthConfig: {
            name: string;
            server_url: string;
            grant_type?: 'authorization_code' | 'client_credentials';
            auth_server_url?: string;
            authorization_endpoint?: string;
            resource_metadata_url?: string;
            client_id: string;
            client_secret?: string;
            audience?: string;
            redirect_uris: Array<string>;
            scopes: Array<string>;
            description?: string;
            well_known_url?: string;
            default_scopes: Array<string>;
            supports_resource_metadata: boolean;
            generic_oauth?: boolean;
            token_endpoint?: string;
            access_token_env_var?: string;
            requires_proxy?: boolean;
            provider_name?: string;
            browser_auth?: boolean;
            streamable_http_url?: string;
            streamable_http_port?: number;
        } | null;
        enterpriseManagedConfig: {
            identityProviderId?: string;
            assertionMode?: 'exchange' | 'passthrough';
            resourceType?: 'mcp' | 'oauth_protected_resource' | 'secret' | 'service_account' | 'custom_http';
            resourceIdentifier?: string;
            requestedIssuer?: string;
            requestedCredentialType?: 'id_jag' | 'bearer_token' | 'secret' | 'service_account' | 'opaque_json';
            scopes?: Array<string>;
            audience?: string;
            clientIdOverride?: string;
            clientSecretOverride?: string;
            tokenInjectionMode?: 'authorization_bearer' | 'raw_authorization' | 'header' | 'env' | 'body_field';
            headerName?: string;
            envVarName?: string;
            bodyFieldName?: string;
            responseFieldPath?: string;
            fallbackMode?: 'fail_closed' | 'fallback_to_dynamic' | 'fallback_to_static';
            cacheTtlSeconds?: number;
        } | null;
        icon: string | null;
        organizationId: string | null;
        authorId: string | null;
        scope: 'personal' | 'team' | 'org';
        parentCatalogItemId: string | null;
        childName: string | null;
        presetEntryId: string | null;
        presetFieldValues: {
            [key: string]: UserConfigFieldDefault;
        };
        presetSecretId: string | null;
        catalogReinstallRequired: boolean;
        createdAt: string;
        updatedAt: string;
        labels: Array<{
            key: string;
            value: string;
        }>;
        teams: Array<{
            id: string;
            name: string;
        }>;
        authorName?: string | null;
    };
};

export type GetInternalMcpCatalogItemResponse = GetInternalMcpCatalogItemResponses[keyof GetInternalMcpCatalogItemResponses];

export type UpdateInternalMcpCatalogItemData = {
    body: {
        name?: string;
        version?: string | null;
        description?: string | null;
        instructions?: string | null;
        repository?: string | null;
        installationCommand?: string | null;
        requiresAuth?: boolean;
        authDescription?: string | null;
        authFields?: Array<{
            name: string;
            label: string;
            type: string;
            required?: boolean;
            description?: string;
        }> | null;
        serverType?: 'local' | 'remote' | 'builtin';
        serverUrl?: string | null;
        docsUrl?: string | null;
        clientSecretId?: string | null;
        localConfigSecretId?: string | null;
        localConfig?: {
            command?: string;
            arguments?: Array<string>;
            environment?: Array<{
                key: string;
                type: 'plain_text' | 'secret' | 'boolean' | 'number';
                value?: string;
                promptOnInstallation: boolean;
                promptOnPreset?: boolean;
                required?: boolean;
                description?: string;
                default?: LocalConfigEnvironmentDefaultInput;
                mounted?: boolean;
            }>;
            envFrom?: Array<{
                type: 'secret' | 'configMap';
                name: string;
                prefix?: string;
            }>;
            dockerImage?: string;
            transportType?: 'stdio' | 'streamable-http';
            httpPort?: number;
            httpPath?: string;
            nodePort?: number;
            serviceAccount?: string;
            imagePullSecrets?: Array<{
                source: 'existing';
                name: string;
            } | {
                source: 'credentials';
                server: string;
                username: string;
                password?: string;
                email?: string;
            }>;
        } | null;
        deploymentSpecYaml?: string | null;
        userConfig?: {
            [key: string]: UserConfigFieldInput;
        } | null;
        oauthConfig?: {
            name: string;
            server_url: string;
            grant_type?: 'authorization_code' | 'client_credentials';
            auth_server_url?: string;
            authorization_endpoint?: string;
            resource_metadata_url?: string;
            client_id: string;
            client_secret?: string;
            audience?: string;
            redirect_uris: Array<string>;
            scopes: Array<string>;
            description?: string;
            well_known_url?: string;
            default_scopes: Array<string>;
            supports_resource_metadata: boolean;
            generic_oauth?: boolean;
            token_endpoint?: string;
            access_token_env_var?: string;
            requires_proxy?: boolean;
            provider_name?: string;
            browser_auth?: boolean;
            streamable_http_url?: string;
            streamable_http_port?: number;
        } | null;
        enterpriseManagedConfig?: {
            identityProviderId?: string;
            assertionMode?: 'exchange' | 'passthrough';
            resourceType?: 'mcp' | 'oauth_protected_resource' | 'secret' | 'service_account' | 'custom_http';
            resourceIdentifier?: string;
            requestedIssuer?: string;
            requestedCredentialType?: 'id_jag' | 'bearer_token' | 'secret' | 'service_account' | 'opaque_json';
            scopes?: Array<string>;
            audience?: string;
            clientIdOverride?: string;
            clientSecretOverride?: string;
            tokenInjectionMode?: 'authorization_bearer' | 'raw_authorization' | 'header' | 'env' | 'body_field';
            headerName?: string;
            envVarName?: string;
            bodyFieldName?: string;
            responseFieldPath?: string;
            fallbackMode?: 'fail_closed' | 'fallback_to_dynamic' | 'fallback_to_static';
            cacheTtlSeconds?: number;
        } | null;
        icon?: string | null;
        scope?: 'personal' | 'team' | 'org';
        childName?: string | null;
        presetEntryId?: string | null;
        presetFieldValues?: {
            [key: string]: UserConfigFieldDefaultInput;
        };
        presetSecretId?: string | null;
        catalogReinstallRequired?: boolean;
        labels?: Array<{
            key: string;
            value: string;
        }>;
        teams?: Array<string>;
        oauthClientSecretVaultPath?: string;
        oauthClientSecretVaultKey?: string;
        localConfigVaultPath?: string;
        localConfigVaultKey?: string;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/internal_mcp_catalog/{id}';
};

export type UpdateInternalMcpCatalogItemErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateInternalMcpCatalogItemError = UpdateInternalMcpCatalogItemErrors[keyof UpdateInternalMcpCatalogItemErrors];

export type UpdateInternalMcpCatalogItemResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        version: string | null;
        description: string | null;
        instructions: string | null;
        repository: string | null;
        installationCommand: string | null;
        requiresAuth: boolean;
        authDescription: string | null;
        authFields: Array<{
            name: string;
            label: string;
            type: string;
            required: boolean;
            description?: string;
        }> | null;
        serverType: 'local' | 'remote' | 'builtin';
        multitenant: boolean;
        serverUrl: string | null;
        docsUrl: string | null;
        clientSecretId: string | null;
        localConfigSecretId: string | null;
        localConfig: {
            command?: string;
            arguments?: Array<string>;
            environment?: Array<{
                key: string;
                type: 'plain_text' | 'secret' | 'boolean' | 'number';
                value?: string;
                promptOnInstallation: boolean;
                promptOnPreset?: boolean;
                required?: boolean;
                description?: string;
                default?: LocalConfigEnvironmentDefault;
                mounted?: boolean;
            }>;
            envFrom?: Array<{
                type: 'secret' | 'configMap';
                name: string;
                prefix?: string;
            }>;
            dockerImage?: string;
            serviceAccount?: string;
            transportType?: 'stdio' | 'streamable-http';
            httpPort?: number;
            httpPath?: string;
            nodePort?: number;
            imagePullSecrets?: Array<{
                source: 'existing';
                name: string;
            } | {
                source: 'credentials';
                server: string;
                username: string;
                password?: string;
                email?: string;
            }>;
        } | null;
        deploymentSpecYaml: string | null;
        userConfig: {
            [key: string]: UserConfigField;
        } | null;
        oauthConfig: {
            name: string;
            server_url: string;
            grant_type?: 'authorization_code' | 'client_credentials';
            auth_server_url?: string;
            authorization_endpoint?: string;
            resource_metadata_url?: string;
            client_id: string;
            client_secret?: string;
            audience?: string;
            redirect_uris: Array<string>;
            scopes: Array<string>;
            description?: string;
            well_known_url?: string;
            default_scopes: Array<string>;
            supports_resource_metadata: boolean;
            generic_oauth?: boolean;
            token_endpoint?: string;
            access_token_env_var?: string;
            requires_proxy?: boolean;
            provider_name?: string;
            browser_auth?: boolean;
            streamable_http_url?: string;
            streamable_http_port?: number;
        } | null;
        enterpriseManagedConfig: {
            identityProviderId?: string;
            assertionMode?: 'exchange' | 'passthrough';
            resourceType?: 'mcp' | 'oauth_protected_resource' | 'secret' | 'service_account' | 'custom_http';
            resourceIdentifier?: string;
            requestedIssuer?: string;
            requestedCredentialType?: 'id_jag' | 'bearer_token' | 'secret' | 'service_account' | 'opaque_json';
            scopes?: Array<string>;
            audience?: string;
            clientIdOverride?: string;
            clientSecretOverride?: string;
            tokenInjectionMode?: 'authorization_bearer' | 'raw_authorization' | 'header' | 'env' | 'body_field';
            headerName?: string;
            envVarName?: string;
            bodyFieldName?: string;
            responseFieldPath?: string;
            fallbackMode?: 'fail_closed' | 'fallback_to_dynamic' | 'fallback_to_static';
            cacheTtlSeconds?: number;
        } | null;
        icon: string | null;
        organizationId: string | null;
        authorId: string | null;
        scope: 'personal' | 'team' | 'org';
        parentCatalogItemId: string | null;
        childName: string | null;
        presetEntryId: string | null;
        presetFieldValues: {
            [key: string]: UserConfigFieldDefault;
        };
        presetSecretId: string | null;
        catalogReinstallRequired: boolean;
        createdAt: string;
        updatedAt: string;
        labels: Array<{
            key: string;
            value: string;
        }>;
        teams: Array<{
            id: string;
            name: string;
        }>;
        authorName?: string | null;
    };
};

export type UpdateInternalMcpCatalogItemResponse = UpdateInternalMcpCatalogItemResponses[keyof UpdateInternalMcpCatalogItemResponses];

export type GetInternalMcpCatalogToolsData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/internal_mcp_catalog/{id}/tools';
};

export type GetInternalMcpCatalogToolsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetInternalMcpCatalogToolsError = GetInternalMcpCatalogToolsErrors[keyof GetInternalMcpCatalogToolsErrors];

export type GetInternalMcpCatalogToolsResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        name: string;
        description: string | null;
        parameters: {
            [key: string]: unknown;
        };
        createdAt: string;
        assignedAgentCount: number;
        assignedAgents: Array<{
            id: string;
            name: string;
        }>;
    }>;
};

export type GetInternalMcpCatalogToolsResponse = GetInternalMcpCatalogToolsResponses[keyof GetInternalMcpCatalogToolsResponses];

export type ReinstallInternalMcpCatalogItemData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/internal_mcp_catalog/{id}/reinstall';
};

export type ReinstallInternalMcpCatalogItemErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type ReinstallInternalMcpCatalogItemError = ReinstallInternalMcpCatalogItemErrors[keyof ReinstallInternalMcpCatalogItemErrors];

export type ReinstallInternalMcpCatalogItemResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type ReinstallInternalMcpCatalogItemResponse = ReinstallInternalMcpCatalogItemResponses[keyof ReinstallInternalMcpCatalogItemResponses];

export type DeleteInternalMcpCatalogItemByNameData = {
    body?: never;
    path: {
        name: string;
    };
    query?: never;
    url: '/api/internal_mcp_catalog/by-name/{name}';
};

export type DeleteInternalMcpCatalogItemByNameErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeleteInternalMcpCatalogItemByNameError = DeleteInternalMcpCatalogItemByNameErrors[keyof DeleteInternalMcpCatalogItemByNameErrors];

export type DeleteInternalMcpCatalogItemByNameResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type DeleteInternalMcpCatalogItemByNameResponse = DeleteInternalMcpCatalogItemByNameResponses[keyof DeleteInternalMcpCatalogItemByNameResponses];

export type GetDeploymentYamlPreviewData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/internal_mcp_catalog/{id}/deployment-yaml-preview';
};

export type GetDeploymentYamlPreviewErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetDeploymentYamlPreviewError = GetDeploymentYamlPreviewErrors[keyof GetDeploymentYamlPreviewErrors];

export type GetDeploymentYamlPreviewResponses = {
    /**
     * Default Response
     */
    200: {
        yaml: string;
    };
};

export type GetDeploymentYamlPreviewResponse = GetDeploymentYamlPreviewResponses[keyof GetDeploymentYamlPreviewResponses];

export type ValidateDeploymentYamlData = {
    body: {
        yaml: string;
    };
    path?: never;
    query?: never;
    url: '/api/internal_mcp_catalog/validate-deployment-yaml';
};

export type ValidateDeploymentYamlErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type ValidateDeploymentYamlError = ValidateDeploymentYamlErrors[keyof ValidateDeploymentYamlErrors];

export type ValidateDeploymentYamlResponses = {
    /**
     * Default Response
     */
    200: {
        valid: boolean;
        errors: Array<string>;
        warnings: Array<string>;
    };
};

export type ValidateDeploymentYamlResponse = ValidateDeploymentYamlResponses[keyof ValidateDeploymentYamlResponses];

export type ResetDeploymentYamlData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/internal_mcp_catalog/{id}/reset-deployment-yaml';
};

export type ResetDeploymentYamlErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type ResetDeploymentYamlError = ResetDeploymentYamlErrors[keyof ResetDeploymentYamlErrors];

export type ResetDeploymentYamlResponses = {
    /**
     * Default Response
     */
    200: {
        yaml: string;
    };
};

export type ResetDeploymentYamlResponse = ResetDeploymentYamlResponses[keyof ResetDeploymentYamlResponses];

export type GetK8sImagePullSecretsData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/k8s/image-pull-secrets';
};

export type GetK8sImagePullSecretsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetK8sImagePullSecretsError = GetK8sImagePullSecretsErrors[keyof GetK8sImagePullSecretsErrors];

export type GetK8sImagePullSecretsResponses = {
    /**
     * Default Response
     */
    200: Array<{
        name: string;
    }>;
};

export type GetK8sImagePullSecretsResponse = GetK8sImagePullSecretsResponses[keyof GetK8sImagePullSecretsResponses];

export type GetInternalMcpCatalogLabelKeysData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/internal_mcp_catalog/labels/keys';
};

export type GetInternalMcpCatalogLabelKeysErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetInternalMcpCatalogLabelKeysError = GetInternalMcpCatalogLabelKeysErrors[keyof GetInternalMcpCatalogLabelKeysErrors];

export type GetInternalMcpCatalogLabelKeysResponses = {
    /**
     * Default Response
     */
    200: Array<string>;
};

export type GetInternalMcpCatalogLabelKeysResponse = GetInternalMcpCatalogLabelKeysResponses[keyof GetInternalMcpCatalogLabelKeysResponses];

export type GetCatalogChildrenData = {
    body?: never;
    path: {
        catalogId: string;
    };
    query?: never;
    url: '/api/internal_mcp_catalog/{catalogId}/children';
};

export type GetCatalogChildrenErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetCatalogChildrenError = GetCatalogChildrenErrors[keyof GetCatalogChildrenErrors];

export type GetCatalogChildrenResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        name: string;
        version: string | null;
        description: string | null;
        instructions: string | null;
        repository: string | null;
        installationCommand: string | null;
        requiresAuth: boolean;
        authDescription: string | null;
        authFields: Array<{
            name: string;
            label: string;
            type: string;
            required: boolean;
            description?: string;
        }> | null;
        serverType: 'local' | 'remote' | 'builtin';
        multitenant: boolean;
        serverUrl: string | null;
        docsUrl: string | null;
        clientSecretId: string | null;
        localConfigSecretId: string | null;
        localConfig: {
            command?: string;
            arguments?: Array<string>;
            environment?: Array<{
                key: string;
                type: 'plain_text' | 'secret' | 'boolean' | 'number';
                value?: string;
                promptOnInstallation: boolean;
                promptOnPreset?: boolean;
                required?: boolean;
                description?: string;
                default?: LocalConfigEnvironmentDefault;
                mounted?: boolean;
            }>;
            envFrom?: Array<{
                type: 'secret' | 'configMap';
                name: string;
                prefix?: string;
            }>;
            dockerImage?: string;
            serviceAccount?: string;
            transportType?: 'stdio' | 'streamable-http';
            httpPort?: number;
            httpPath?: string;
            nodePort?: number;
            imagePullSecrets?: Array<{
                source: 'existing';
                name: string;
            } | {
                source: 'credentials';
                server: string;
                username: string;
                password?: string;
                email?: string;
            }>;
        } | null;
        deploymentSpecYaml: string | null;
        userConfig: {
            [key: string]: UserConfigField;
        } | null;
        oauthConfig: {
            name: string;
            server_url: string;
            grant_type?: 'authorization_code' | 'client_credentials';
            auth_server_url?: string;
            authorization_endpoint?: string;
            resource_metadata_url?: string;
            client_id: string;
            client_secret?: string;
            audience?: string;
            redirect_uris: Array<string>;
            scopes: Array<string>;
            description?: string;
            well_known_url?: string;
            default_scopes: Array<string>;
            supports_resource_metadata: boolean;
            generic_oauth?: boolean;
            token_endpoint?: string;
            access_token_env_var?: string;
            requires_proxy?: boolean;
            provider_name?: string;
            browser_auth?: boolean;
            streamable_http_url?: string;
            streamable_http_port?: number;
        } | null;
        enterpriseManagedConfig: {
            identityProviderId?: string;
            assertionMode?: 'exchange' | 'passthrough';
            resourceType?: 'mcp' | 'oauth_protected_resource' | 'secret' | 'service_account' | 'custom_http';
            resourceIdentifier?: string;
            requestedIssuer?: string;
            requestedCredentialType?: 'id_jag' | 'bearer_token' | 'secret' | 'service_account' | 'opaque_json';
            scopes?: Array<string>;
            audience?: string;
            clientIdOverride?: string;
            clientSecretOverride?: string;
            tokenInjectionMode?: 'authorization_bearer' | 'raw_authorization' | 'header' | 'env' | 'body_field';
            headerName?: string;
            envVarName?: string;
            bodyFieldName?: string;
            responseFieldPath?: string;
            fallbackMode?: 'fail_closed' | 'fallback_to_dynamic' | 'fallback_to_static';
            cacheTtlSeconds?: number;
        } | null;
        icon: string | null;
        organizationId: string | null;
        authorId: string | null;
        scope: 'personal' | 'team' | 'org';
        parentCatalogItemId: string | null;
        childName: string | null;
        presetEntryId: string | null;
        presetFieldValues: {
            [key: string]: UserConfigFieldDefault;
        };
        presetSecretId: string | null;
        catalogReinstallRequired: boolean;
        createdAt: string;
        updatedAt: string;
        labels: Array<{
            key: string;
            value: string;
        }>;
        teams: Array<{
            id: string;
            name: string;
        }>;
        authorName?: string | null;
    }>;
};

export type GetCatalogChildrenResponse = GetCatalogChildrenResponses[keyof GetCatalogChildrenResponses];

export type CreateCatalogChildData = {
    body: {
        presetEntryId: string;
        presetFieldValues?: {
            [key: string]: UserConfigFieldDefaultInput;
        };
    };
    path: {
        catalogId: string;
    };
    query?: never;
    url: '/api/internal_mcp_catalog/{catalogId}/children';
};

export type CreateCatalogChildErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CreateCatalogChildError = CreateCatalogChildErrors[keyof CreateCatalogChildErrors];

export type CreateCatalogChildResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        version: string | null;
        description: string | null;
        instructions: string | null;
        repository: string | null;
        installationCommand: string | null;
        requiresAuth: boolean;
        authDescription: string | null;
        authFields: Array<{
            name: string;
            label: string;
            type: string;
            required: boolean;
            description?: string;
        }> | null;
        serverType: 'local' | 'remote' | 'builtin';
        multitenant: boolean;
        serverUrl: string | null;
        docsUrl: string | null;
        clientSecretId: string | null;
        localConfigSecretId: string | null;
        localConfig: {
            command?: string;
            arguments?: Array<string>;
            environment?: Array<{
                key: string;
                type: 'plain_text' | 'secret' | 'boolean' | 'number';
                value?: string;
                promptOnInstallation: boolean;
                promptOnPreset?: boolean;
                required?: boolean;
                description?: string;
                default?: LocalConfigEnvironmentDefault;
                mounted?: boolean;
            }>;
            envFrom?: Array<{
                type: 'secret' | 'configMap';
                name: string;
                prefix?: string;
            }>;
            dockerImage?: string;
            serviceAccount?: string;
            transportType?: 'stdio' | 'streamable-http';
            httpPort?: number;
            httpPath?: string;
            nodePort?: number;
            imagePullSecrets?: Array<{
                source: 'existing';
                name: string;
            } | {
                source: 'credentials';
                server: string;
                username: string;
                password?: string;
                email?: string;
            }>;
        } | null;
        deploymentSpecYaml: string | null;
        userConfig: {
            [key: string]: UserConfigField;
        } | null;
        oauthConfig: {
            name: string;
            server_url: string;
            grant_type?: 'authorization_code' | 'client_credentials';
            auth_server_url?: string;
            authorization_endpoint?: string;
            resource_metadata_url?: string;
            client_id: string;
            client_secret?: string;
            audience?: string;
            redirect_uris: Array<string>;
            scopes: Array<string>;
            description?: string;
            well_known_url?: string;
            default_scopes: Array<string>;
            supports_resource_metadata: boolean;
            generic_oauth?: boolean;
            token_endpoint?: string;
            access_token_env_var?: string;
            requires_proxy?: boolean;
            provider_name?: string;
            browser_auth?: boolean;
            streamable_http_url?: string;
            streamable_http_port?: number;
        } | null;
        enterpriseManagedConfig: {
            identityProviderId?: string;
            assertionMode?: 'exchange' | 'passthrough';
            resourceType?: 'mcp' | 'oauth_protected_resource' | 'secret' | 'service_account' | 'custom_http';
            resourceIdentifier?: string;
            requestedIssuer?: string;
            requestedCredentialType?: 'id_jag' | 'bearer_token' | 'secret' | 'service_account' | 'opaque_json';
            scopes?: Array<string>;
            audience?: string;
            clientIdOverride?: string;
            clientSecretOverride?: string;
            tokenInjectionMode?: 'authorization_bearer' | 'raw_authorization' | 'header' | 'env' | 'body_field';
            headerName?: string;
            envVarName?: string;
            bodyFieldName?: string;
            responseFieldPath?: string;
            fallbackMode?: 'fail_closed' | 'fallback_to_dynamic' | 'fallback_to_static';
            cacheTtlSeconds?: number;
        } | null;
        icon: string | null;
        organizationId: string | null;
        authorId: string | null;
        scope: 'personal' | 'team' | 'org';
        parentCatalogItemId: string | null;
        childName: string | null;
        presetEntryId: string | null;
        presetFieldValues: {
            [key: string]: UserConfigFieldDefault;
        };
        presetSecretId: string | null;
        catalogReinstallRequired: boolean;
        createdAt: string;
        updatedAt: string;
        labels: Array<{
            key: string;
            value: string;
        }>;
        teams: Array<{
            id: string;
            name: string;
        }>;
        authorName?: string | null;
    };
};

export type CreateCatalogChildResponse = CreateCatalogChildResponses[keyof CreateCatalogChildResponses];

export type UpdateCatalogChildData = {
    body: {
        presetFieldValues?: {
            [key: string]: UserConfigFieldDefaultInput;
        };
    };
    path: {
        catalogId: string;
        childId: string;
    };
    query?: never;
    url: '/api/internal_mcp_catalog/{catalogId}/children/{childId}';
};

export type UpdateCatalogChildErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateCatalogChildError = UpdateCatalogChildErrors[keyof UpdateCatalogChildErrors];

export type UpdateCatalogChildResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        version: string | null;
        description: string | null;
        instructions: string | null;
        repository: string | null;
        installationCommand: string | null;
        requiresAuth: boolean;
        authDescription: string | null;
        authFields: Array<{
            name: string;
            label: string;
            type: string;
            required: boolean;
            description?: string;
        }> | null;
        serverType: 'local' | 'remote' | 'builtin';
        multitenant: boolean;
        serverUrl: string | null;
        docsUrl: string | null;
        clientSecretId: string | null;
        localConfigSecretId: string | null;
        localConfig: {
            command?: string;
            arguments?: Array<string>;
            environment?: Array<{
                key: string;
                type: 'plain_text' | 'secret' | 'boolean' | 'number';
                value?: string;
                promptOnInstallation: boolean;
                promptOnPreset?: boolean;
                required?: boolean;
                description?: string;
                default?: LocalConfigEnvironmentDefault;
                mounted?: boolean;
            }>;
            envFrom?: Array<{
                type: 'secret' | 'configMap';
                name: string;
                prefix?: string;
            }>;
            dockerImage?: string;
            serviceAccount?: string;
            transportType?: 'stdio' | 'streamable-http';
            httpPort?: number;
            httpPath?: string;
            nodePort?: number;
            imagePullSecrets?: Array<{
                source: 'existing';
                name: string;
            } | {
                source: 'credentials';
                server: string;
                username: string;
                password?: string;
                email?: string;
            }>;
        } | null;
        deploymentSpecYaml: string | null;
        userConfig: {
            [key: string]: UserConfigField;
        } | null;
        oauthConfig: {
            name: string;
            server_url: string;
            grant_type?: 'authorization_code' | 'client_credentials';
            auth_server_url?: string;
            authorization_endpoint?: string;
            resource_metadata_url?: string;
            client_id: string;
            client_secret?: string;
            audience?: string;
            redirect_uris: Array<string>;
            scopes: Array<string>;
            description?: string;
            well_known_url?: string;
            default_scopes: Array<string>;
            supports_resource_metadata: boolean;
            generic_oauth?: boolean;
            token_endpoint?: string;
            access_token_env_var?: string;
            requires_proxy?: boolean;
            provider_name?: string;
            browser_auth?: boolean;
            streamable_http_url?: string;
            streamable_http_port?: number;
        } | null;
        enterpriseManagedConfig: {
            identityProviderId?: string;
            assertionMode?: 'exchange' | 'passthrough';
            resourceType?: 'mcp' | 'oauth_protected_resource' | 'secret' | 'service_account' | 'custom_http';
            resourceIdentifier?: string;
            requestedIssuer?: string;
            requestedCredentialType?: 'id_jag' | 'bearer_token' | 'secret' | 'service_account' | 'opaque_json';
            scopes?: Array<string>;
            audience?: string;
            clientIdOverride?: string;
            clientSecretOverride?: string;
            tokenInjectionMode?: 'authorization_bearer' | 'raw_authorization' | 'header' | 'env' | 'body_field';
            headerName?: string;
            envVarName?: string;
            bodyFieldName?: string;
            responseFieldPath?: string;
            fallbackMode?: 'fail_closed' | 'fallback_to_dynamic' | 'fallback_to_static';
            cacheTtlSeconds?: number;
        } | null;
        icon: string | null;
        organizationId: string | null;
        authorId: string | null;
        scope: 'personal' | 'team' | 'org';
        parentCatalogItemId: string | null;
        childName: string | null;
        presetEntryId: string | null;
        presetFieldValues: {
            [key: string]: UserConfigFieldDefault;
        };
        presetSecretId: string | null;
        catalogReinstallRequired: boolean;
        createdAt: string;
        updatedAt: string;
        labels: Array<{
            key: string;
            value: string;
        }>;
        teams: Array<{
            id: string;
            name: string;
        }>;
        authorName?: string | null;
    };
};

export type UpdateCatalogChildResponse = UpdateCatalogChildResponses[keyof UpdateCatalogChildResponses];

export type GetInternalMcpCatalogLabelValuesData = {
    body?: never;
    path?: never;
    query?: {
        /**
         * Filter values by label key
         */
        key?: string;
    };
    url: '/api/internal_mcp_catalog/labels/values';
};

export type GetInternalMcpCatalogLabelValuesErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetInternalMcpCatalogLabelValuesError = GetInternalMcpCatalogLabelValuesErrors[keyof GetInternalMcpCatalogLabelValuesErrors];

export type GetInternalMcpCatalogLabelValuesResponses = {
    /**
     * Default Response
     */
    200: Array<string>;
};

export type GetInternalMcpCatalogLabelValuesResponse = GetInternalMcpCatalogLabelValuesResponses[keyof GetInternalMcpCatalogLabelValuesResponses];

export type CheckInvitationData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/invitation/{id}/check';
};

export type CheckInvitationErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CheckInvitationError = CheckInvitationErrors[keyof CheckInvitationErrors];

export type CheckInvitationResponses = {
    /**
     * Default Response
     */
    200: {
        invitation: {
            id: string;
            email: string;
            organizationId: string;
            status: string;
            expiresAt: string | null;
        };
        userExists: boolean;
    };
};

export type CheckInvitationResponse = CheckInvitationResponses[keyof CheckInvitationResponses];

export type GetKnowledgeBasesData = {
    body?: never;
    path?: never;
    query?: {
        limit?: number;
        offset?: number;
        search?: string;
    };
    url: '/api/knowledge-bases';
};

export type GetKnowledgeBasesErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetKnowledgeBasesError = GetKnowledgeBasesErrors[keyof GetKnowledgeBasesErrors];

export type GetKnowledgeBasesResponses = {
    /**
     * Default Response
     */
    200: {
        data: Array<{
            id: string;
            organizationId: string;
            name: string;
            description: string | null;
            status: string;
            createdAt: string;
            updatedAt: string;
            connectors: Array<{
                id: string;
                name: string;
                connectorType: 'jira' | 'confluence' | 'github' | 'gitlab' | 'servicenow' | 'notion' | 'sharepoint' | 'gdrive' | 'file_upload' | 'dropbox' | 'onedrive' | 'asana' | 'linear' | 'outline' | 'salesforce';
            }>;
            totalDocsIndexed: number;
            assignedAgents: Array<{
                id: string;
                name: string;
                agentType: string;
            }>;
        }>;
        pagination: {
            currentPage: number;
            limit: number;
            total: number;
            totalPages: number;
            hasNext: boolean;
            hasPrev: boolean;
        };
    };
};

export type GetKnowledgeBasesResponse = GetKnowledgeBasesResponses[keyof GetKnowledgeBasesResponses];

export type CreateKnowledgeBaseData = {
    body: {
        name: string;
        description?: string;
    };
    path?: never;
    query?: never;
    url: '/api/knowledge-bases';
};

export type CreateKnowledgeBaseErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CreateKnowledgeBaseError = CreateKnowledgeBaseErrors[keyof CreateKnowledgeBaseErrors];

export type CreateKnowledgeBaseResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        name: string;
        description: string | null;
        status: string;
        createdAt: string;
        updatedAt: string;
    };
};

export type CreateKnowledgeBaseResponse = CreateKnowledgeBaseResponses[keyof CreateKnowledgeBaseResponses];

export type DeleteKnowledgeBaseData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/knowledge-bases/{id}';
};

export type DeleteKnowledgeBaseErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeleteKnowledgeBaseError = DeleteKnowledgeBaseErrors[keyof DeleteKnowledgeBaseErrors];

export type DeleteKnowledgeBaseResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type DeleteKnowledgeBaseResponse = DeleteKnowledgeBaseResponses[keyof DeleteKnowledgeBaseResponses];

export type GetKnowledgeBaseData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/knowledge-bases/{id}';
};

export type GetKnowledgeBaseErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetKnowledgeBaseError = GetKnowledgeBaseErrors[keyof GetKnowledgeBaseErrors];

export type GetKnowledgeBaseResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        name: string;
        description: string | null;
        status: string;
        createdAt: string;
        updatedAt: string;
    };
};

export type GetKnowledgeBaseResponse = GetKnowledgeBaseResponses[keyof GetKnowledgeBaseResponses];

export type UpdateKnowledgeBaseData = {
    body: {
        name?: string;
        description?: string | null;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/knowledge-bases/{id}';
};

export type UpdateKnowledgeBaseErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateKnowledgeBaseError = UpdateKnowledgeBaseErrors[keyof UpdateKnowledgeBaseErrors];

export type UpdateKnowledgeBaseResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        name: string;
        description: string | null;
        status: string;
        createdAt: string;
        updatedAt: string;
    };
};

export type UpdateKnowledgeBaseResponse = UpdateKnowledgeBaseResponses[keyof UpdateKnowledgeBaseResponses];

export type GetKnowledgeBaseHealthData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/knowledge-bases/{id}/health';
};

export type GetKnowledgeBaseHealthErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetKnowledgeBaseHealthError = GetKnowledgeBaseHealthErrors[keyof GetKnowledgeBaseHealthErrors];

export type GetKnowledgeBaseHealthResponses = {
    /**
     * Default Response
     */
    200: {
        status: 'healthy' | 'unhealthy';
        message?: string;
    };
};

export type GetKnowledgeBaseHealthResponse = GetKnowledgeBaseHealthResponses[keyof GetKnowledgeBaseHealthResponses];

export type GetConnectorsData = {
    body?: never;
    path?: never;
    query?: {
        limit?: number;
        offset?: number;
        knowledgeBaseId?: string;
        search?: string;
        connectorType?: 'jira' | 'confluence' | 'github' | 'gitlab' | 'servicenow' | 'notion' | 'sharepoint' | 'gdrive' | 'file_upload' | 'dropbox' | 'onedrive' | 'asana' | 'linear' | 'outline' | 'salesforce';
    };
    url: '/api/connectors';
};

export type GetConnectorsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetConnectorsError = GetConnectorsErrors[keyof GetConnectorsErrors];

export type GetConnectorsResponses = {
    /**
     * Default Response
     */
    200: {
        data: Array<{
            id: string;
            organizationId: string;
            name: string;
            description: string | null;
            visibility: 'org-wide' | 'team-scoped';
            teamIds: Array<string>;
            connectorType: 'jira' | 'confluence' | 'github' | 'gitlab' | 'servicenow' | 'notion' | 'sharepoint' | 'gdrive' | 'file_upload' | 'dropbox' | 'onedrive' | 'asana' | 'linear' | 'outline' | 'salesforce';
            config: {
                type: 'jira';
                jiraBaseUrl: unknown;
                isCloud: boolean;
                projectKey?: string;
                jqlQuery?: string;
                commentEmailBlacklist?: Array<string>;
                labelsToSkip?: Array<string>;
            } | {
                type: 'confluence';
                confluenceUrl: unknown;
                isCloud: boolean;
                spaceKeys?: Array<string>;
                pageIds?: Array<string>;
                cqlQuery?: string;
                labelsToSkip?: Array<string>;
                batchSize?: number;
            } | {
                type: 'github';
                githubUrl: unknown;
                owner: string;
                repos?: Array<string>;
                includeIssues?: boolean;
                includePullRequests?: boolean;
                includeMarkdownFiles?: boolean;
                labelsToSkip?: Array<string>;
            } | {
                type: 'gitlab';
                gitlabUrl: unknown;
                projectIds?: Array<number>;
                groupId?: string;
                includeIssues?: boolean;
                includeMergeRequests?: boolean;
                includeMarkdownFiles?: boolean;
                labelsToSkip?: Array<string>;
            } | {
                type: 'servicenow';
                instanceUrl: unknown;
                includeIncidents?: boolean;
                includeChanges?: boolean;
                includeChangeRequests?: boolean;
                includeProblems?: boolean;
                includeBusinessApps?: boolean;
                states?: Array<string>;
                assignmentGroups?: Array<string>;
                batchSize?: number;
                syncDataForLastMonths?: number;
            } | {
                type: 'notion';
                databaseIds?: Array<string>;
                pageIds?: Array<string>;
                batchSize?: number;
            } | {
                type: 'sharepoint';
                tenantId: string;
                siteUrl: unknown;
                driveIds?: Array<string>;
                folderPath?: string;
                recursive?: boolean;
                maxDepth?: number;
                includePages?: boolean;
                batchSize?: number;
            } | {
                type: 'gdrive';
                driveId?: string;
                driveIds?: Array<string>;
                folderId?: string;
                recursive?: boolean;
                maxDepth?: number;
                fileTypes?: Array<string>;
                batchSize?: number;
            } | {
                type: 'file_upload';
            } | {
                type: 'dropbox';
                rootPath?: string;
                fileTypes?: Array<string>;
                batchSize?: number;
                recursive?: boolean;
                maxDepth?: number;
            } | {
                type: 'onedrive';
                tenantId: string;
                userIds: Array<string>;
                folderId?: string;
                recursive?: boolean;
                maxDepth?: number;
                fileTypes?: Array<string>;
                batchSize?: number;
            } | {
                type: 'asana';
                workspaceGid: string;
                projectGids?: Array<string>;
                tagsToSkip?: Array<string>;
            } | {
                type: 'linear';
                linearApiUrl: unknown;
                teamIds?: Array<string>;
                projectIds?: Array<string>;
                states?: Array<string>;
                includeComments?: boolean;
                includeProjects?: boolean;
                includeCycles?: boolean;
                batchSize?: number;
            } | {
                type: 'outline';
                outlineUrl: unknown;
                collectionIds?: Array<string>;
                batchSize?: number;
            } | {
                type: 'salesforce';
                loginUrl: unknown;
                objects?: Array<string>;
                advancedObjectConfigJson?: string;
            };
            secretId: string | null;
            schedule: string;
            enabled: boolean;
            lastSyncAt: string | null;
            lastSyncStatus: 'running' | 'success' | 'completed_with_errors' | 'failed' | 'partial';
            lastSyncError: string | null;
            checkpoint: string | number | boolean | null | {
                [key: string]: unknown;
            } | Array<unknown> | null;
            createdAt: string;
            updatedAt: string;
            assignedAgents: Array<{
                id: string;
                name: string;
                agentType: string;
            }>;
        }>;
        pagination: {
            currentPage: number;
            limit: number;
            total: number;
            totalPages: number;
            hasNext: boolean;
            hasPrev: boolean;
        };
    };
};

export type GetConnectorsResponse = GetConnectorsResponses[keyof GetConnectorsResponses];

export type CreateConnectorData = {
    body: {
        name: string;
        description?: string | null;
        visibility?: 'org-wide' | 'team-scoped';
        teamIds?: Array<string>;
        connectorType: 'jira' | 'confluence' | 'github' | 'gitlab' | 'servicenow' | 'notion' | 'sharepoint' | 'gdrive' | 'file_upload' | 'dropbox' | 'onedrive' | 'asana' | 'linear' | 'outline' | 'salesforce';
        config: {
            type: 'jira';
            jiraBaseUrl: string;
            isCloud: boolean;
            projectKey?: string;
            jqlQuery?: string;
            commentEmailBlacklist?: Array<string>;
            labelsToSkip?: Array<string>;
        } | {
            type: 'confluence';
            confluenceUrl: string;
            isCloud: boolean;
            spaceKeys?: Array<string>;
            pageIds?: Array<string>;
            cqlQuery?: string;
            labelsToSkip?: Array<string>;
            batchSize?: number;
        } | {
            type: 'github';
            githubUrl: string;
            owner: string;
            repos?: Array<string>;
            includeIssues?: boolean;
            includePullRequests?: boolean;
            includeMarkdownFiles?: boolean;
            labelsToSkip?: Array<string>;
        } | {
            type: 'gitlab';
            gitlabUrl: string;
            projectIds?: Array<number>;
            groupId?: string;
            includeIssues?: boolean;
            includeMergeRequests?: boolean;
            includeMarkdownFiles?: boolean;
            labelsToSkip?: Array<string>;
        } | {
            type: 'servicenow';
            instanceUrl: string;
            includeIncidents?: boolean;
            includeChanges?: boolean;
            includeChangeRequests?: boolean;
            includeProblems?: boolean;
            includeBusinessApps?: boolean;
            states?: Array<string>;
            assignmentGroups?: Array<string>;
            batchSize?: number;
            syncDataForLastMonths?: number;
        } | {
            type: 'notion';
            databaseIds?: Array<string>;
            pageIds?: Array<string>;
            batchSize?: number;
        } | {
            type: 'sharepoint';
            tenantId: string;
            siteUrl: string;
            driveIds?: Array<string>;
            folderPath?: string;
            recursive?: boolean;
            maxDepth?: number;
            includePages?: boolean;
            batchSize?: number;
        } | {
            type: 'gdrive';
            driveId?: string;
            driveIds?: Array<string>;
            folderId?: string;
            recursive?: boolean;
            maxDepth?: number;
            fileTypes?: Array<string>;
            batchSize?: number;
        } | {
            type: 'file_upload';
        } | {
            type: 'dropbox';
            rootPath?: string;
            fileTypes?: Array<string>;
            batchSize?: number;
            recursive?: boolean;
            maxDepth?: number;
        } | {
            type: 'onedrive';
            tenantId: string;
            userIds: Array<string>;
            folderId?: string;
            recursive?: boolean;
            maxDepth?: number;
            fileTypes?: Array<string>;
            batchSize?: number;
        } | {
            type: 'asana';
            workspaceGid: string;
            projectGids?: Array<string>;
            tagsToSkip?: Array<string>;
        } | {
            type: 'linear';
            linearApiUrl?: string;
            teamIds?: Array<string>;
            projectIds?: Array<string>;
            states?: Array<string>;
            includeComments?: boolean;
            includeProjects?: boolean;
            includeCycles?: boolean;
            batchSize?: number;
        } | {
            type: 'outline';
            outlineUrl: string;
            collectionIds?: Array<string>;
            batchSize?: number;
        } | {
            type: 'salesforce';
            loginUrl?: string;
            objects?: Array<string>;
            advancedObjectConfigJson?: string;
        };
        credentials: {
            email?: string;
            apiToken: string;
        };
        schedule?: string;
        enabled?: boolean;
        knowledgeBaseIds?: Array<string>;
    };
    path?: never;
    query?: never;
    url: '/api/connectors';
};

export type CreateConnectorErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CreateConnectorError = CreateConnectorErrors[keyof CreateConnectorErrors];

export type CreateConnectorResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        name: string;
        description: string | null;
        visibility: 'org-wide' | 'team-scoped';
        teamIds: Array<string>;
        connectorType: 'jira' | 'confluence' | 'github' | 'gitlab' | 'servicenow' | 'notion' | 'sharepoint' | 'gdrive' | 'file_upload' | 'dropbox' | 'onedrive' | 'asana' | 'linear' | 'outline' | 'salesforce';
        config: {
            type: 'jira';
            jiraBaseUrl: unknown;
            isCloud: boolean;
            projectKey?: string;
            jqlQuery?: string;
            commentEmailBlacklist?: Array<string>;
            labelsToSkip?: Array<string>;
        } | {
            type: 'confluence';
            confluenceUrl: unknown;
            isCloud: boolean;
            spaceKeys?: Array<string>;
            pageIds?: Array<string>;
            cqlQuery?: string;
            labelsToSkip?: Array<string>;
            batchSize?: number;
        } | {
            type: 'github';
            githubUrl: unknown;
            owner: string;
            repos?: Array<string>;
            includeIssues?: boolean;
            includePullRequests?: boolean;
            includeMarkdownFiles?: boolean;
            labelsToSkip?: Array<string>;
        } | {
            type: 'gitlab';
            gitlabUrl: unknown;
            projectIds?: Array<number>;
            groupId?: string;
            includeIssues?: boolean;
            includeMergeRequests?: boolean;
            includeMarkdownFiles?: boolean;
            labelsToSkip?: Array<string>;
        } | {
            type: 'servicenow';
            instanceUrl: unknown;
            includeIncidents?: boolean;
            includeChanges?: boolean;
            includeChangeRequests?: boolean;
            includeProblems?: boolean;
            includeBusinessApps?: boolean;
            states?: Array<string>;
            assignmentGroups?: Array<string>;
            batchSize?: number;
            syncDataForLastMonths?: number;
        } | {
            type: 'notion';
            databaseIds?: Array<string>;
            pageIds?: Array<string>;
            batchSize?: number;
        } | {
            type: 'sharepoint';
            tenantId: string;
            siteUrl: unknown;
            driveIds?: Array<string>;
            folderPath?: string;
            recursive?: boolean;
            maxDepth?: number;
            includePages?: boolean;
            batchSize?: number;
        } | {
            type: 'gdrive';
            driveId?: string;
            driveIds?: Array<string>;
            folderId?: string;
            recursive?: boolean;
            maxDepth?: number;
            fileTypes?: Array<string>;
            batchSize?: number;
        } | {
            type: 'file_upload';
        } | {
            type: 'dropbox';
            rootPath?: string;
            fileTypes?: Array<string>;
            batchSize?: number;
            recursive?: boolean;
            maxDepth?: number;
        } | {
            type: 'onedrive';
            tenantId: string;
            userIds: Array<string>;
            folderId?: string;
            recursive?: boolean;
            maxDepth?: number;
            fileTypes?: Array<string>;
            batchSize?: number;
        } | {
            type: 'asana';
            workspaceGid: string;
            projectGids?: Array<string>;
            tagsToSkip?: Array<string>;
        } | {
            type: 'linear';
            linearApiUrl: unknown;
            teamIds?: Array<string>;
            projectIds?: Array<string>;
            states?: Array<string>;
            includeComments?: boolean;
            includeProjects?: boolean;
            includeCycles?: boolean;
            batchSize?: number;
        } | {
            type: 'outline';
            outlineUrl: unknown;
            collectionIds?: Array<string>;
            batchSize?: number;
        } | {
            type: 'salesforce';
            loginUrl: unknown;
            objects?: Array<string>;
            advancedObjectConfigJson?: string;
        };
        secretId: string | null;
        schedule: string;
        enabled: boolean;
        lastSyncAt: string | null;
        lastSyncStatus: 'running' | 'success' | 'completed_with_errors' | 'failed' | 'partial';
        lastSyncError: string | null;
        checkpoint: string | number | boolean | null | {
            [key: string]: unknown;
        } | Array<unknown> | null;
        createdAt: string;
        updatedAt: string;
    };
};

export type CreateConnectorResponse = CreateConnectorResponses[keyof CreateConnectorResponses];

export type DeleteConnectorData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/connectors/{id}';
};

export type DeleteConnectorErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeleteConnectorError = DeleteConnectorErrors[keyof DeleteConnectorErrors];

export type DeleteConnectorResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type DeleteConnectorResponse = DeleteConnectorResponses[keyof DeleteConnectorResponses];

export type GetConnectorData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/connectors/{id}';
};

export type GetConnectorErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetConnectorError = GetConnectorErrors[keyof GetConnectorErrors];

export type GetConnectorResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        name: string;
        description: string | null;
        visibility: 'org-wide' | 'team-scoped';
        teamIds: Array<string>;
        connectorType: 'jira' | 'confluence' | 'github' | 'gitlab' | 'servicenow' | 'notion' | 'sharepoint' | 'gdrive' | 'file_upload' | 'dropbox' | 'onedrive' | 'asana' | 'linear' | 'outline' | 'salesforce';
        config: {
            type: 'jira';
            jiraBaseUrl: unknown;
            isCloud: boolean;
            projectKey?: string;
            jqlQuery?: string;
            commentEmailBlacklist?: Array<string>;
            labelsToSkip?: Array<string>;
        } | {
            type: 'confluence';
            confluenceUrl: unknown;
            isCloud: boolean;
            spaceKeys?: Array<string>;
            pageIds?: Array<string>;
            cqlQuery?: string;
            labelsToSkip?: Array<string>;
            batchSize?: number;
        } | {
            type: 'github';
            githubUrl: unknown;
            owner: string;
            repos?: Array<string>;
            includeIssues?: boolean;
            includePullRequests?: boolean;
            includeMarkdownFiles?: boolean;
            labelsToSkip?: Array<string>;
        } | {
            type: 'gitlab';
            gitlabUrl: unknown;
            projectIds?: Array<number>;
            groupId?: string;
            includeIssues?: boolean;
            includeMergeRequests?: boolean;
            includeMarkdownFiles?: boolean;
            labelsToSkip?: Array<string>;
        } | {
            type: 'servicenow';
            instanceUrl: unknown;
            includeIncidents?: boolean;
            includeChanges?: boolean;
            includeChangeRequests?: boolean;
            includeProblems?: boolean;
            includeBusinessApps?: boolean;
            states?: Array<string>;
            assignmentGroups?: Array<string>;
            batchSize?: number;
            syncDataForLastMonths?: number;
        } | {
            type: 'notion';
            databaseIds?: Array<string>;
            pageIds?: Array<string>;
            batchSize?: number;
        } | {
            type: 'sharepoint';
            tenantId: string;
            siteUrl: unknown;
            driveIds?: Array<string>;
            folderPath?: string;
            recursive?: boolean;
            maxDepth?: number;
            includePages?: boolean;
            batchSize?: number;
        } | {
            type: 'gdrive';
            driveId?: string;
            driveIds?: Array<string>;
            folderId?: string;
            recursive?: boolean;
            maxDepth?: number;
            fileTypes?: Array<string>;
            batchSize?: number;
        } | {
            type: 'file_upload';
        } | {
            type: 'dropbox';
            rootPath?: string;
            fileTypes?: Array<string>;
            batchSize?: number;
            recursive?: boolean;
            maxDepth?: number;
        } | {
            type: 'onedrive';
            tenantId: string;
            userIds: Array<string>;
            folderId?: string;
            recursive?: boolean;
            maxDepth?: number;
            fileTypes?: Array<string>;
            batchSize?: number;
        } | {
            type: 'asana';
            workspaceGid: string;
            projectGids?: Array<string>;
            tagsToSkip?: Array<string>;
        } | {
            type: 'linear';
            linearApiUrl: unknown;
            teamIds?: Array<string>;
            projectIds?: Array<string>;
            states?: Array<string>;
            includeComments?: boolean;
            includeProjects?: boolean;
            includeCycles?: boolean;
            batchSize?: number;
        } | {
            type: 'outline';
            outlineUrl: unknown;
            collectionIds?: Array<string>;
            batchSize?: number;
        } | {
            type: 'salesforce';
            loginUrl: unknown;
            objects?: Array<string>;
            advancedObjectConfigJson?: string;
        };
        secretId: string | null;
        schedule: string;
        enabled: boolean;
        lastSyncAt: string | null;
        lastSyncStatus: 'running' | 'success' | 'completed_with_errors' | 'failed' | 'partial';
        lastSyncError: string | null;
        checkpoint: string | number | boolean | null | {
            [key: string]: unknown;
        } | Array<unknown> | null;
        createdAt: string;
        updatedAt: string;
        totalDocsIngested: number;
    };
};

export type GetConnectorResponse = GetConnectorResponses[keyof GetConnectorResponses];

export type UpdateConnectorData = {
    body: {
        name?: string;
        description?: string | null;
        visibility?: 'org-wide' | 'team-scoped';
        teamIds?: Array<string>;
        config?: {
            type: 'jira';
            jiraBaseUrl: string;
            isCloud: boolean;
            projectKey?: string;
            jqlQuery?: string;
            commentEmailBlacklist?: Array<string>;
            labelsToSkip?: Array<string>;
        } | {
            type: 'confluence';
            confluenceUrl: string;
            isCloud: boolean;
            spaceKeys?: Array<string>;
            pageIds?: Array<string>;
            cqlQuery?: string;
            labelsToSkip?: Array<string>;
            batchSize?: number;
        } | {
            type: 'github';
            githubUrl: string;
            owner: string;
            repos?: Array<string>;
            includeIssues?: boolean;
            includePullRequests?: boolean;
            includeMarkdownFiles?: boolean;
            labelsToSkip?: Array<string>;
        } | {
            type: 'gitlab';
            gitlabUrl: string;
            projectIds?: Array<number>;
            groupId?: string;
            includeIssues?: boolean;
            includeMergeRequests?: boolean;
            includeMarkdownFiles?: boolean;
            labelsToSkip?: Array<string>;
        } | {
            type: 'servicenow';
            instanceUrl: string;
            includeIncidents?: boolean;
            includeChanges?: boolean;
            includeChangeRequests?: boolean;
            includeProblems?: boolean;
            includeBusinessApps?: boolean;
            states?: Array<string>;
            assignmentGroups?: Array<string>;
            batchSize?: number;
            syncDataForLastMonths?: number;
        } | {
            type: 'notion';
            databaseIds?: Array<string>;
            pageIds?: Array<string>;
            batchSize?: number;
        } | {
            type: 'sharepoint';
            tenantId: string;
            siteUrl: string;
            driveIds?: Array<string>;
            folderPath?: string;
            recursive?: boolean;
            maxDepth?: number;
            includePages?: boolean;
            batchSize?: number;
        } | {
            type: 'gdrive';
            driveId?: string;
            driveIds?: Array<string>;
            folderId?: string;
            recursive?: boolean;
            maxDepth?: number;
            fileTypes?: Array<string>;
            batchSize?: number;
        } | {
            type: 'file_upload';
        } | {
            type: 'dropbox';
            rootPath?: string;
            fileTypes?: Array<string>;
            batchSize?: number;
            recursive?: boolean;
            maxDepth?: number;
        } | {
            type: 'onedrive';
            tenantId: string;
            userIds: Array<string>;
            folderId?: string;
            recursive?: boolean;
            maxDepth?: number;
            fileTypes?: Array<string>;
            batchSize?: number;
        } | {
            type: 'asana';
            workspaceGid: string;
            projectGids?: Array<string>;
            tagsToSkip?: Array<string>;
        } | {
            type: 'linear';
            linearApiUrl?: string;
            teamIds?: Array<string>;
            projectIds?: Array<string>;
            states?: Array<string>;
            includeComments?: boolean;
            includeProjects?: boolean;
            includeCycles?: boolean;
            batchSize?: number;
        } | {
            type: 'outline';
            outlineUrl: string;
            collectionIds?: Array<string>;
            batchSize?: number;
        } | {
            type: 'salesforce';
            loginUrl?: string;
            objects?: Array<string>;
            advancedObjectConfigJson?: string;
        };
        credentials?: {
            email?: string;
            apiToken: string;
        };
        schedule?: string;
        enabled?: boolean;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/connectors/{id}';
};

export type UpdateConnectorErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateConnectorError = UpdateConnectorErrors[keyof UpdateConnectorErrors];

export type UpdateConnectorResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        name: string;
        description: string | null;
        visibility: 'org-wide' | 'team-scoped';
        teamIds: Array<string>;
        connectorType: 'jira' | 'confluence' | 'github' | 'gitlab' | 'servicenow' | 'notion' | 'sharepoint' | 'gdrive' | 'file_upload' | 'dropbox' | 'onedrive' | 'asana' | 'linear' | 'outline' | 'salesforce';
        config: {
            type: 'jira';
            jiraBaseUrl: unknown;
            isCloud: boolean;
            projectKey?: string;
            jqlQuery?: string;
            commentEmailBlacklist?: Array<string>;
            labelsToSkip?: Array<string>;
        } | {
            type: 'confluence';
            confluenceUrl: unknown;
            isCloud: boolean;
            spaceKeys?: Array<string>;
            pageIds?: Array<string>;
            cqlQuery?: string;
            labelsToSkip?: Array<string>;
            batchSize?: number;
        } | {
            type: 'github';
            githubUrl: unknown;
            owner: string;
            repos?: Array<string>;
            includeIssues?: boolean;
            includePullRequests?: boolean;
            includeMarkdownFiles?: boolean;
            labelsToSkip?: Array<string>;
        } | {
            type: 'gitlab';
            gitlabUrl: unknown;
            projectIds?: Array<number>;
            groupId?: string;
            includeIssues?: boolean;
            includeMergeRequests?: boolean;
            includeMarkdownFiles?: boolean;
            labelsToSkip?: Array<string>;
        } | {
            type: 'servicenow';
            instanceUrl: unknown;
            includeIncidents?: boolean;
            includeChanges?: boolean;
            includeChangeRequests?: boolean;
            includeProblems?: boolean;
            includeBusinessApps?: boolean;
            states?: Array<string>;
            assignmentGroups?: Array<string>;
            batchSize?: number;
            syncDataForLastMonths?: number;
        } | {
            type: 'notion';
            databaseIds?: Array<string>;
            pageIds?: Array<string>;
            batchSize?: number;
        } | {
            type: 'sharepoint';
            tenantId: string;
            siteUrl: unknown;
            driveIds?: Array<string>;
            folderPath?: string;
            recursive?: boolean;
            maxDepth?: number;
            includePages?: boolean;
            batchSize?: number;
        } | {
            type: 'gdrive';
            driveId?: string;
            driveIds?: Array<string>;
            folderId?: string;
            recursive?: boolean;
            maxDepth?: number;
            fileTypes?: Array<string>;
            batchSize?: number;
        } | {
            type: 'file_upload';
        } | {
            type: 'dropbox';
            rootPath?: string;
            fileTypes?: Array<string>;
            batchSize?: number;
            recursive?: boolean;
            maxDepth?: number;
        } | {
            type: 'onedrive';
            tenantId: string;
            userIds: Array<string>;
            folderId?: string;
            recursive?: boolean;
            maxDepth?: number;
            fileTypes?: Array<string>;
            batchSize?: number;
        } | {
            type: 'asana';
            workspaceGid: string;
            projectGids?: Array<string>;
            tagsToSkip?: Array<string>;
        } | {
            type: 'linear';
            linearApiUrl: unknown;
            teamIds?: Array<string>;
            projectIds?: Array<string>;
            states?: Array<string>;
            includeComments?: boolean;
            includeProjects?: boolean;
            includeCycles?: boolean;
            batchSize?: number;
        } | {
            type: 'outline';
            outlineUrl: unknown;
            collectionIds?: Array<string>;
            batchSize?: number;
        } | {
            type: 'salesforce';
            loginUrl: unknown;
            objects?: Array<string>;
            advancedObjectConfigJson?: string;
        };
        secretId: string | null;
        schedule: string;
        enabled: boolean;
        lastSyncAt: string | null;
        lastSyncStatus: 'running' | 'success' | 'completed_with_errors' | 'failed' | 'partial';
        lastSyncError: string | null;
        checkpoint: string | number | boolean | null | {
            [key: string]: unknown;
        } | Array<unknown> | null;
        createdAt: string;
        updatedAt: string;
    };
};

export type UpdateConnectorResponse = UpdateConnectorResponses[keyof UpdateConnectorResponses];

export type SyncConnectorData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/connectors/{id}/sync';
};

export type SyncConnectorErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type SyncConnectorError = SyncConnectorErrors[keyof SyncConnectorErrors];

export type SyncConnectorResponses = {
    /**
     * Default Response
     */
    200: {
        taskId: string;
        status: string;
    };
};

export type SyncConnectorResponse = SyncConnectorResponses[keyof SyncConnectorResponses];

export type ForceResyncConnectorData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/connectors/{id}/force-resync';
};

export type ForceResyncConnectorErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type ForceResyncConnectorError = ForceResyncConnectorErrors[keyof ForceResyncConnectorErrors];

export type ForceResyncConnectorResponses = {
    /**
     * Default Response
     */
    200: {
        taskId: string;
        status: string;
    };
};

export type ForceResyncConnectorResponse = ForceResyncConnectorResponses[keyof ForceResyncConnectorResponses];

export type TestConnectorConnectionData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/connectors/{id}/test';
};

export type TestConnectorConnectionErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type TestConnectorConnectionError = TestConnectorConnectionErrors[keyof TestConnectorConnectionErrors];

export type TestConnectorConnectionResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
        error?: string;
    };
};

export type TestConnectorConnectionResponse = TestConnectorConnectionResponses[keyof TestConnectorConnectionResponses];

export type GetConnectorKnowledgeBasesData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/connectors/{id}/knowledge-bases';
};

export type GetConnectorKnowledgeBasesErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetConnectorKnowledgeBasesError = GetConnectorKnowledgeBasesErrors[keyof GetConnectorKnowledgeBasesErrors];

export type GetConnectorKnowledgeBasesResponses = {
    /**
     * Default Response
     */
    200: {
        data: Array<{
            id: string;
            organizationId: string;
            name: string;
            description: string | null;
            status: string;
            createdAt: string;
            updatedAt: string;
        }>;
    };
};

export type GetConnectorKnowledgeBasesResponse = GetConnectorKnowledgeBasesResponses[keyof GetConnectorKnowledgeBasesResponses];

export type AssignConnectorToKnowledgeBasesData = {
    body: {
        knowledgeBaseIds: Array<string>;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/connectors/{id}/knowledge-bases';
};

export type AssignConnectorToKnowledgeBasesErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type AssignConnectorToKnowledgeBasesError = AssignConnectorToKnowledgeBasesErrors[keyof AssignConnectorToKnowledgeBasesErrors];

export type AssignConnectorToKnowledgeBasesResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type AssignConnectorToKnowledgeBasesResponse = AssignConnectorToKnowledgeBasesResponses[keyof AssignConnectorToKnowledgeBasesResponses];

export type UnassignConnectorFromKnowledgeBaseData = {
    body?: never;
    path: {
        id: string;
        kbId: string;
    };
    query?: never;
    url: '/api/connectors/{id}/knowledge-bases/{kbId}';
};

export type UnassignConnectorFromKnowledgeBaseErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UnassignConnectorFromKnowledgeBaseError = UnassignConnectorFromKnowledgeBaseErrors[keyof UnassignConnectorFromKnowledgeBaseErrors];

export type UnassignConnectorFromKnowledgeBaseResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type UnassignConnectorFromKnowledgeBaseResponse = UnassignConnectorFromKnowledgeBaseResponses[keyof UnassignConnectorFromKnowledgeBaseResponses];

export type GetConnectorRunsData = {
    body?: never;
    path: {
        id: string;
    };
    query?: {
        limit?: number;
        offset?: number;
    };
    url: '/api/connectors/{id}/runs';
};

export type GetConnectorRunsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetConnectorRunsError = GetConnectorRunsErrors[keyof GetConnectorRunsErrors];

export type GetConnectorRunsResponses = {
    /**
     * Default Response
     */
    200: {
        data: Array<{
            id: string;
            connectorId: string;
            status: 'running' | 'success' | 'completed_with_errors' | 'failed' | 'partial';
            startedAt: string;
            completedAt: string | null;
            documentsProcessed: number | null;
            documentsIngested: number | null;
            totalItems: number | null;
            totalBatches: number | null;
            completedBatches: number | null;
            itemErrors: number | null;
            itemsSkipped: number | null;
            error: string | null;
            checkpoint: string | number | boolean | null | {
                [key: string]: unknown;
            } | Array<unknown> | null;
            createdAt: string;
        }>;
        pagination: {
            currentPage: number;
            limit: number;
            total: number;
            totalPages: number;
            hasNext: boolean;
            hasPrev: boolean;
        };
    };
};

export type GetConnectorRunsResponse = GetConnectorRunsResponses[keyof GetConnectorRunsResponses];

export type GetConnectorRunData = {
    body?: never;
    path: {
        id: string;
        runId: string;
    };
    query?: never;
    url: '/api/connectors/{id}/runs/{runId}';
};

export type GetConnectorRunErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetConnectorRunError = GetConnectorRunErrors[keyof GetConnectorRunErrors];

export type GetConnectorRunResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        connectorId: string;
        status: 'running' | 'success' | 'completed_with_errors' | 'failed' | 'partial';
        startedAt: string;
        completedAt: string | null;
        documentsProcessed: number | null;
        documentsIngested: number | null;
        totalItems: number | null;
        totalBatches: number | null;
        completedBatches: number | null;
        itemErrors: number | null;
        itemsSkipped: number | null;
        error: string | null;
        logs: string | null;
        checkpoint: string | number | boolean | null | {
            [key: string]: unknown;
        } | Array<unknown> | null;
        createdAt: string;
    };
};

export type GetConnectorRunResponse = GetConnectorRunResponses[keyof GetConnectorRunResponses];

export type GetConnectorFilesData = {
    body?: never;
    path: {
        id: string;
    };
    query?: {
        limit?: number;
        offset?: number;
        search?: string;
    };
    url: '/api/connectors/{id}/files';
};

export type GetConnectorFilesErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetConnectorFilesError = GetConnectorFilesErrors[keyof GetConnectorFilesErrors];

export type GetConnectorFilesResponses = {
    /**
     * Default Response
     */
    200: {
        data: Array<{
            id: string;
            connectorId: string;
            originalName: string;
            mimeType: string;
            fileSize: number;
            contentHash: string;
            createdAt: string;
            processingStatus: string;
            processingError: string | null;
            embeddingStatus: 'pending' | 'processing' | 'completed' | 'failed';
        }>;
        pagination: {
            currentPage: number;
            limit: number;
            total: number;
            totalPages: number;
            hasNext: boolean;
            hasPrev: boolean;
        };
    };
};

export type GetConnectorFilesResponse = GetConnectorFilesResponses[keyof GetConnectorFilesResponses];

export type UploadConnectorFilesData = {
    body: {
        files: Array<{
            name: string;
            mimeType: string;
            content: string;
        }>;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/connectors/{id}/files';
};

export type UploadConnectorFilesErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UploadConnectorFilesError = UploadConnectorFilesErrors[keyof UploadConnectorFilesErrors];

export type UploadConnectorFilesResponses = {
    /**
     * Default Response
     */
    200: {
        results: Array<{
            filename: string;
            status: 'created' | 'duplicate' | 'unsupported' | 'too_large' | 'extraction_failed';
            fileId?: string;
        }>;
    };
};

export type UploadConnectorFilesResponse = UploadConnectorFilesResponses[keyof UploadConnectorFilesResponses];

export type DeleteConnectorFileData = {
    body?: never;
    path: {
        id: string;
        fileId: string;
    };
    query?: never;
    url: '/api/connectors/{id}/files/{fileId}';
};

export type DeleteConnectorFileErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeleteConnectorFileError = DeleteConnectorFileErrors[keyof DeleteConnectorFileErrors];

export type DeleteConnectorFileResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type DeleteConnectorFileResponse = DeleteConnectorFileResponses[keyof DeleteConnectorFileResponses];

export type GetConnectorFileData = {
    body?: never;
    path: {
        id: string;
        fileId: string;
    };
    query?: never;
    url: '/api/connectors/{id}/files/{fileId}';
};

export type GetConnectorFileErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetConnectorFileError = GetConnectorFileErrors[keyof GetConnectorFileErrors];

export type GetConnectorFileResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        connectorId: string;
        originalName: string;
        mimeType: string;
        fileSize: number;
        contentHash: string;
        createdAt: string;
        processingStatus: string;
        processingError: string | null;
        embeddingStatus: 'pending' | 'processing' | 'completed' | 'failed';
    };
};

export type GetConnectorFileResponse = GetConnectorFileResponses[keyof GetConnectorFileResponses];

export type GetLimitsData = {
    body?: never;
    path?: never;
    query?: {
        entityType?: 'organization' | 'team' | 'agent' | 'user' | 'virtual_key';
        entityId?: string;
        limitType?: 'token_cost' | 'mcp_server_calls' | 'tool_calls';
    };
    url: '/api/limits';
};

export type GetLimitsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetLimitsError = GetLimitsErrors[keyof GetLimitsErrors];

export type GetLimitsResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        entityType: 'organization' | 'team' | 'agent' | 'user' | 'virtual_key';
        entityId: string;
        limitType: 'token_cost' | 'mcp_server_calls' | 'tool_calls';
        limitValue: number;
        mcpServerName: string | null;
        toolName: string | null;
        model?: Array<string> | null;
        cleanupInterval?: '1h' | '12h' | '24h' | '1w' | '1m';
        lastCleanup: string | null;
        createdAt: string;
        updatedAt: string;
        modelUsage?: Array<{
            model: string;
            tokensIn: number;
            tokensOut: number;
            cost: number;
        }>;
    }>;
};

export type GetLimitsResponse = GetLimitsResponses[keyof GetLimitsResponses];

export type CreateLimitData = {
    body: {
        entityType: 'organization' | 'team' | 'agent' | 'user' | 'virtual_key';
        entityId: string;
        limitType: 'token_cost' | 'mcp_server_calls' | 'tool_calls';
        limitValue: number;
        mcpServerName?: string | null;
        toolName?: string | null;
        model?: Array<string> | null;
        cleanupInterval?: '1h' | '12h' | '24h' | '1w' | '1m';
        lastCleanup?: unknown;
    };
    path?: never;
    query?: never;
    url: '/api/limits';
};

export type CreateLimitErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CreateLimitError = CreateLimitErrors[keyof CreateLimitErrors];

export type CreateLimitResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        entityType: 'organization' | 'team' | 'agent' | 'user' | 'virtual_key';
        entityId: string;
        limitType: 'token_cost' | 'mcp_server_calls' | 'tool_calls';
        limitValue: number;
        mcpServerName: string | null;
        toolName: string | null;
        model?: Array<string> | null;
        cleanupInterval?: '1h' | '12h' | '24h' | '1w' | '1m';
        lastCleanup: string | null;
        createdAt: string;
        updatedAt: string;
    };
};

export type CreateLimitResponse = CreateLimitResponses[keyof CreateLimitResponses];

export type DeleteLimitData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/limits/{id}';
};

export type DeleteLimitErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeleteLimitError = DeleteLimitErrors[keyof DeleteLimitErrors];

export type DeleteLimitResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type DeleteLimitResponse = DeleteLimitResponses[keyof DeleteLimitResponses];

export type GetLimitData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/limits/{id}';
};

export type GetLimitErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetLimitError = GetLimitErrors[keyof GetLimitErrors];

export type GetLimitResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        entityType: 'organization' | 'team' | 'agent' | 'user' | 'virtual_key';
        entityId: string;
        limitType: 'token_cost' | 'mcp_server_calls' | 'tool_calls';
        limitValue: number;
        mcpServerName: string | null;
        toolName: string | null;
        model?: Array<string> | null;
        cleanupInterval?: '1h' | '12h' | '24h' | '1w' | '1m';
        lastCleanup: string | null;
        createdAt: string;
        updatedAt: string;
    };
};

export type GetLimitResponse = GetLimitResponses[keyof GetLimitResponses];

export type UpdateLimitData = {
    body: {
        entityType?: 'organization' | 'team' | 'agent' | 'user' | 'virtual_key';
        entityId?: string;
        limitType?: 'token_cost' | 'mcp_server_calls' | 'tool_calls';
        limitValue?: number;
        mcpServerName?: string | null;
        toolName?: string | null;
        model?: Array<string> | null;
        cleanupInterval?: '1h' | '12h' | '24h' | '1w' | '1m';
        lastCleanup?: unknown;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/limits/{id}';
};

export type UpdateLimitErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateLimitError = UpdateLimitErrors[keyof UpdateLimitErrors];

export type UpdateLimitResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        entityType: 'organization' | 'team' | 'agent' | 'user' | 'virtual_key';
        entityId: string;
        limitType: 'token_cost' | 'mcp_server_calls' | 'tool_calls';
        limitValue: number;
        mcpServerName: string | null;
        toolName: string | null;
        model?: Array<string> | null;
        cleanupInterval?: '1h' | '12h' | '24h' | '1w' | '1m';
        lastCleanup: string | null;
        createdAt: string;
        updatedAt: string;
    };
};

export type UpdateLimitResponse = UpdateLimitResponses[keyof UpdateLimitResponses];

export type GetLlmModelsData = {
    body?: never;
    path?: never;
    query?: {
        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        apiKeyId?: string;
        isEmbedding?: string;
    };
    url: '/api/llm-models/available';
};

export type GetLlmModelsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetLlmModelsError = GetLlmModelsErrors[keyof GetLlmModelsErrors];

export type GetLlmModelsResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        dbId: string;
        displayName: string;
        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        createdAt?: string;
        capabilities?: {
            contextLength: number | null;
            inputModalities: Array<'text' | 'image' | 'audio' | 'video' | 'pdf'> | null;
            outputModalities: Array<'text' | 'image' | 'audio'> | null;
            supportsToolCalling: boolean | null;
            pricePerMillionInput: string | null;
            pricePerMillionOutput: string | null;
            isCustomPrice: boolean;
            priceSource: 'custom' | 'models_dev' | 'default';
        };
        isBest?: boolean;
        isFastest?: boolean;
        isFree: boolean;
        embeddingDimensions?: EmbeddingDimensions | null;
    }>;
};

export type GetLlmModelsResponse = GetLlmModelsResponses[keyof GetLlmModelsResponses];

export type SyncLlmModelsData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/llm-models/sync';
};

export type SyncLlmModelsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type SyncLlmModelsError = SyncLlmModelsErrors[keyof SyncLlmModelsErrors];

export type SyncLlmModelsResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type SyncLlmModelsResponse = SyncLlmModelsResponses[keyof SyncLlmModelsResponses];

export type GetModelsWithApiKeysData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/llm-models';
};

export type GetModelsWithApiKeysErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetModelsWithApiKeysError = GetModelsWithApiKeysErrors[keyof GetModelsWithApiKeysErrors];

export type GetModelsWithApiKeysResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        externalId: string;
        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        modelId: string;
        description: string | null;
        contextLength: number | null;
        inputModalities: Array<'text' | 'image' | 'audio' | 'video' | 'pdf'> | null;
        outputModalities: Array<'text' | 'image' | 'audio'> | null;
        supportsToolCalling: boolean | null;
        promptPricePerToken: string | null;
        completionPricePerToken: string | null;
        customPricePerMillionInput: string | null;
        customPricePerMillionOutput: string | null;
        ignored: boolean;
        embeddingDimensions: EmbeddingDimensions | null;
        discoveredViaLlmProxy: boolean;
        lastSyncedAt: string;
        createdAt: string;
        updatedAt: string;
        isFastest: boolean;
        isBest: boolean;
        apiKeys: Array<{
            id: string;
            name: string;
            provider: string;
            scope: string;
            isSystem: boolean;
        }>;
        pricePerMillionInput: string | null;
        pricePerMillionOutput: string | null;
        isCustomPrice: boolean;
        priceSource: 'custom' | 'models_dev' | 'default';
        isFree: boolean;
    }>;
};

export type GetModelsWithApiKeysResponse = GetModelsWithApiKeysResponses[keyof GetModelsWithApiKeysResponses];

export type UpdateModelData = {
    body: {
        customPricePerMillionInput?: string | null;
        customPricePerMillionOutput?: string | null;
        ignored?: boolean;
        embeddingDimensions?: EmbeddingDimensionsInput | null;
        inputModalities?: Array<'text' | 'image' | 'audio' | 'video' | 'pdf'> | null;
        outputModalities?: Array<'text' | 'image' | 'audio'> | null;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/llm-models/{id}';
};

export type UpdateModelErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateModelError = UpdateModelErrors[keyof UpdateModelErrors];

export type UpdateModelResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        externalId: string;
        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        modelId: string;
        description: string | null;
        contextLength: number | null;
        inputModalities: Array<'text' | 'image' | 'audio' | 'video' | 'pdf'> | null;
        outputModalities: Array<'text' | 'image' | 'audio'> | null;
        supportsToolCalling: boolean | null;
        promptPricePerToken: string | null;
        completionPricePerToken: string | null;
        customPricePerMillionInput: string | null;
        customPricePerMillionOutput: string | null;
        ignored: boolean;
        embeddingDimensions: EmbeddingDimensions | null;
        discoveredViaLlmProxy: boolean;
        lastSyncedAt: string;
        createdAt: string;
        updatedAt: string;
    };
};

export type UpdateModelResponse = UpdateModelResponses[keyof UpdateModelResponses];

export type GetLlmOauthClientsData = {
    body?: never;
    path?: never;
    query?: {
        search?: string;
        providerApiKeyId?: string;
    };
    url: '/api/llm-oauth-clients';
};

export type GetLlmOauthClientsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetLlmOauthClientsError = GetLlmOauthClientsErrors[keyof GetLlmOauthClientsErrors];

export type GetLlmOauthClientsResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        clientId: string;
        name: string;
        organizationId: string;
        allowedLlmProxyIds: Array<string>;
        providerApiKeys: Array<{
            provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
            providerApiKeyId: string;
            providerApiKeyName: string;
        }>;
        disabled: boolean;
        createdAt: string;
        updatedAt: string;
    }>;
};

export type GetLlmOauthClientsResponse = GetLlmOauthClientsResponses[keyof GetLlmOauthClientsResponses];

export type CreateLlmOauthClientData = {
    body: {
        name: string;
        allowedLlmProxyIds: Array<string>;
        providerApiKeys: Array<{
            provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
            providerApiKeyId: string;
        }>;
    };
    path?: never;
    query?: never;
    url: '/api/llm-oauth-clients';
};

export type CreateLlmOauthClientErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CreateLlmOauthClientError = CreateLlmOauthClientErrors[keyof CreateLlmOauthClientErrors];

export type CreateLlmOauthClientResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        clientId: string;
        name: string;
        organizationId: string;
        allowedLlmProxyIds: Array<string>;
        providerApiKeys: Array<{
            provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
            providerApiKeyId: string;
            providerApiKeyName: string;
        }>;
        disabled: boolean;
        createdAt: string;
        updatedAt: string;
        clientSecret: string;
    };
};

export type CreateLlmOauthClientResponse = CreateLlmOauthClientResponses[keyof CreateLlmOauthClientResponses];

export type DeleteLlmOauthClientData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/llm-oauth-clients/{id}';
};

export type DeleteLlmOauthClientErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeleteLlmOauthClientError = DeleteLlmOauthClientErrors[keyof DeleteLlmOauthClientErrors];

export type DeleteLlmOauthClientResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type DeleteLlmOauthClientResponse = DeleteLlmOauthClientResponses[keyof DeleteLlmOauthClientResponses];

export type UpdateLlmOauthClientData = {
    body: {
        name: string;
        allowedLlmProxyIds: Array<string>;
        providerApiKeys: Array<{
            provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
            providerApiKeyId: string;
        }>;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/llm-oauth-clients/{id}';
};

export type UpdateLlmOauthClientErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateLlmOauthClientError = UpdateLlmOauthClientErrors[keyof UpdateLlmOauthClientErrors];

export type UpdateLlmOauthClientResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        clientId: string;
        name: string;
        organizationId: string;
        allowedLlmProxyIds: Array<string>;
        providerApiKeys: Array<{
            provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
            providerApiKeyId: string;
            providerApiKeyName: string;
        }>;
        disabled: boolean;
        createdAt: string;
        updatedAt: string;
    };
};

export type UpdateLlmOauthClientResponse = UpdateLlmOauthClientResponses[keyof UpdateLlmOauthClientResponses];

export type RotateLlmOauthClientSecretData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/llm-oauth-clients/{id}/rotate-secret';
};

export type RotateLlmOauthClientSecretErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type RotateLlmOauthClientSecretError = RotateLlmOauthClientSecretErrors[keyof RotateLlmOauthClientSecretErrors];

export type RotateLlmOauthClientSecretResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        clientId: string;
        name: string;
        organizationId: string;
        allowedLlmProxyIds: Array<string>;
        providerApiKeys: Array<{
            provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
            providerApiKeyId: string;
            providerApiKeyName: string;
        }>;
        disabled: boolean;
        createdAt: string;
        updatedAt: string;
        clientSecret: string;
    };
};

export type RotateLlmOauthClientSecretResponse = RotateLlmOauthClientSecretResponses[keyof RotateLlmOauthClientSecretResponses];

export type GetLlmProviderApiKeysData = {
    body?: never;
    path?: never;
    query?: {
        search?: string;
        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
    };
    url: '/api/llm-provider-api-keys';
};

export type GetLlmProviderApiKeysErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetLlmProviderApiKeysError = GetLlmProviderApiKeysErrors[keyof GetLlmProviderApiKeysErrors];

export type GetLlmProviderApiKeysResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        organizationId: string;
        name: string;
        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        secretId: string | null;
        scope: 'personal' | 'team' | 'org';
        userId: string | null;
        teamId: string | null;
        baseUrl: string | null;
        inferenceBaseUrl: string | null;
        extraHeaders: {
            [key: string]: string;
        } | null;
        isSystem: boolean;
        isPrimary: boolean;
        createdAt: string;
        updatedAt: string;
        teamName?: string | null;
        userName?: string | null;
        vaultSecretPath?: string | null;
        vaultSecretKey?: string | null;
        secretStorageType?: 'vault' | 'external_vault' | 'database' | 'none';
        bestModelId?: string | null;
        isAgentKey?: boolean;
    }>;
};

export type GetLlmProviderApiKeysResponse = GetLlmProviderApiKeysResponses[keyof GetLlmProviderApiKeysResponses];

export type CreateLlmProviderApiKeyData = {
    body: {
        name: string;
        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        apiKey?: string;
        baseUrl?: string | null;
        inferenceBaseUrl?: string | null;
        extraHeaders?: {
            [key: string]: string;
        } | null;
        scope?: 'personal' | 'team' | 'org';
        teamId?: string;
        isPrimary?: boolean;
        vaultSecretPath?: string;
        vaultSecretKey?: string;
        awsAccessKeyId?: string;
        awsSecretAccessKey?: string;
        awsSessionToken?: string;
    };
    path?: never;
    query?: never;
    url: '/api/llm-provider-api-keys';
};

export type CreateLlmProviderApiKeyErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CreateLlmProviderApiKeyError = CreateLlmProviderApiKeyErrors[keyof CreateLlmProviderApiKeyErrors];

export type CreateLlmProviderApiKeyResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        name: string;
        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        secretId: string | null;
        scope: 'personal' | 'team' | 'org';
        userId: string | null;
        teamId: string | null;
        baseUrl: string | null;
        inferenceBaseUrl: string | null;
        extraHeaders: {
            [key: string]: string;
        } | null;
        isSystem: boolean;
        isPrimary: boolean;
        createdAt: string;
        updatedAt: string;
    };
};

export type CreateLlmProviderApiKeyResponse = CreateLlmProviderApiKeyResponses[keyof CreateLlmProviderApiKeyResponses];

export type GetAvailableLlmProviderApiKeysData = {
    body?: never;
    path?: never;
    query?: {
        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        includeKeyId?: string;
    };
    url: '/api/llm-provider-api-keys/available';
};

export type GetAvailableLlmProviderApiKeysErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetAvailableLlmProviderApiKeysError = GetAvailableLlmProviderApiKeysErrors[keyof GetAvailableLlmProviderApiKeysErrors];

export type GetAvailableLlmProviderApiKeysResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        organizationId: string;
        name: string;
        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        secretId: string | null;
        scope: 'personal' | 'team' | 'org';
        userId: string | null;
        teamId: string | null;
        baseUrl: string | null;
        inferenceBaseUrl: string | null;
        extraHeaders: {
            [key: string]: string;
        } | null;
        isSystem: boolean;
        isPrimary: boolean;
        createdAt: string;
        updatedAt: string;
        teamName?: string | null;
        userName?: string | null;
        vaultSecretPath?: string | null;
        vaultSecretKey?: string | null;
        secretStorageType?: 'vault' | 'external_vault' | 'database' | 'none';
        bestModelId?: string | null;
        isAgentKey?: boolean;
    }>;
};

export type GetAvailableLlmProviderApiKeysResponse = GetAvailableLlmProviderApiKeysResponses[keyof GetAvailableLlmProviderApiKeysResponses];

export type DeleteLlmProviderApiKeyData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/llm-provider-api-keys/{id}';
};

export type DeleteLlmProviderApiKeyErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeleteLlmProviderApiKeyError = DeleteLlmProviderApiKeyErrors[keyof DeleteLlmProviderApiKeyErrors];

export type DeleteLlmProviderApiKeyResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type DeleteLlmProviderApiKeyResponse = DeleteLlmProviderApiKeyResponses[keyof DeleteLlmProviderApiKeyResponses];

export type GetLlmProviderApiKeyData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/llm-provider-api-keys/{id}';
};

export type GetLlmProviderApiKeyErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetLlmProviderApiKeyError = GetLlmProviderApiKeyErrors[keyof GetLlmProviderApiKeyErrors];

export type GetLlmProviderApiKeyResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        name: string;
        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        secretId: string | null;
        scope: 'personal' | 'team' | 'org';
        userId: string | null;
        teamId: string | null;
        baseUrl: string | null;
        inferenceBaseUrl: string | null;
        extraHeaders: {
            [key: string]: string;
        } | null;
        isSystem: boolean;
        isPrimary: boolean;
        createdAt: string;
        updatedAt: string;
        teamName?: string | null;
        userName?: string | null;
        vaultSecretPath?: string | null;
        vaultSecretKey?: string | null;
        secretStorageType?: 'vault' | 'external_vault' | 'database' | 'none';
        bestModelId?: string | null;
        isAgentKey?: boolean;
    };
};

export type GetLlmProviderApiKeyResponse = GetLlmProviderApiKeyResponses[keyof GetLlmProviderApiKeyResponses];

export type UpdateLlmProviderApiKeyData = {
    body: {
        name?: string;
        apiKey?: string;
        baseUrl?: string | null;
        inferenceBaseUrl?: string | null;
        extraHeaders?: {
            [key: string]: string;
        } | null;
        scope?: 'personal' | 'team' | 'org';
        teamId?: string | null;
        isPrimary?: boolean;
        vaultSecretPath?: string;
        vaultSecretKey?: string;
        awsAccessKeyId?: string;
        awsSecretAccessKey?: string;
        awsSessionToken?: string;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/llm-provider-api-keys/{id}';
};

export type UpdateLlmProviderApiKeyErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateLlmProviderApiKeyError = UpdateLlmProviderApiKeyErrors[keyof UpdateLlmProviderApiKeyErrors];

export type UpdateLlmProviderApiKeyResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        name: string;
        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        secretId: string | null;
        scope: 'personal' | 'team' | 'org';
        userId: string | null;
        teamId: string | null;
        baseUrl: string | null;
        inferenceBaseUrl: string | null;
        extraHeaders: {
            [key: string]: string;
        } | null;
        isSystem: boolean;
        isPrimary: boolean;
        createdAt: string;
        updatedAt: string;
    };
};

export type UpdateLlmProviderApiKeyResponse = UpdateLlmProviderApiKeyResponses[keyof UpdateLlmProviderApiKeyResponses];

export type McpGatewayGetData = {
    body?: never;
    path: {
        profileId: string;
    };
    query?: never;
    url: '/v1/mcp/{profileId}';
};

export type McpGatewayGetErrors = {
    /**
     * Default Response
     */
    401: {
        error: string;
        message: string;
    };
};

export type McpGatewayGetError = McpGatewayGetErrors[keyof McpGatewayGetErrors];

export type McpGatewayGetResponses = {
    /**
     * Default Response
     */
    200: {
        name: string;
        version: string;
        agentId: string;
        transport: string;
        capabilities: {
            tools: boolean;
        };
        tokenAuth?: {
            tokenId: string;
            teamId: string | null;
            isOrganizationToken: boolean;
            isUserToken?: boolean;
            userId?: string;
        };
    };
};

export type McpGatewayGetResponse = McpGatewayGetResponses[keyof McpGatewayGetResponses];

export type McpGatewayPostData = {
    body: {
        [key: string]: unknown;
    };
    path: {
        profileId: string;
    };
    query?: never;
    url: '/v1/mcp/{profileId}';
};

export type McpGatewayPostResponses = {
    /**
     * Default Response
     */
    200: unknown;
};

export type ListMcpPresetEntriesData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/organization/mcp-preset-entries';
};

export type ListMcpPresetEntriesErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type ListMcpPresetEntriesError = ListMcpPresetEntriesErrors[keyof ListMcpPresetEntriesErrors];

export type ListMcpPresetEntriesResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        organizationId: string;
        name: string;
        sortOrder: number;
        validationRegex: string | null;
        createdAt: string;
        assignedCatalogCount: number;
    }>;
};

export type ListMcpPresetEntriesResponse = ListMcpPresetEntriesResponses[keyof ListMcpPresetEntriesResponses];

export type CreateMcpPresetEntryData = {
    body: {
        name: string;
        validationRegex?: string | null;
    };
    path?: never;
    query?: never;
    url: '/api/organization/mcp-preset-entries';
};

export type CreateMcpPresetEntryErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CreateMcpPresetEntryError = CreateMcpPresetEntryErrors[keyof CreateMcpPresetEntryErrors];

export type CreateMcpPresetEntryResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        name: string;
        sortOrder: number;
        validationRegex: string | null;
        createdAt: string;
    };
};

export type CreateMcpPresetEntryResponse = CreateMcpPresetEntryResponses[keyof CreateMcpPresetEntryResponses];

export type DeleteMcpPresetEntryData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/organization/mcp-preset-entries/{id}';
};

export type DeleteMcpPresetEntryErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeleteMcpPresetEntryError = DeleteMcpPresetEntryErrors[keyof DeleteMcpPresetEntryErrors];

export type DeleteMcpPresetEntryResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type DeleteMcpPresetEntryResponse = DeleteMcpPresetEntryResponses[keyof DeleteMcpPresetEntryResponses];

export type UpdateMcpPresetEntryData = {
    body: {
        validationRegex: string | null;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/organization/mcp-preset-entries/{id}';
};

export type UpdateMcpPresetEntryErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateMcpPresetEntryError = UpdateMcpPresetEntryErrors[keyof UpdateMcpPresetEntryErrors];

export type UpdateMcpPresetEntryResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        name: string;
        sortOrder: number;
        validationRegex: string | null;
        createdAt: string;
    };
};

export type UpdateMcpPresetEntryResponse = UpdateMcpPresetEntryResponses[keyof UpdateMcpPresetEntryResponses];

export type McpProxyPostData = {
    body: {
        [key: string]: unknown;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/api/mcp/{agentId}';
};

export type McpProxyPostResponses = {
    /**
     * Default Response
     */
    200: unknown;
};

export type GetMcpServerInstallationRequestsData = {
    body?: never;
    path?: never;
    query?: {
        /**
         * Filter by status
         */
        status?: 'pending' | 'approved' | 'declined';
    };
    url: '/api/mcp_server_installation_requests';
};

export type GetMcpServerInstallationRequestsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetMcpServerInstallationRequestsError = GetMcpServerInstallationRequestsErrors[keyof GetMcpServerInstallationRequestsErrors];

export type GetMcpServerInstallationRequestsResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        externalCatalogId: string | null;
        requestedBy: string;
        status: 'pending' | 'approved' | 'declined';
        requestReason: string | null;
        customServerConfig: {
            type: 'remote';
            label: string;
            name: string;
            version?: string;
            serverType: string;
            serverUrl?: string;
            docsUrl?: string;
            userConfig?: {
                [key: string]: unknown;
            };
            oauthConfig?: {
                name: string;
                server_url: string;
                grant_type?: 'authorization_code' | 'client_credentials';
                auth_server_url?: string;
                authorization_endpoint?: string;
                resource_metadata_url?: string;
                client_id: string;
                client_secret?: string;
                audience?: string;
                redirect_uris: Array<string>;
                scopes: Array<string>;
                description?: string;
                well_known_url?: string;
                default_scopes: Array<string>;
                supports_resource_metadata: boolean;
                generic_oauth?: boolean;
                token_endpoint?: string;
                access_token_env_var?: string;
                requires_proxy?: boolean;
                provider_name?: string;
                browser_auth?: boolean;
                streamable_http_url?: string;
                streamable_http_port?: number;
            };
        } | {
            type: 'local';
            label: string;
            name: string;
            version?: string;
            serverType: 'local';
            localConfig: {
                command?: string;
                arguments?: Array<string>;
                environment?: Array<{
                    key: string;
                    type: 'plain_text' | 'secret' | 'boolean' | 'number';
                    value?: string;
                    promptOnInstallation: boolean;
                    promptOnPreset?: boolean;
                    required?: boolean;
                    description?: string;
                    default?: LocalConfigEnvironmentDefault;
                    mounted?: boolean;
                }>;
                envFrom?: Array<{
                    type: 'secret' | 'configMap';
                    name: string;
                    prefix?: string;
                }>;
                dockerImage?: string;
                transportType?: 'stdio' | 'streamable-http';
                httpPort?: number;
                httpPath?: string;
                nodePort?: number;
                serviceAccount?: string;
                imagePullSecrets?: Array<{
                    source: 'existing';
                    name: string;
                } | {
                    source: 'credentials';
                    server: string;
                    username: string;
                    password?: string;
                    email?: string;
                }>;
            };
        } | null;
        adminResponse: string | null;
        reviewedBy: string | null;
        reviewedAt: string | null;
        notes: Array<{
            id: string;
            userId: string;
            userName: string;
            content: string;
            createdAt: string;
        }> | null;
        createdAt: string;
        updatedAt: string;
    }>;
};

export type GetMcpServerInstallationRequestsResponse = GetMcpServerInstallationRequestsResponses[keyof GetMcpServerInstallationRequestsResponses];

export type CreateMcpServerInstallationRequestData = {
    body: {
        externalCatalogId?: string | null;
        requestReason?: string | null;
        customServerConfig: {
            type: 'remote';
            label: string;
            name: string;
            version?: string;
            serverType: string;
            serverUrl?: string;
            docsUrl?: string;
            userConfig?: {
                [key: string]: unknown;
            };
            oauthConfig?: {
                name: string;
                server_url: string;
                grant_type?: 'authorization_code' | 'client_credentials';
                auth_server_url?: string;
                authorization_endpoint?: string;
                resource_metadata_url?: string;
                client_id: string;
                client_secret?: string;
                audience?: string;
                redirect_uris: Array<string>;
                scopes: Array<string>;
                description?: string;
                well_known_url?: string;
                default_scopes: Array<string>;
                supports_resource_metadata: boolean;
                generic_oauth?: boolean;
                token_endpoint?: string;
                access_token_env_var?: string;
                requires_proxy?: boolean;
                provider_name?: string;
                browser_auth?: boolean;
                streamable_http_url?: string;
                streamable_http_port?: number;
            };
        } | {
            type: 'local';
            label: string;
            name: string;
            version?: string;
            serverType: 'local';
            localConfig: {
                command?: string;
                arguments?: Array<string>;
                environment?: Array<{
                    key: string;
                    type: 'plain_text' | 'secret' | 'boolean' | 'number';
                    value?: string;
                    promptOnInstallation: boolean;
                    promptOnPreset?: boolean;
                    required?: boolean;
                    description?: string;
                    default?: LocalConfigEnvironmentDefaultInput;
                    mounted?: boolean;
                }>;
                envFrom?: Array<{
                    type: 'secret' | 'configMap';
                    name: string;
                    prefix?: string;
                }>;
                dockerImage?: string;
                transportType?: 'stdio' | 'streamable-http';
                httpPort?: number;
                httpPath?: string;
                nodePort?: number;
                serviceAccount?: string;
                imagePullSecrets?: Array<{
                    source: 'existing';
                    name: string;
                } | {
                    source: 'credentials';
                    server: string;
                    username: string;
                    password?: string;
                    email?: string;
                }>;
            };
        } | null;
    };
    path?: never;
    query?: never;
    url: '/api/mcp_server_installation_requests';
};

export type CreateMcpServerInstallationRequestErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CreateMcpServerInstallationRequestError = CreateMcpServerInstallationRequestErrors[keyof CreateMcpServerInstallationRequestErrors];

export type CreateMcpServerInstallationRequestResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        externalCatalogId: string | null;
        requestedBy: string;
        status: 'pending' | 'approved' | 'declined';
        requestReason: string | null;
        customServerConfig: {
            type: 'remote';
            label: string;
            name: string;
            version?: string;
            serverType: string;
            serverUrl?: string;
            docsUrl?: string;
            userConfig?: {
                [key: string]: unknown;
            };
            oauthConfig?: {
                name: string;
                server_url: string;
                grant_type?: 'authorization_code' | 'client_credentials';
                auth_server_url?: string;
                authorization_endpoint?: string;
                resource_metadata_url?: string;
                client_id: string;
                client_secret?: string;
                audience?: string;
                redirect_uris: Array<string>;
                scopes: Array<string>;
                description?: string;
                well_known_url?: string;
                default_scopes: Array<string>;
                supports_resource_metadata: boolean;
                generic_oauth?: boolean;
                token_endpoint?: string;
                access_token_env_var?: string;
                requires_proxy?: boolean;
                provider_name?: string;
                browser_auth?: boolean;
                streamable_http_url?: string;
                streamable_http_port?: number;
            };
        } | {
            type: 'local';
            label: string;
            name: string;
            version?: string;
            serverType: 'local';
            localConfig: {
                command?: string;
                arguments?: Array<string>;
                environment?: Array<{
                    key: string;
                    type: 'plain_text' | 'secret' | 'boolean' | 'number';
                    value?: string;
                    promptOnInstallation: boolean;
                    promptOnPreset?: boolean;
                    required?: boolean;
                    description?: string;
                    default?: LocalConfigEnvironmentDefault;
                    mounted?: boolean;
                }>;
                envFrom?: Array<{
                    type: 'secret' | 'configMap';
                    name: string;
                    prefix?: string;
                }>;
                dockerImage?: string;
                transportType?: 'stdio' | 'streamable-http';
                httpPort?: number;
                httpPath?: string;
                nodePort?: number;
                serviceAccount?: string;
                imagePullSecrets?: Array<{
                    source: 'existing';
                    name: string;
                } | {
                    source: 'credentials';
                    server: string;
                    username: string;
                    password?: string;
                    email?: string;
                }>;
            };
        } | null;
        adminResponse: string | null;
        reviewedBy: string | null;
        reviewedAt: string | null;
        notes: Array<{
            id: string;
            userId: string;
            userName: string;
            content: string;
            createdAt: string;
        }> | null;
        createdAt: string;
        updatedAt: string;
    };
};

export type CreateMcpServerInstallationRequestResponse = CreateMcpServerInstallationRequestResponses[keyof CreateMcpServerInstallationRequestResponses];

export type DeleteMcpServerInstallationRequestData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/mcp_server_installation_requests/{id}';
};

export type DeleteMcpServerInstallationRequestErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeleteMcpServerInstallationRequestError = DeleteMcpServerInstallationRequestErrors[keyof DeleteMcpServerInstallationRequestErrors];

export type DeleteMcpServerInstallationRequestResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type DeleteMcpServerInstallationRequestResponse = DeleteMcpServerInstallationRequestResponses[keyof DeleteMcpServerInstallationRequestResponses];

export type GetMcpServerInstallationRequestData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/mcp_server_installation_requests/{id}';
};

export type GetMcpServerInstallationRequestErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetMcpServerInstallationRequestError = GetMcpServerInstallationRequestErrors[keyof GetMcpServerInstallationRequestErrors];

export type GetMcpServerInstallationRequestResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        externalCatalogId: string | null;
        requestedBy: string;
        status: 'pending' | 'approved' | 'declined';
        requestReason: string | null;
        customServerConfig: {
            type: 'remote';
            label: string;
            name: string;
            version?: string;
            serverType: string;
            serverUrl?: string;
            docsUrl?: string;
            userConfig?: {
                [key: string]: unknown;
            };
            oauthConfig?: {
                name: string;
                server_url: string;
                grant_type?: 'authorization_code' | 'client_credentials';
                auth_server_url?: string;
                authorization_endpoint?: string;
                resource_metadata_url?: string;
                client_id: string;
                client_secret?: string;
                audience?: string;
                redirect_uris: Array<string>;
                scopes: Array<string>;
                description?: string;
                well_known_url?: string;
                default_scopes: Array<string>;
                supports_resource_metadata: boolean;
                generic_oauth?: boolean;
                token_endpoint?: string;
                access_token_env_var?: string;
                requires_proxy?: boolean;
                provider_name?: string;
                browser_auth?: boolean;
                streamable_http_url?: string;
                streamable_http_port?: number;
            };
        } | {
            type: 'local';
            label: string;
            name: string;
            version?: string;
            serverType: 'local';
            localConfig: {
                command?: string;
                arguments?: Array<string>;
                environment?: Array<{
                    key: string;
                    type: 'plain_text' | 'secret' | 'boolean' | 'number';
                    value?: string;
                    promptOnInstallation: boolean;
                    promptOnPreset?: boolean;
                    required?: boolean;
                    description?: string;
                    default?: LocalConfigEnvironmentDefault;
                    mounted?: boolean;
                }>;
                envFrom?: Array<{
                    type: 'secret' | 'configMap';
                    name: string;
                    prefix?: string;
                }>;
                dockerImage?: string;
                transportType?: 'stdio' | 'streamable-http';
                httpPort?: number;
                httpPath?: string;
                nodePort?: number;
                serviceAccount?: string;
                imagePullSecrets?: Array<{
                    source: 'existing';
                    name: string;
                } | {
                    source: 'credentials';
                    server: string;
                    username: string;
                    password?: string;
                    email?: string;
                }>;
            };
        } | null;
        adminResponse: string | null;
        reviewedBy: string | null;
        reviewedAt: string | null;
        notes: Array<{
            id: string;
            userId: string;
            userName: string;
            content: string;
            createdAt: string;
        }> | null;
        createdAt: string;
        updatedAt: string;
    };
};

export type GetMcpServerInstallationRequestResponse = GetMcpServerInstallationRequestResponses[keyof GetMcpServerInstallationRequestResponses];

export type UpdateMcpServerInstallationRequestData = {
    body: {
        status?: 'pending' | 'approved' | 'declined';
        requestReason?: string | null;
        customServerConfig?: {
            type: 'remote';
            label: string;
            name: string;
            version?: string;
            serverType: string;
            serverUrl?: string;
            docsUrl?: string;
            userConfig?: {
                [key: string]: unknown;
            };
            oauthConfig?: {
                name: string;
                server_url: string;
                grant_type?: 'authorization_code' | 'client_credentials';
                auth_server_url?: string;
                authorization_endpoint?: string;
                resource_metadata_url?: string;
                client_id: string;
                client_secret?: string;
                audience?: string;
                redirect_uris: Array<string>;
                scopes: Array<string>;
                description?: string;
                well_known_url?: string;
                default_scopes: Array<string>;
                supports_resource_metadata: boolean;
                generic_oauth?: boolean;
                token_endpoint?: string;
                access_token_env_var?: string;
                requires_proxy?: boolean;
                provider_name?: string;
                browser_auth?: boolean;
                streamable_http_url?: string;
                streamable_http_port?: number;
            };
        } | {
            type: 'local';
            label: string;
            name: string;
            version?: string;
            serverType: 'local';
            localConfig: {
                command?: string;
                arguments?: Array<string>;
                environment?: Array<{
                    key: string;
                    type: 'plain_text' | 'secret' | 'boolean' | 'number';
                    value?: string;
                    promptOnInstallation: boolean;
                    promptOnPreset?: boolean;
                    required?: boolean;
                    description?: string;
                    default?: LocalConfigEnvironmentDefaultInput;
                    mounted?: boolean;
                }>;
                envFrom?: Array<{
                    type: 'secret' | 'configMap';
                    name: string;
                    prefix?: string;
                }>;
                dockerImage?: string;
                transportType?: 'stdio' | 'streamable-http';
                httpPort?: number;
                httpPath?: string;
                nodePort?: number;
                serviceAccount?: string;
                imagePullSecrets?: Array<{
                    source: 'existing';
                    name: string;
                } | {
                    source: 'credentials';
                    server: string;
                    username: string;
                    password?: string;
                    email?: string;
                }>;
            };
        } | null;
        adminResponse?: string | null;
        reviewedBy?: string | null;
        reviewedAt?: unknown;
        notes?: Array<{
            id: string;
            userId: string;
            userName: string;
            content: string;
            createdAt: string;
        }> | null;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/mcp_server_installation_requests/{id}';
};

export type UpdateMcpServerInstallationRequestErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateMcpServerInstallationRequestError = UpdateMcpServerInstallationRequestErrors[keyof UpdateMcpServerInstallationRequestErrors];

export type UpdateMcpServerInstallationRequestResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        externalCatalogId: string | null;
        requestedBy: string;
        status: 'pending' | 'approved' | 'declined';
        requestReason: string | null;
        customServerConfig: {
            type: 'remote';
            label: string;
            name: string;
            version?: string;
            serverType: string;
            serverUrl?: string;
            docsUrl?: string;
            userConfig?: {
                [key: string]: unknown;
            };
            oauthConfig?: {
                name: string;
                server_url: string;
                grant_type?: 'authorization_code' | 'client_credentials';
                auth_server_url?: string;
                authorization_endpoint?: string;
                resource_metadata_url?: string;
                client_id: string;
                client_secret?: string;
                audience?: string;
                redirect_uris: Array<string>;
                scopes: Array<string>;
                description?: string;
                well_known_url?: string;
                default_scopes: Array<string>;
                supports_resource_metadata: boolean;
                generic_oauth?: boolean;
                token_endpoint?: string;
                access_token_env_var?: string;
                requires_proxy?: boolean;
                provider_name?: string;
                browser_auth?: boolean;
                streamable_http_url?: string;
                streamable_http_port?: number;
            };
        } | {
            type: 'local';
            label: string;
            name: string;
            version?: string;
            serverType: 'local';
            localConfig: {
                command?: string;
                arguments?: Array<string>;
                environment?: Array<{
                    key: string;
                    type: 'plain_text' | 'secret' | 'boolean' | 'number';
                    value?: string;
                    promptOnInstallation: boolean;
                    promptOnPreset?: boolean;
                    required?: boolean;
                    description?: string;
                    default?: LocalConfigEnvironmentDefault;
                    mounted?: boolean;
                }>;
                envFrom?: Array<{
                    type: 'secret' | 'configMap';
                    name: string;
                    prefix?: string;
                }>;
                dockerImage?: string;
                transportType?: 'stdio' | 'streamable-http';
                httpPort?: number;
                httpPath?: string;
                nodePort?: number;
                serviceAccount?: string;
                imagePullSecrets?: Array<{
                    source: 'existing';
                    name: string;
                } | {
                    source: 'credentials';
                    server: string;
                    username: string;
                    password?: string;
                    email?: string;
                }>;
            };
        } | null;
        adminResponse: string | null;
        reviewedBy: string | null;
        reviewedAt: string | null;
        notes: Array<{
            id: string;
            userId: string;
            userName: string;
            content: string;
            createdAt: string;
        }> | null;
        createdAt: string;
        updatedAt: string;
    };
};

export type UpdateMcpServerInstallationRequestResponse = UpdateMcpServerInstallationRequestResponses[keyof UpdateMcpServerInstallationRequestResponses];

export type ApproveMcpServerInstallationRequestData = {
    body: {
        adminResponse?: string;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/mcp_server_installation_requests/{id}/approve';
};

export type ApproveMcpServerInstallationRequestErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type ApproveMcpServerInstallationRequestError = ApproveMcpServerInstallationRequestErrors[keyof ApproveMcpServerInstallationRequestErrors];

export type ApproveMcpServerInstallationRequestResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        externalCatalogId: string | null;
        requestedBy: string;
        status: 'pending' | 'approved' | 'declined';
        requestReason: string | null;
        customServerConfig: {
            type: 'remote';
            label: string;
            name: string;
            version?: string;
            serverType: string;
            serverUrl?: string;
            docsUrl?: string;
            userConfig?: {
                [key: string]: unknown;
            };
            oauthConfig?: {
                name: string;
                server_url: string;
                grant_type?: 'authorization_code' | 'client_credentials';
                auth_server_url?: string;
                authorization_endpoint?: string;
                resource_metadata_url?: string;
                client_id: string;
                client_secret?: string;
                audience?: string;
                redirect_uris: Array<string>;
                scopes: Array<string>;
                description?: string;
                well_known_url?: string;
                default_scopes: Array<string>;
                supports_resource_metadata: boolean;
                generic_oauth?: boolean;
                token_endpoint?: string;
                access_token_env_var?: string;
                requires_proxy?: boolean;
                provider_name?: string;
                browser_auth?: boolean;
                streamable_http_url?: string;
                streamable_http_port?: number;
            };
        } | {
            type: 'local';
            label: string;
            name: string;
            version?: string;
            serverType: 'local';
            localConfig: {
                command?: string;
                arguments?: Array<string>;
                environment?: Array<{
                    key: string;
                    type: 'plain_text' | 'secret' | 'boolean' | 'number';
                    value?: string;
                    promptOnInstallation: boolean;
                    promptOnPreset?: boolean;
                    required?: boolean;
                    description?: string;
                    default?: LocalConfigEnvironmentDefault;
                    mounted?: boolean;
                }>;
                envFrom?: Array<{
                    type: 'secret' | 'configMap';
                    name: string;
                    prefix?: string;
                }>;
                dockerImage?: string;
                transportType?: 'stdio' | 'streamable-http';
                httpPort?: number;
                httpPath?: string;
                nodePort?: number;
                serviceAccount?: string;
                imagePullSecrets?: Array<{
                    source: 'existing';
                    name: string;
                } | {
                    source: 'credentials';
                    server: string;
                    username: string;
                    password?: string;
                    email?: string;
                }>;
            };
        } | null;
        adminResponse: string | null;
        reviewedBy: string | null;
        reviewedAt: string | null;
        notes: Array<{
            id: string;
            userId: string;
            userName: string;
            content: string;
            createdAt: string;
        }> | null;
        createdAt: string;
        updatedAt: string;
    };
};

export type ApproveMcpServerInstallationRequestResponse = ApproveMcpServerInstallationRequestResponses[keyof ApproveMcpServerInstallationRequestResponses];

export type DeclineMcpServerInstallationRequestData = {
    body: {
        adminResponse?: string;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/mcp_server_installation_requests/{id}/decline';
};

export type DeclineMcpServerInstallationRequestErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeclineMcpServerInstallationRequestError = DeclineMcpServerInstallationRequestErrors[keyof DeclineMcpServerInstallationRequestErrors];

export type DeclineMcpServerInstallationRequestResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        externalCatalogId: string | null;
        requestedBy: string;
        status: 'pending' | 'approved' | 'declined';
        requestReason: string | null;
        customServerConfig: {
            type: 'remote';
            label: string;
            name: string;
            version?: string;
            serverType: string;
            serverUrl?: string;
            docsUrl?: string;
            userConfig?: {
                [key: string]: unknown;
            };
            oauthConfig?: {
                name: string;
                server_url: string;
                grant_type?: 'authorization_code' | 'client_credentials';
                auth_server_url?: string;
                authorization_endpoint?: string;
                resource_metadata_url?: string;
                client_id: string;
                client_secret?: string;
                audience?: string;
                redirect_uris: Array<string>;
                scopes: Array<string>;
                description?: string;
                well_known_url?: string;
                default_scopes: Array<string>;
                supports_resource_metadata: boolean;
                generic_oauth?: boolean;
                token_endpoint?: string;
                access_token_env_var?: string;
                requires_proxy?: boolean;
                provider_name?: string;
                browser_auth?: boolean;
                streamable_http_url?: string;
                streamable_http_port?: number;
            };
        } | {
            type: 'local';
            label: string;
            name: string;
            version?: string;
            serverType: 'local';
            localConfig: {
                command?: string;
                arguments?: Array<string>;
                environment?: Array<{
                    key: string;
                    type: 'plain_text' | 'secret' | 'boolean' | 'number';
                    value?: string;
                    promptOnInstallation: boolean;
                    promptOnPreset?: boolean;
                    required?: boolean;
                    description?: string;
                    default?: LocalConfigEnvironmentDefault;
                    mounted?: boolean;
                }>;
                envFrom?: Array<{
                    type: 'secret' | 'configMap';
                    name: string;
                    prefix?: string;
                }>;
                dockerImage?: string;
                transportType?: 'stdio' | 'streamable-http';
                httpPort?: number;
                httpPath?: string;
                nodePort?: number;
                serviceAccount?: string;
                imagePullSecrets?: Array<{
                    source: 'existing';
                    name: string;
                } | {
                    source: 'credentials';
                    server: string;
                    username: string;
                    password?: string;
                    email?: string;
                }>;
            };
        } | null;
        adminResponse: string | null;
        reviewedBy: string | null;
        reviewedAt: string | null;
        notes: Array<{
            id: string;
            userId: string;
            userName: string;
            content: string;
            createdAt: string;
        }> | null;
        createdAt: string;
        updatedAt: string;
    };
};

export type DeclineMcpServerInstallationRequestResponse = DeclineMcpServerInstallationRequestResponses[keyof DeclineMcpServerInstallationRequestResponses];

export type AddMcpServerInstallationRequestNoteData = {
    body: {
        content: string;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/mcp_server_installation_requests/{id}/notes';
};

export type AddMcpServerInstallationRequestNoteErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type AddMcpServerInstallationRequestNoteError = AddMcpServerInstallationRequestNoteErrors[keyof AddMcpServerInstallationRequestNoteErrors];

export type AddMcpServerInstallationRequestNoteResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        externalCatalogId: string | null;
        requestedBy: string;
        status: 'pending' | 'approved' | 'declined';
        requestReason: string | null;
        customServerConfig: {
            type: 'remote';
            label: string;
            name: string;
            version?: string;
            serverType: string;
            serverUrl?: string;
            docsUrl?: string;
            userConfig?: {
                [key: string]: unknown;
            };
            oauthConfig?: {
                name: string;
                server_url: string;
                grant_type?: 'authorization_code' | 'client_credentials';
                auth_server_url?: string;
                authorization_endpoint?: string;
                resource_metadata_url?: string;
                client_id: string;
                client_secret?: string;
                audience?: string;
                redirect_uris: Array<string>;
                scopes: Array<string>;
                description?: string;
                well_known_url?: string;
                default_scopes: Array<string>;
                supports_resource_metadata: boolean;
                generic_oauth?: boolean;
                token_endpoint?: string;
                access_token_env_var?: string;
                requires_proxy?: boolean;
                provider_name?: string;
                browser_auth?: boolean;
                streamable_http_url?: string;
                streamable_http_port?: number;
            };
        } | {
            type: 'local';
            label: string;
            name: string;
            version?: string;
            serverType: 'local';
            localConfig: {
                command?: string;
                arguments?: Array<string>;
                environment?: Array<{
                    key: string;
                    type: 'plain_text' | 'secret' | 'boolean' | 'number';
                    value?: string;
                    promptOnInstallation: boolean;
                    promptOnPreset?: boolean;
                    required?: boolean;
                    description?: string;
                    default?: LocalConfigEnvironmentDefault;
                    mounted?: boolean;
                }>;
                envFrom?: Array<{
                    type: 'secret' | 'configMap';
                    name: string;
                    prefix?: string;
                }>;
                dockerImage?: string;
                transportType?: 'stdio' | 'streamable-http';
                httpPort?: number;
                httpPath?: string;
                nodePort?: number;
                serviceAccount?: string;
                imagePullSecrets?: Array<{
                    source: 'existing';
                    name: string;
                } | {
                    source: 'credentials';
                    server: string;
                    username: string;
                    password?: string;
                    email?: string;
                }>;
            };
        } | null;
        adminResponse: string | null;
        reviewedBy: string | null;
        reviewedAt: string | null;
        notes: Array<{
            id: string;
            userId: string;
            userName: string;
            content: string;
            createdAt: string;
        }> | null;
        createdAt: string;
        updatedAt: string;
    };
};

export type AddMcpServerInstallationRequestNoteResponse = AddMcpServerInstallationRequestNoteResponses[keyof AddMcpServerInstallationRequestNoteResponses];

export type GetMcpServersData = {
    body?: never;
    path?: never;
    query?: {
        catalogId?: string;
        assignmentScope?: 'personal' | 'team' | 'org';
        assignmentTeamIds?: Array<string>;
    };
    url: '/api/mcp_server';
};

export type GetMcpServersErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetMcpServersError = GetMcpServersErrors[keyof GetMcpServersErrors];

export type GetMcpServersResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        name: string;
        catalogId: string;
        serverType: 'local' | 'remote' | 'builtin';
        secretId: string | null;
        environmentValues: string | number | boolean | null | {
            [key: string]: unknown;
        } | Array<unknown>;
        ownerId: string | null;
        teamId: string | null;
        scope: 'personal' | 'team' | 'org';
        reinstallRequired: boolean;
        localInstallationStatus: 'idle' | 'pending' | 'discovering-tools' | 'success' | 'error';
        localInstallationError: string | null;
        oauthRefreshError: 'refresh_failed' | 'no_refresh_token';
        oauthRefreshFailedAt: string | null;
        createdAt: string;
        updatedAt: string;
        ownerEmail?: string | null;
        catalogName?: string | null;
        users?: Array<string>;
        userDetails?: Array<{
            userId: string;
            email: string;
            createdAt: string;
        }>;
        teamDetails?: {
            teamId: string;
            name: string;
            createdAt: string;
        } | null;
        secretStorageType?: 'vault' | 'external_vault' | 'database' | 'none';
    }>;
};

export type GetMcpServersResponse = GetMcpServersResponses[keyof GetMcpServersResponses];

export type InstallMcpServerData = {
    body: {
        name: string;
        catalogId: string;
        secretId?: string;
        environmentValues?: {
            [key: string]: string;
        };
        ownerId?: string | null;
        teamId?: string | null;
        scope?: 'personal' | 'team' | 'org';
        reinstallRequired?: boolean;
        localInstallationStatus?: 'idle' | 'pending' | 'discovering-tools' | 'success' | 'error';
        localInstallationError?: string | null;
        oauthRefreshError?: 'refresh_failed' | 'no_refresh_token';
        oauthRefreshFailedAt?: unknown;
        userId?: string;
        userConfigValues?: {
            [key: string]: string;
        };
        agentIds?: Array<string>;
        accessToken?: string;
        isByosVault?: boolean;
        serviceAccount?: string;
    };
    path?: never;
    query?: never;
    url: '/api/mcp_server';
};

export type InstallMcpServerErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type InstallMcpServerError = InstallMcpServerErrors[keyof InstallMcpServerErrors];

export type InstallMcpServerResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        catalogId: string;
        serverType: 'local' | 'remote' | 'builtin';
        secretId: string | null;
        environmentValues: string | number | boolean | null | {
            [key: string]: unknown;
        } | Array<unknown>;
        ownerId: string | null;
        teamId: string | null;
        scope: 'personal' | 'team' | 'org';
        reinstallRequired: boolean;
        localInstallationStatus: 'idle' | 'pending' | 'discovering-tools' | 'success' | 'error';
        localInstallationError: string | null;
        oauthRefreshError: 'refresh_failed' | 'no_refresh_token';
        oauthRefreshFailedAt: string | null;
        createdAt: string;
        updatedAt: string;
        ownerEmail?: string | null;
        catalogName?: string | null;
        users?: Array<string>;
        userDetails?: Array<{
            userId: string;
            email: string;
            createdAt: string;
        }>;
        teamDetails?: {
            teamId: string;
            name: string;
            createdAt: string;
        } | null;
        secretStorageType?: 'vault' | 'external_vault' | 'database' | 'none';
    };
};

export type InstallMcpServerResponse = InstallMcpServerResponses[keyof InstallMcpServerResponses];

export type DeleteMcpServerData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/mcp_server/{id}';
};

export type DeleteMcpServerErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeleteMcpServerError = DeleteMcpServerErrors[keyof DeleteMcpServerErrors];

export type DeleteMcpServerResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type DeleteMcpServerResponse = DeleteMcpServerResponses[keyof DeleteMcpServerResponses];

export type GetMcpServerData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/mcp_server/{id}';
};

export type GetMcpServerErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetMcpServerError = GetMcpServerErrors[keyof GetMcpServerErrors];

export type GetMcpServerResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        catalogId: string;
        serverType: 'local' | 'remote' | 'builtin';
        secretId: string | null;
        environmentValues: string | number | boolean | null | {
            [key: string]: unknown;
        } | Array<unknown>;
        ownerId: string | null;
        teamId: string | null;
        scope: 'personal' | 'team' | 'org';
        reinstallRequired: boolean;
        localInstallationStatus: 'idle' | 'pending' | 'discovering-tools' | 'success' | 'error';
        localInstallationError: string | null;
        oauthRefreshError: 'refresh_failed' | 'no_refresh_token';
        oauthRefreshFailedAt: string | null;
        createdAt: string;
        updatedAt: string;
        ownerEmail?: string | null;
        catalogName?: string | null;
        users?: Array<string>;
        userDetails?: Array<{
            userId: string;
            email: string;
            createdAt: string;
        }>;
        teamDetails?: {
            teamId: string;
            name: string;
            createdAt: string;
        } | null;
        secretStorageType?: 'vault' | 'external_vault' | 'database' | 'none';
    };
};

export type GetMcpServerResponse = GetMcpServerResponses[keyof GetMcpServerResponses];

export type ReauthenticateMcpServerData = {
    body: {
        secretId?: string;
        accessToken?: string;
        userConfigValues?: {
            [key: string]: string;
        };
        environmentValues?: {
            [key: string]: string;
        };
        isByosVault?: boolean;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/mcp_server/{id}/reauthenticate';
};

export type ReauthenticateMcpServerErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type ReauthenticateMcpServerError = ReauthenticateMcpServerErrors[keyof ReauthenticateMcpServerErrors];

export type ReauthenticateMcpServerResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        catalogId: string;
        serverType: 'local' | 'remote' | 'builtin';
        secretId: string | null;
        environmentValues: string | number | boolean | null | {
            [key: string]: unknown;
        } | Array<unknown>;
        ownerId: string | null;
        teamId: string | null;
        scope: 'personal' | 'team' | 'org';
        reinstallRequired: boolean;
        localInstallationStatus: 'idle' | 'pending' | 'discovering-tools' | 'success' | 'error';
        localInstallationError: string | null;
        oauthRefreshError: 'refresh_failed' | 'no_refresh_token';
        oauthRefreshFailedAt: string | null;
        createdAt: string;
        updatedAt: string;
        ownerEmail?: string | null;
        catalogName?: string | null;
        users?: Array<string>;
        userDetails?: Array<{
            userId: string;
            email: string;
            createdAt: string;
        }>;
        teamDetails?: {
            teamId: string;
            name: string;
            createdAt: string;
        } | null;
        secretStorageType?: 'vault' | 'external_vault' | 'database' | 'none';
    };
};

export type ReauthenticateMcpServerResponse = ReauthenticateMcpServerResponses[keyof ReauthenticateMcpServerResponses];

export type GetMcpServerInstallationStatusData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/mcp_server/{id}/installation-status';
};

export type GetMcpServerInstallationStatusErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetMcpServerInstallationStatusError = GetMcpServerInstallationStatusErrors[keyof GetMcpServerInstallationStatusErrors];

export type GetMcpServerInstallationStatusResponses = {
    /**
     * Default Response
     */
    200: {
        localInstallationStatus: 'idle' | 'pending' | 'discovering-tools' | 'success' | 'error';
        localInstallationError: string | null;
    };
};

export type GetMcpServerInstallationStatusResponse = GetMcpServerInstallationStatusResponses[keyof GetMcpServerInstallationStatusResponses];

export type GetMcpServerToolsData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/mcp_server/{id}/tools';
};

export type GetMcpServerToolsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetMcpServerToolsError = GetMcpServerToolsErrors[keyof GetMcpServerToolsErrors];

export type GetMcpServerToolsResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        name: string;
        description: string | null;
        parameters: {
            [key: string]: unknown;
        };
        createdAt: string;
        assignedAgentCount: number;
        assignedAgents: Array<{
            id: string;
            name: string;
        }>;
    }>;
};

export type GetMcpServerToolsResponse = GetMcpServerToolsResponses[keyof GetMcpServerToolsResponses];

export type InspectMcpServerData = {
    body: {
        method: 'tools/list' | 'tools/call';
        toolName?: string;
        toolArguments?: {
            [key: string]: unknown;
        };
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/mcp_server/{id}/inspect';
};

export type InspectMcpServerErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type InspectMcpServerError = InspectMcpServerErrors[keyof InspectMcpServerErrors];

export type InspectMcpServerResponses = {
    /**
     * Default Response
     */
    200: {
        [key: string]: unknown;
    };
};

export type InspectMcpServerResponse = InspectMcpServerResponses[keyof InspectMcpServerResponses];

export type ReinstallMcpServerData = {
    body: {
        environmentValues?: {
            [key: string]: string;
        };
        userConfigValues?: {
            [key: string]: string;
        };
        isByosVault?: boolean;
        serviceAccount?: string;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/mcp_server/{id}/reinstall';
};

export type ReinstallMcpServerErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type ReinstallMcpServerError = ReinstallMcpServerErrors[keyof ReinstallMcpServerErrors];

export type ReinstallMcpServerResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        catalogId: string;
        serverType: 'local' | 'remote' | 'builtin';
        secretId: string | null;
        environmentValues: string | number | boolean | null | {
            [key: string]: unknown;
        } | Array<unknown>;
        ownerId: string | null;
        teamId: string | null;
        scope: 'personal' | 'team' | 'org';
        reinstallRequired: boolean;
        localInstallationStatus: 'idle' | 'pending' | 'discovering-tools' | 'success' | 'error';
        localInstallationError: string | null;
        oauthRefreshError: 'refresh_failed' | 'no_refresh_token';
        oauthRefreshFailedAt: string | null;
        createdAt: string;
        updatedAt: string;
        ownerEmail?: string | null;
        catalogName?: string | null;
        users?: Array<string>;
        userDetails?: Array<{
            userId: string;
            email: string;
            createdAt: string;
        }>;
        teamDetails?: {
            teamId: string;
            name: string;
            createdAt: string;
        } | null;
        secretStorageType?: 'vault' | 'external_vault' | 'database' | 'none';
    };
};

export type ReinstallMcpServerResponse = ReinstallMcpServerResponses[keyof ReinstallMcpServerResponses];

export type GetMcpToolCallsData = {
    body?: never;
    path?: never;
    query?: {
        /**
         * Filter by agent ID
         */
        agentId?: string;
        /**
         * Filter by start date (ISO 8601 format)
         */
        startDate?: string;
        /**
         * Filter by end date (ISO 8601 format)
         */
        endDate?: string;
        /**
         * Free-text search across MCP server name, tool name, and arguments (case-insensitive)
         */
        search?: string;
        limit?: number;
        offset?: number;
        sortBy?: 'createdAt' | 'agentId' | 'mcpServerName' | 'method';
        sortDirection?: 'asc' | 'desc';
    };
    url: '/api/mcp-tool-calls';
};

export type GetMcpToolCallsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetMcpToolCallsError = GetMcpToolCallsErrors[keyof GetMcpToolCallsErrors];

export type GetMcpToolCallsResponses = {
    /**
     * Default Response
     */
    200: {
        data: Array<{
            id: string;
            agentId: string | null;
            mcpServerName: string;
            method: string;
            /**
             * Represents a tool call in a provider-agnostic way
             */
            toolCall: {
                id: string;
                name: string;
                arguments: {
                    [key: string]: unknown;
                };
            } | null;
            toolResult: unknown;
            userId: string | null;
            authMethod: 'oauth' | 'user_token' | 'org_token' | 'team_token' | 'external_idp' | 'session';
            createdAt: string;
            userName: string | null;
        }>;
        pagination: {
            currentPage: number;
            limit: number;
            total: number;
            totalPages: number;
            hasNext: boolean;
            hasPrev: boolean;
        };
    };
};

export type GetMcpToolCallsResponse = GetMcpToolCallsResponses[keyof GetMcpToolCallsResponses];

export type GetMcpToolCallData = {
    body?: never;
    path: {
        mcpToolCallId: string;
    };
    query?: never;
    url: '/api/mcp-tool-calls/{mcpToolCallId}';
};

export type GetMcpToolCallErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetMcpToolCallError = GetMcpToolCallErrors[keyof GetMcpToolCallErrors];

export type GetMcpToolCallResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        agentId: string | null;
        mcpServerName: string;
        method: string;
        /**
         * Represents a tool call in a provider-agnostic way
         */
        toolCall: {
            id: string;
            name: string;
            arguments: {
                [key: string]: unknown;
            };
        } | null;
        toolResult: unknown;
        userId: string | null;
        authMethod: 'oauth' | 'user_token' | 'org_token' | 'team_token' | 'external_idp' | 'session';
        createdAt: string;
        userName: string | null;
    };
};

export type GetMcpToolCallResponse = GetMcpToolCallResponses[keyof GetMcpToolCallResponses];

export type GetMembersData = {
    body?: never;
    path?: never;
    query?: {
        limit?: number;
        offset?: number;
        /**
         * Search by user name or email (case-insensitive partial match)
         */
        name?: string;
        /**
         * Filter by exact role name
         */
        role?: string;
    };
    url: '/api/members';
};

export type GetMembersErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetMembersError = GetMembersErrors[keyof GetMembersErrors];

export type GetMembersResponses = {
    /**
     * Default Response
     */
    200: {
        data: Array<{
            id: string;
            userId: string;
            name: string | null;
            email: string;
            image: string | null;
            role: string;
            createdAt: string;
        }>;
        pagination: {
            currentPage: number;
            limit: number;
            total: number;
            totalPages: number;
            hasNext: boolean;
            hasPrev: boolean;
        };
    };
};

export type GetMembersResponse = GetMembersResponses[keyof GetMembersResponses];

export type MinimaxChatCompletionsWithDefaultAgentData = {
    body: MinimaxChatCompletionRequestInput;
    headers?: {
        authorization?: string;
    };
    path?: never;
    query?: never;
    url: '/v1/minimax/chat/completions';
};

export type MinimaxChatCompletionsWithDefaultAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type MinimaxChatCompletionsWithDefaultAgentError = MinimaxChatCompletionsWithDefaultAgentErrors[keyof MinimaxChatCompletionsWithDefaultAgentErrors];

export type MinimaxChatCompletionsWithDefaultAgentResponses = {
    /**
     * Default Response
     */
    200: MinimaxChatCompletionResponse;
};

export type MinimaxChatCompletionsWithDefaultAgentResponse = MinimaxChatCompletionsWithDefaultAgentResponses[keyof MinimaxChatCompletionsWithDefaultAgentResponses];

export type MinimaxChatCompletionsWithAgentData = {
    body: MinimaxChatCompletionRequestInput;
    headers?: {
        authorization?: string;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/minimax/{agentId}/chat/completions';
};

export type MinimaxChatCompletionsWithAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type MinimaxChatCompletionsWithAgentError = MinimaxChatCompletionsWithAgentErrors[keyof MinimaxChatCompletionsWithAgentErrors];

export type MinimaxChatCompletionsWithAgentResponses = {
    /**
     * Default Response
     */
    200: MinimaxChatCompletionResponse;
};

export type MinimaxChatCompletionsWithAgentResponse = MinimaxChatCompletionsWithAgentResponses[keyof MinimaxChatCompletionsWithAgentResponses];

export type MistralChatCompletionsWithDefaultAgentData = {
    body: XaiChatCompletionRequestInput;
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path?: never;
    query?: never;
    url: '/v1/mistral/chat/completions';
};

export type MistralChatCompletionsWithDefaultAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type MistralChatCompletionsWithDefaultAgentError = MistralChatCompletionsWithDefaultAgentErrors[keyof MistralChatCompletionsWithDefaultAgentErrors];

export type MistralChatCompletionsWithDefaultAgentResponses = {
    /**
     * Default Response
     */
    200: MistralChatCompletionResponse;
};

export type MistralChatCompletionsWithDefaultAgentResponse = MistralChatCompletionsWithDefaultAgentResponses[keyof MistralChatCompletionsWithDefaultAgentResponses];

export type MistralChatCompletionsWithAgentData = {
    body: XaiChatCompletionRequestInput;
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/mistral/{agentId}/chat/completions';
};

export type MistralChatCompletionsWithAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type MistralChatCompletionsWithAgentError = MistralChatCompletionsWithAgentErrors[keyof MistralChatCompletionsWithAgentErrors];

export type MistralChatCompletionsWithAgentResponses = {
    /**
     * Default Response
     */
    200: MistralChatCompletionResponse;
};

export type MistralChatCompletionsWithAgentResponse = MistralChatCompletionsWithAgentResponses[keyof MistralChatCompletionsWithAgentResponses];

export type ModelRouterListModelsWithDefaultAgentData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/v1/model-router/models';
};

export type ModelRouterListModelsWithDefaultAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type ModelRouterListModelsWithDefaultAgentError = ModelRouterListModelsWithDefaultAgentErrors[keyof ModelRouterListModelsWithDefaultAgentErrors];

export type ModelRouterListModelsWithDefaultAgentResponses = {
    /**
     * Default Response
     */
    200: {
        object: 'list';
        data: Array<{
            id: string;
            object: 'model';
            created: number;
            owned_by: string;
        }>;
    };
};

export type ModelRouterListModelsWithDefaultAgentResponse = ModelRouterListModelsWithDefaultAgentResponses[keyof ModelRouterListModelsWithDefaultAgentResponses];

export type ModelRouterListModelsWithAgentData = {
    body?: never;
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/model-router/{agentId}/models';
};

export type ModelRouterListModelsWithAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type ModelRouterListModelsWithAgentError = ModelRouterListModelsWithAgentErrors[keyof ModelRouterListModelsWithAgentErrors];

export type ModelRouterListModelsWithAgentResponses = {
    /**
     * Default Response
     */
    200: {
        object: 'list';
        data: Array<{
            id: string;
            object: 'model';
            created: number;
            owned_by: string;
        }>;
    };
};

export type ModelRouterListModelsWithAgentResponse = ModelRouterListModelsWithAgentResponses[keyof ModelRouterListModelsWithAgentResponses];

export type ModelRouterResponsesWithDefaultAgentData = {
    /**
     * https://developers.openai.com/api/reference/resources/responses/methods/create
     */
    body: {
        model: string;
        input?: string | Array<{
            type: string;
            [key: string]: unknown;
        }>;
        instructions?: string | null;
        max_output_tokens?: number | null;
        metadata?: {
            [key: string]: string;
        } | null;
        previous_response_id?: string | null;
        stream?: boolean | null;
        temperature?: number | null;
        text?: unknown;
        tool_choice?: unknown;
        tools?: Array<{
            type: 'function';
            name: string;
            description?: string | null;
            parameters?: {
                [key: string]: unknown;
            } | null;
            strict?: boolean | null;
            [key: string]: unknown;
        } | {
            type: string;
            [key: string]: unknown;
        }>;
        top_p?: number | null;
        user?: string;
        [key: string]: unknown;
    };
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path?: never;
    query?: never;
    url: '/v1/model-router/responses';
};

export type ModelRouterResponsesWithDefaultAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type ModelRouterResponsesWithDefaultAgentError = ModelRouterResponsesWithDefaultAgentErrors[keyof ModelRouterResponsesWithDefaultAgentErrors];

export type ModelRouterResponsesWithDefaultAgentResponses = {
    /**
     * https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)
     */
    200: {
        id: string;
        object: 'response';
        created_at: number;
        model: string;
        output: Array<{
            id: string;
            type: 'message';
            role: 'assistant';
            status: string;
            content: Array<{
                type: 'output_text';
                text: string;
                [key: string]: unknown;
            } | {
                type: 'refusal';
                refusal: string;
                [key: string]: unknown;
            }>;
            [key: string]: unknown;
        } | {
            type: 'function_call';
            id?: string;
            call_id: string;
            name: string;
            arguments: string;
            status?: string;
            [key: string]: unknown;
        } | {
            type: string;
            [key: string]: unknown;
        }>;
        status: string;
        /**
         * https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_usage%20%3E%20(schema)
         */
        usage?: {
            input_tokens: number;
            output_tokens: number;
            total_tokens: number;
            [key: string]: unknown;
        };
        [key: string]: unknown;
    };
};

export type ModelRouterResponsesWithDefaultAgentResponse = ModelRouterResponsesWithDefaultAgentResponses[keyof ModelRouterResponsesWithDefaultAgentResponses];

export type ModelRouterResponsesWithAgentData = {
    /**
     * https://developers.openai.com/api/reference/resources/responses/methods/create
     */
    body: {
        model: string;
        input?: string | Array<{
            type: string;
            [key: string]: unknown;
        }>;
        instructions?: string | null;
        max_output_tokens?: number | null;
        metadata?: {
            [key: string]: string;
        } | null;
        previous_response_id?: string | null;
        stream?: boolean | null;
        temperature?: number | null;
        text?: unknown;
        tool_choice?: unknown;
        tools?: Array<{
            type: 'function';
            name: string;
            description?: string | null;
            parameters?: {
                [key: string]: unknown;
            } | null;
            strict?: boolean | null;
            [key: string]: unknown;
        } | {
            type: string;
            [key: string]: unknown;
        }>;
        top_p?: number | null;
        user?: string;
        [key: string]: unknown;
    };
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/model-router/{agentId}/responses';
};

export type ModelRouterResponsesWithAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type ModelRouterResponsesWithAgentError = ModelRouterResponsesWithAgentErrors[keyof ModelRouterResponsesWithAgentErrors];

export type ModelRouterResponsesWithAgentResponses = {
    /**
     * https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)
     */
    200: {
        id: string;
        object: 'response';
        created_at: number;
        model: string;
        output: Array<{
            id: string;
            type: 'message';
            role: 'assistant';
            status: string;
            content: Array<{
                type: 'output_text';
                text: string;
                [key: string]: unknown;
            } | {
                type: 'refusal';
                refusal: string;
                [key: string]: unknown;
            }>;
            [key: string]: unknown;
        } | {
            type: 'function_call';
            id?: string;
            call_id: string;
            name: string;
            arguments: string;
            status?: string;
            [key: string]: unknown;
        } | {
            type: string;
            [key: string]: unknown;
        }>;
        status: string;
        /**
         * https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_usage%20%3E%20(schema)
         */
        usage?: {
            input_tokens: number;
            output_tokens: number;
            total_tokens: number;
            [key: string]: unknown;
        };
        [key: string]: unknown;
    };
};

export type ModelRouterResponsesWithAgentResponse = ModelRouterResponsesWithAgentResponses[keyof ModelRouterResponsesWithAgentResponses];

export type ModelRouterChatCompletionsWithDefaultAgentData = {
    body: XaiChatCompletionRequestInput;
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path?: never;
    query?: never;
    url: '/v1/model-router/chat/completions';
};

export type ModelRouterChatCompletionsWithDefaultAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type ModelRouterChatCompletionsWithDefaultAgentError = ModelRouterChatCompletionsWithDefaultAgentErrors[keyof ModelRouterChatCompletionsWithDefaultAgentErrors];

export type ModelRouterChatCompletionsWithDefaultAgentResponses = {
    /**
     * Default Response
     */
    200: OpenAiChatCompletionResponse;
};

export type ModelRouterChatCompletionsWithDefaultAgentResponse = ModelRouterChatCompletionsWithDefaultAgentResponses[keyof ModelRouterChatCompletionsWithDefaultAgentResponses];

export type ModelRouterChatCompletionsWithAgentData = {
    body: XaiChatCompletionRequestInput;
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/model-router/{agentId}/chat/completions';
};

export type ModelRouterChatCompletionsWithAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type ModelRouterChatCompletionsWithAgentError = ModelRouterChatCompletionsWithAgentErrors[keyof ModelRouterChatCompletionsWithAgentErrors];

export type ModelRouterChatCompletionsWithAgentResponses = {
    /**
     * Default Response
     */
    200: OpenAiChatCompletionResponse;
};

export type ModelRouterChatCompletionsWithAgentResponse = ModelRouterChatCompletionsWithAgentResponses[keyof ModelRouterChatCompletionsWithAgentResponses];

export type InitiateOAuthData = {
    body: {
        catalogId: string;
        serverId?: string;
    };
    path?: never;
    query?: never;
    url: '/api/oauth/initiate';
};

export type InitiateOAuthErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type InitiateOAuthError = InitiateOAuthErrors[keyof InitiateOAuthErrors];

export type InitiateOAuthResponses = {
    /**
     * Default Response
     */
    200: {
        authorizationUrl: string;
        state: string;
    };
};

export type InitiateOAuthResponse = InitiateOAuthResponses[keyof InitiateOAuthResponses];

export type HandleOAuthCallbackData = {
    body: {
        code: string;
        state: string;
    };
    path?: never;
    query?: never;
    url: '/api/oauth/callback';
};

export type HandleOAuthCallbackErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type HandleOAuthCallbackError = HandleOAuthCallbackErrors[keyof HandleOAuthCallbackErrors];

export type HandleOAuthCallbackResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
        catalogId: string;
        name: string;
        accessToken: string;
        refreshToken?: string;
        expiresIn?: number;
        secretId: string;
    };
};

export type HandleOAuthCallbackResponse = HandleOAuthCallbackResponses[keyof HandleOAuthCallbackResponses];

export type GetWellKnownOauthProtectedResourceBy__Data = {
    body?: never;
    path: {
        '*': string;
    };
    query?: never;
    url: '/.well-known/oauth-protected-resource/{*}';
};

export type GetWellKnownOauthProtectedResourceBy__Responses = {
    /**
     * Default Response
     */
    200: {
        resource: string;
        authorization_servers: Array<string>;
        scopes_supported: Array<string>;
        bearer_methods_supported: Array<string>;
    };
};

export type GetWellKnownOauthProtectedResourceBy__Response = GetWellKnownOauthProtectedResourceBy__Responses[keyof GetWellKnownOauthProtectedResourceBy__Responses];

export type GetWellKnownOauthAuthorizationServerData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/.well-known/oauth-authorization-server';
};

export type GetWellKnownOauthAuthorizationServerResponses = {
    /**
     * Default Response
     */
    200: {
        issuer: string;
        authorization_endpoint: string;
        token_endpoint: string;
        registration_endpoint: string;
        jwks_uri: string;
        response_types_supported: Array<string>;
        grant_types_supported: Array<string>;
        token_endpoint_auth_methods_supported: Array<string>;
        code_challenge_methods_supported: Array<string>;
        scopes_supported: Array<string>;
        client_id_metadata_document_supported: boolean;
    };
};

export type GetWellKnownOauthAuthorizationServerResponse = GetWellKnownOauthAuthorizationServerResponses[keyof GetWellKnownOauthAuthorizationServerResponses];

export type OllamaChatCompletionsWithDefaultAgentData = {
    body: OllamaChatCompletionRequestInput;
    headers?: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for Ollama (typically not required)
         */
        authorization?: string;
    };
    path?: never;
    query?: never;
    url: '/v1/ollama/chat/completions';
};

export type OllamaChatCompletionsWithDefaultAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type OllamaChatCompletionsWithDefaultAgentError = OllamaChatCompletionsWithDefaultAgentErrors[keyof OllamaChatCompletionsWithDefaultAgentErrors];

export type OllamaChatCompletionsWithDefaultAgentResponses = {
    /**
     * Default Response
     */
    200: OllamaChatCompletionResponse;
};

export type OllamaChatCompletionsWithDefaultAgentResponse = OllamaChatCompletionsWithDefaultAgentResponses[keyof OllamaChatCompletionsWithDefaultAgentResponses];

export type OllamaChatCompletionsWithAgentData = {
    body: OllamaChatCompletionRequestInput;
    headers?: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for Ollama (typically not required)
         */
        authorization?: string;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/ollama/{agentId}/chat/completions';
};

export type OllamaChatCompletionsWithAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type OllamaChatCompletionsWithAgentError = OllamaChatCompletionsWithAgentErrors[keyof OllamaChatCompletionsWithAgentErrors];

export type OllamaChatCompletionsWithAgentResponses = {
    /**
     * Default Response
     */
    200: OllamaChatCompletionResponse;
};

export type OllamaChatCompletionsWithAgentResponse = OllamaChatCompletionsWithAgentResponses[keyof OllamaChatCompletionsWithAgentResponses];

export type OpenAiResponsesWithDefaultAgentData = {
    /**
     * https://developers.openai.com/api/reference/resources/responses/methods/create
     */
    body: {
        model: string;
        input?: string | Array<{
            type: string;
            [key: string]: unknown;
        }>;
        instructions?: string | null;
        max_output_tokens?: number | null;
        metadata?: {
            [key: string]: string;
        } | null;
        previous_response_id?: string | null;
        stream?: boolean | null;
        temperature?: number | null;
        text?: unknown;
        tool_choice?: unknown;
        tools?: Array<{
            type: 'function';
            name: string;
            description?: string | null;
            parameters?: {
                [key: string]: unknown;
            } | null;
            strict?: boolean | null;
            [key: string]: unknown;
        } | {
            type: string;
            [key: string]: unknown;
        }>;
        top_p?: number | null;
        user?: string;
        [key: string]: unknown;
    };
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path?: never;
    query?: never;
    url: '/v1/openai/responses';
};

export type OpenAiResponsesWithDefaultAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type OpenAiResponsesWithDefaultAgentError = OpenAiResponsesWithDefaultAgentErrors[keyof OpenAiResponsesWithDefaultAgentErrors];

export type OpenAiResponsesWithDefaultAgentResponses = {
    /**
     * https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)
     */
    200: {
        id: string;
        object: 'response';
        created_at: number;
        model: string;
        output: Array<{
            id: string;
            type: 'message';
            role: 'assistant';
            status: string;
            content: Array<{
                type: 'output_text';
                text: string;
                [key: string]: unknown;
            } | {
                type: 'refusal';
                refusal: string;
                [key: string]: unknown;
            }>;
            [key: string]: unknown;
        } | {
            type: 'function_call';
            id?: string;
            call_id: string;
            name: string;
            arguments: string;
            status?: string;
            [key: string]: unknown;
        } | {
            type: string;
            [key: string]: unknown;
        }>;
        status: string;
        /**
         * https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_usage%20%3E%20(schema)
         */
        usage?: {
            input_tokens: number;
            output_tokens: number;
            total_tokens: number;
            [key: string]: unknown;
        };
        [key: string]: unknown;
    };
};

export type OpenAiResponsesWithDefaultAgentResponse = OpenAiResponsesWithDefaultAgentResponses[keyof OpenAiResponsesWithDefaultAgentResponses];

export type OpenAiResponsesWithAgentData = {
    /**
     * https://developers.openai.com/api/reference/resources/responses/methods/create
     */
    body: {
        model: string;
        input?: string | Array<{
            type: string;
            [key: string]: unknown;
        }>;
        instructions?: string | null;
        max_output_tokens?: number | null;
        metadata?: {
            [key: string]: string;
        } | null;
        previous_response_id?: string | null;
        stream?: boolean | null;
        temperature?: number | null;
        text?: unknown;
        tool_choice?: unknown;
        tools?: Array<{
            type: 'function';
            name: string;
            description?: string | null;
            parameters?: {
                [key: string]: unknown;
            } | null;
            strict?: boolean | null;
            [key: string]: unknown;
        } | {
            type: string;
            [key: string]: unknown;
        }>;
        top_p?: number | null;
        user?: string;
        [key: string]: unknown;
    };
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/openai/{agentId}/responses';
};

export type OpenAiResponsesWithAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type OpenAiResponsesWithAgentError = OpenAiResponsesWithAgentErrors[keyof OpenAiResponsesWithAgentErrors];

export type OpenAiResponsesWithAgentResponses = {
    /**
     * https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)
     */
    200: {
        id: string;
        object: 'response';
        created_at: number;
        model: string;
        output: Array<{
            id: string;
            type: 'message';
            role: 'assistant';
            status: string;
            content: Array<{
                type: 'output_text';
                text: string;
                [key: string]: unknown;
            } | {
                type: 'refusal';
                refusal: string;
                [key: string]: unknown;
            }>;
            [key: string]: unknown;
        } | {
            type: 'function_call';
            id?: string;
            call_id: string;
            name: string;
            arguments: string;
            status?: string;
            [key: string]: unknown;
        } | {
            type: string;
            [key: string]: unknown;
        }>;
        status: string;
        /**
         * https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_usage%20%3E%20(schema)
         */
        usage?: {
            input_tokens: number;
            output_tokens: number;
            total_tokens: number;
            [key: string]: unknown;
        };
        [key: string]: unknown;
    };
};

export type OpenAiResponsesWithAgentResponse = OpenAiResponsesWithAgentResponses[keyof OpenAiResponsesWithAgentResponses];

export type OpenAiChatCompletionsWithDefaultAgentData = {
    body: XaiChatCompletionRequestInput;
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path?: never;
    query?: never;
    url: '/v1/openai/chat/completions';
};

export type OpenAiChatCompletionsWithDefaultAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type OpenAiChatCompletionsWithDefaultAgentError = OpenAiChatCompletionsWithDefaultAgentErrors[keyof OpenAiChatCompletionsWithDefaultAgentErrors];

export type OpenAiChatCompletionsWithDefaultAgentResponses = {
    /**
     * Default Response
     */
    200: OpenAiChatCompletionResponse;
};

export type OpenAiChatCompletionsWithDefaultAgentResponse = OpenAiChatCompletionsWithDefaultAgentResponses[keyof OpenAiChatCompletionsWithDefaultAgentResponses];

export type OpenAiChatCompletionsWithAgentData = {
    body: XaiChatCompletionRequestInput;
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/openai/{agentId}/chat/completions';
};

export type OpenAiChatCompletionsWithAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type OpenAiChatCompletionsWithAgentError = OpenAiChatCompletionsWithAgentErrors[keyof OpenAiChatCompletionsWithAgentErrors];

export type OpenAiChatCompletionsWithAgentResponses = {
    /**
     * Default Response
     */
    200: OpenAiChatCompletionResponse;
};

export type OpenAiChatCompletionsWithAgentResponse = OpenAiChatCompletionsWithAgentResponses[keyof OpenAiChatCompletionsWithAgentResponses];

export type OpenrouterChatCompletionsWithDefaultAgentData = {
    body: XaiChatCompletionRequestInput;
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path?: never;
    query?: never;
    url: '/v1/openrouter/chat/completions';
};

export type OpenrouterChatCompletionsWithDefaultAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type OpenrouterChatCompletionsWithDefaultAgentError = OpenrouterChatCompletionsWithDefaultAgentErrors[keyof OpenrouterChatCompletionsWithDefaultAgentErrors];

export type OpenrouterChatCompletionsWithDefaultAgentResponses = {
    /**
     * Default Response
     */
    200: OpenrouterChatCompletionResponse;
};

export type OpenrouterChatCompletionsWithDefaultAgentResponse = OpenrouterChatCompletionsWithDefaultAgentResponses[keyof OpenrouterChatCompletionsWithDefaultAgentResponses];

export type OpenrouterChatCompletionsWithAgentData = {
    body: XaiChatCompletionRequestInput;
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/openrouter/{agentId}/chat/completions';
};

export type OpenrouterChatCompletionsWithAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type OpenrouterChatCompletionsWithAgentError = OpenrouterChatCompletionsWithAgentErrors[keyof OpenrouterChatCompletionsWithAgentErrors];

export type OpenrouterChatCompletionsWithAgentResponses = {
    /**
     * Default Response
     */
    200: OpenrouterChatCompletionResponse;
};

export type OpenrouterChatCompletionsWithAgentResponse = OpenrouterChatCompletionsWithAgentResponses[keyof OpenrouterChatCompletionsWithAgentResponses];

export type GetOptimizationRulesData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/optimization-rules';
};

export type GetOptimizationRulesErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetOptimizationRulesError = GetOptimizationRulesErrors[keyof GetOptimizationRulesErrors];

export type GetOptimizationRulesResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        entityType: 'organization' | 'team' | 'agent';
        entityId: string;
        conditions: Array<{
            maxLength: number;
        } | {
            hasTools: boolean;
        }>;
        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        targetModel: string;
        enabled: boolean;
        createdAt: string;
        updatedAt: string;
    }>;
};

export type GetOptimizationRulesResponse = GetOptimizationRulesResponses[keyof GetOptimizationRulesResponses];

export type CreateOptimizationRuleData = {
    body: {
        id?: string;
        entityType: 'organization' | 'team' | 'agent';
        entityId: string;
        conditions: Array<{
            maxLength: number;
        } | {
            hasTools: boolean;
        }>;
        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        targetModel: string;
        enabled?: boolean;
        createdAt?: unknown;
        updatedAt?: unknown;
    };
    path?: never;
    query?: never;
    url: '/api/optimization-rules';
};

export type CreateOptimizationRuleErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CreateOptimizationRuleError = CreateOptimizationRuleErrors[keyof CreateOptimizationRuleErrors];

export type CreateOptimizationRuleResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        entityType: 'organization' | 'team' | 'agent';
        entityId: string;
        conditions: Array<{
            maxLength: number;
        } | {
            hasTools: boolean;
        }>;
        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        targetModel: string;
        enabled: boolean;
        createdAt: string;
        updatedAt: string;
    };
};

export type CreateOptimizationRuleResponse = CreateOptimizationRuleResponses[keyof CreateOptimizationRuleResponses];

export type DeleteOptimizationRuleData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/optimization-rules/{id}';
};

export type DeleteOptimizationRuleErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeleteOptimizationRuleError = DeleteOptimizationRuleErrors[keyof DeleteOptimizationRuleErrors];

export type DeleteOptimizationRuleResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type DeleteOptimizationRuleResponse = DeleteOptimizationRuleResponses[keyof DeleteOptimizationRuleResponses];

export type GetOptimizationRuleData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/optimization-rules/{id}';
};

export type GetOptimizationRuleErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetOptimizationRuleError = GetOptimizationRuleErrors[keyof GetOptimizationRuleErrors];

export type GetOptimizationRuleResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        entityType: 'organization' | 'team' | 'agent';
        entityId: string;
        conditions: Array<{
            maxLength: number;
        } | {
            hasTools: boolean;
        }>;
        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        targetModel: string;
        enabled: boolean;
        createdAt: string;
        updatedAt: string;
    };
};

export type GetOptimizationRuleResponse = GetOptimizationRuleResponses[keyof GetOptimizationRuleResponses];

export type UpdateOptimizationRuleData = {
    body: {
        id?: string;
        entityType?: 'organization' | 'team' | 'agent';
        entityId?: string;
        conditions?: Array<{
            maxLength: number;
        } | {
            hasTools: boolean;
        }>;
        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        targetModel?: string;
        enabled?: boolean;
        createdAt?: unknown;
        updatedAt?: unknown;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/optimization-rules/{id}';
};

export type UpdateOptimizationRuleErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateOptimizationRuleError = UpdateOptimizationRuleErrors[keyof UpdateOptimizationRuleErrors];

export type UpdateOptimizationRuleResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        entityType: 'organization' | 'team' | 'agent';
        entityId: string;
        conditions: Array<{
            maxLength: number;
        } | {
            hasTools: boolean;
        }>;
        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        targetModel: string;
        enabled: boolean;
        createdAt: string;
        updatedAt: string;
    };
};

export type UpdateOptimizationRuleResponse = UpdateOptimizationRuleResponses[keyof UpdateOptimizationRuleResponses];

export type GetRolesData = {
    body?: never;
    path?: never;
    query?: {
        limit?: number;
        offset?: number;
        name?: string;
    };
    url: '/api/roles';
};

export type GetRolesErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetRolesError = GetRolesErrors[keyof GetRolesErrors];

export type GetRolesResponses = {
    /**
     * Default Response
     */
    200: {
        data: Array<{
            id: string;
            organizationId: string;
            role: string;
            name: string;
            description: string | null;
            permission: {
                [key: string]: Array<'create' | 'read' | 'update' | 'delete' | 'team-admin' | 'admin' | 'cancel' | 'enable' | 'query'>;
            };
            createdAt: string;
            updatedAt: string | null;
            predefined: boolean;
        }>;
        pagination: {
            currentPage: number;
            limit: number;
            total: number;
            totalPages: number;
            hasNext: boolean;
            hasPrev: boolean;
        };
    };
};

export type GetRolesResponse = GetRolesResponses[keyof GetRolesResponses];

export type CreateRoleData = {
    body: {
        name: string;
        description?: string;
        permission: {
            [key: string]: Array<'create' | 'read' | 'update' | 'delete' | 'team-admin' | 'admin' | 'cancel' | 'enable' | 'query'>;
        };
    };
    path?: never;
    query?: never;
    url: '/api/roles';
};

export type CreateRoleErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CreateRoleError = CreateRoleErrors[keyof CreateRoleErrors];

export type CreateRoleResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        role: string;
        name: string;
        description: string | null;
        permission: {
            [key: string]: Array<'create' | 'read' | 'update' | 'delete' | 'team-admin' | 'admin' | 'cancel' | 'enable' | 'query'>;
        };
        createdAt: string;
        updatedAt: string | null;
        predefined: boolean;
    };
};

export type CreateRoleResponse = CreateRoleResponses[keyof CreateRoleResponses];

export type DeleteRoleData = {
    body?: never;
    path: {
        /**
         * Custom role ID (base62)
         */
        roleId: string;
    };
    query?: never;
    url: '/api/roles/{roleId}';
};

export type DeleteRoleErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeleteRoleError = DeleteRoleErrors[keyof DeleteRoleErrors];

export type DeleteRoleResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type DeleteRoleResponse = DeleteRoleResponses[keyof DeleteRoleResponses];

export type GetRoleData = {
    body?: never;
    path: {
        /**
         * Predefined role name or custom role ID
         */
        roleId: 'admin' | 'editor' | 'member' | string;
    };
    query?: never;
    url: '/api/roles/{roleId}';
};

export type GetRoleErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetRoleError = GetRoleErrors[keyof GetRoleErrors];

export type GetRoleResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        role: string;
        name: string;
        description: string | null;
        permission: {
            [key: string]: Array<'create' | 'read' | 'update' | 'delete' | 'team-admin' | 'admin' | 'cancel' | 'enable' | 'query'>;
        };
        createdAt: string;
        updatedAt: string | null;
        predefined: boolean;
    };
};

export type GetRoleResponse = GetRoleResponses[keyof GetRoleResponses];

export type UpdateRoleData = {
    body: {
        name?: string;
        description?: string;
        permission?: {
            [key: string]: Array<'create' | 'read' | 'update' | 'delete' | 'team-admin' | 'admin' | 'cancel' | 'enable' | 'query'>;
        };
    };
    path: {
        /**
         * Predefined role name or custom role ID
         */
        roleId: 'admin' | 'editor' | 'member' | string;
    };
    query?: never;
    url: '/api/roles/{roleId}';
};

export type UpdateRoleErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateRoleError = UpdateRoleErrors[keyof UpdateRoleErrors];

export type UpdateRoleResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        role: string;
        name: string;
        description: string | null;
        permission: {
            [key: string]: Array<'create' | 'read' | 'update' | 'delete' | 'team-admin' | 'admin' | 'cancel' | 'enable' | 'query'>;
        };
        createdAt: string;
        updatedAt: string | null;
        predefined: boolean;
    };
};

export type UpdateRoleResponse = UpdateRoleResponses[keyof UpdateRoleResponses];

export type GetOrganizationData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/organization';
};

export type GetOrganizationErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetOrganizationError = GetOrganizationErrors[keyof GetOrganizationErrors];

export type GetOrganizationResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        slug: string;
        logo: string | null;
        logoDark: string | null;
        createdAt: string;
        metadata: string | null;
        onboardingComplete: boolean;
        theme: 'modern-minimal' | 'clean-slate' | 'mono' | 'twitter' | 'tangerine' | 'bubblegum' | 'caffeine' | 'amber-minimal' | 'cosmic-night' | 'doom-64' | 'mocha-mousse' | 'nature' | 'sunset-horizon' | 'neo-brutalism' | 'vercel' | 'claude' | 'vintage-paper' | 'boxy-minimalistic' | 'catppuccin' | 'solarized-dark' | 'gruvbox-dark' | 'dracula-dark' | 'monokai-dark' | 'moonlight-dark';
        customFont: 'lato' | 'inter' | 'open-sans' | 'roboto' | 'source-sans-pro' | 'jetbrains-mono';
        convertToolResultsToToon: boolean;
        compressionScope: 'organization' | 'team';
        globalToolPolicy: 'permissive' | 'restrictive';
        allowChatFileUploads: boolean;
        embeddingModel: string | null;
        embeddingDimensions: EmbeddingDimensions | null;
        embeddingChatApiKeyId: string | null;
        rerankerChatApiKeyId: string | null;
        rerankerModel: string | null;
        defaultLlmModel: string | null;
        defaultLlmProvider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        defaultModelId: string | null;
        defaultLlmApiKeyId: string | null;
        defaultUserLimitValue: number | null;
        defaultUserLimitModel: Array<string> | null;
        defaultUserLimitCleanupInterval: '1h' | '12h' | '24h' | '1w' | '1m';
        defaultAgentId: string | null;
        favicon: string | null;
        appName: string | null;
        ogDescription: string | null;
        footerText: string | null;
        chatLinks: Array<{
            label: string;
            url: string;
        }> | null;
        onboardingWizard: {
            label: string;
            pages: Array<{
                image?: string | null;
                content: string;
            }>;
        } | null;
        chatPlaceholders: Array<string> | null;
        animateChatPlaceholders: boolean;
        iconLogo: string | null;
        iconLogoDark: string | null;
        chatErrorSupportMessage: string | null;
        slimChatErrorUi: boolean;
        showTwoFactor: boolean;
        oauthAccessTokenLifetimeSeconds: number;
        connectionDefaultMcpGatewayId: string | null;
        connectionDefaultLlmProxyId: string | null;
        connectionDefaultClientId: string | null;
        connectionShownClientIds: Array<string> | null;
        connectionShownProviders: Array<string> | null;
        connectionBaseUrls: Array<{
            url: string;
            description: string;
            isDefault: boolean;
            visible: boolean;
        }> | null;
        presetEntityName: string | null;
        presetEntityNamePlural: string | null;
        presetEntityDefaultLabel: string | null;
        skillToolsEnabled: boolean;
        presetEntityDefaultValidationRegex: string | null;
    };
};

export type GetOrganizationResponse = GetOrganizationResponses[keyof GetOrganizationResponses];

export type GetAppearanceSettingsData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/organization/appearance-settings';
};

export type GetAppearanceSettingsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetAppearanceSettingsError = GetAppearanceSettingsErrors[keyof GetAppearanceSettingsErrors];

export type GetAppearanceSettingsResponses = {
    /**
     * Default Response
     */
    200: {
        theme: 'modern-minimal' | 'clean-slate' | 'mono' | 'twitter' | 'tangerine' | 'bubblegum' | 'caffeine' | 'amber-minimal' | 'cosmic-night' | 'doom-64' | 'mocha-mousse' | 'nature' | 'sunset-horizon' | 'neo-brutalism' | 'vercel' | 'claude' | 'vintage-paper' | 'boxy-minimalistic' | 'catppuccin' | 'solarized-dark' | 'gruvbox-dark' | 'dracula-dark' | 'monokai-dark' | 'moonlight-dark';
        customFont: 'lato' | 'inter' | 'open-sans' | 'roboto' | 'source-sans-pro' | 'jetbrains-mono';
        logo: string | null;
        logoDark: string | null;
        favicon: string | null;
        iconLogo: string | null;
        iconLogoDark: string | null;
        appName: string | null;
        ogDescription: string | null;
        footerText: string | null;
        chatLinks: Array<{
            label: string;
            url: string;
        }> | null;
        onboardingWizard: {
            label: string;
            pages: Array<{
                image?: string | null;
                content: string;
            }>;
        } | null;
        chatErrorSupportMessage: string | null;
        slimChatErrorUi: boolean;
        animateChatPlaceholders: boolean;
    };
};

export type GetAppearanceSettingsResponse = GetAppearanceSettingsResponses[keyof GetAppearanceSettingsResponses];

export type UpdateAppearanceSettingsData = {
    body: {
        theme?: 'modern-minimal' | 'clean-slate' | 'mono' | 'twitter' | 'tangerine' | 'bubblegum' | 'caffeine' | 'amber-minimal' | 'cosmic-night' | 'doom-64' | 'mocha-mousse' | 'nature' | 'sunset-horizon' | 'neo-brutalism' | 'vercel' | 'claude' | 'vintage-paper' | 'boxy-minimalistic' | 'catppuccin' | 'solarized-dark' | 'gruvbox-dark' | 'dracula-dark' | 'monokai-dark' | 'moonlight-dark';
        customFont?: 'lato' | 'inter' | 'open-sans' | 'roboto' | 'source-sans-pro' | 'jetbrains-mono';
        logo?: string | null;
        logoDark?: string | null;
        favicon?: string | null;
        iconLogo?: string | null;
        iconLogoDark?: string | null;
        appName?: string | null;
        ogDescription?: string | null;
        footerText?: string | null;
        chatLinks?: Array<{
            label: string;
            url: string;
        }> | null;
        onboardingWizard?: {
            label: string;
            pages: Array<{
                image?: string | null;
                content: string;
            }>;
        } | null;
        chatErrorSupportMessage?: string | null;
        slimChatErrorUi?: boolean;
        chatPlaceholders?: Array<string> | null;
        animateChatPlaceholders?: boolean;
    };
    path?: never;
    query?: never;
    url: '/api/organization/appearance-settings';
};

export type UpdateAppearanceSettingsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateAppearanceSettingsError = UpdateAppearanceSettingsErrors[keyof UpdateAppearanceSettingsErrors];

export type UpdateAppearanceSettingsResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        slug: string;
        logo: string | null;
        logoDark: string | null;
        createdAt: string;
        metadata: string | null;
        onboardingComplete: boolean;
        theme: 'modern-minimal' | 'clean-slate' | 'mono' | 'twitter' | 'tangerine' | 'bubblegum' | 'caffeine' | 'amber-minimal' | 'cosmic-night' | 'doom-64' | 'mocha-mousse' | 'nature' | 'sunset-horizon' | 'neo-brutalism' | 'vercel' | 'claude' | 'vintage-paper' | 'boxy-minimalistic' | 'catppuccin' | 'solarized-dark' | 'gruvbox-dark' | 'dracula-dark' | 'monokai-dark' | 'moonlight-dark';
        customFont: 'lato' | 'inter' | 'open-sans' | 'roboto' | 'source-sans-pro' | 'jetbrains-mono';
        convertToolResultsToToon: boolean;
        compressionScope: 'organization' | 'team';
        globalToolPolicy: 'permissive' | 'restrictive';
        allowChatFileUploads: boolean;
        embeddingModel: string | null;
        embeddingDimensions: EmbeddingDimensions | null;
        embeddingChatApiKeyId: string | null;
        rerankerChatApiKeyId: string | null;
        rerankerModel: string | null;
        defaultLlmModel: string | null;
        defaultLlmProvider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        defaultModelId: string | null;
        defaultLlmApiKeyId: string | null;
        defaultUserLimitValue: number | null;
        defaultUserLimitModel: Array<string> | null;
        defaultUserLimitCleanupInterval: '1h' | '12h' | '24h' | '1w' | '1m';
        defaultAgentId: string | null;
        favicon: string | null;
        appName: string | null;
        ogDescription: string | null;
        footerText: string | null;
        chatLinks: Array<{
            label: string;
            url: string;
        }> | null;
        onboardingWizard: {
            label: string;
            pages: Array<{
                image?: string | null;
                content: string;
            }>;
        } | null;
        chatPlaceholders: Array<string> | null;
        animateChatPlaceholders: boolean;
        iconLogo: string | null;
        iconLogoDark: string | null;
        chatErrorSupportMessage: string | null;
        slimChatErrorUi: boolean;
        showTwoFactor: boolean;
        oauthAccessTokenLifetimeSeconds: number;
        connectionDefaultMcpGatewayId: string | null;
        connectionDefaultLlmProxyId: string | null;
        connectionDefaultClientId: string | null;
        connectionShownClientIds: Array<string> | null;
        connectionShownProviders: Array<string> | null;
        connectionBaseUrls: Array<{
            url: string;
            description: string;
            isDefault: boolean;
            visible: boolean;
        }> | null;
        presetEntityName: string | null;
        presetEntityNamePlural: string | null;
        presetEntityDefaultLabel: string | null;
        skillToolsEnabled: boolean;
        presetEntityDefaultValidationRegex: string | null;
    };
};

export type UpdateAppearanceSettingsResponse = UpdateAppearanceSettingsResponses[keyof UpdateAppearanceSettingsResponses];

export type UpdateSecuritySettingsData = {
    body: {
        globalToolPolicy?: 'permissive' | 'restrictive';
        allowChatFileUploads?: boolean;
    };
    path?: never;
    query?: never;
    url: '/api/organization/security-settings';
};

export type UpdateSecuritySettingsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateSecuritySettingsError = UpdateSecuritySettingsErrors[keyof UpdateSecuritySettingsErrors];

export type UpdateSecuritySettingsResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        slug: string;
        logo: string | null;
        logoDark: string | null;
        createdAt: string;
        metadata: string | null;
        onboardingComplete: boolean;
        theme: 'modern-minimal' | 'clean-slate' | 'mono' | 'twitter' | 'tangerine' | 'bubblegum' | 'caffeine' | 'amber-minimal' | 'cosmic-night' | 'doom-64' | 'mocha-mousse' | 'nature' | 'sunset-horizon' | 'neo-brutalism' | 'vercel' | 'claude' | 'vintage-paper' | 'boxy-minimalistic' | 'catppuccin' | 'solarized-dark' | 'gruvbox-dark' | 'dracula-dark' | 'monokai-dark' | 'moonlight-dark';
        customFont: 'lato' | 'inter' | 'open-sans' | 'roboto' | 'source-sans-pro' | 'jetbrains-mono';
        convertToolResultsToToon: boolean;
        compressionScope: 'organization' | 'team';
        globalToolPolicy: 'permissive' | 'restrictive';
        allowChatFileUploads: boolean;
        embeddingModel: string | null;
        embeddingDimensions: EmbeddingDimensions | null;
        embeddingChatApiKeyId: string | null;
        rerankerChatApiKeyId: string | null;
        rerankerModel: string | null;
        defaultLlmModel: string | null;
        defaultLlmProvider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        defaultModelId: string | null;
        defaultLlmApiKeyId: string | null;
        defaultUserLimitValue: number | null;
        defaultUserLimitModel: Array<string> | null;
        defaultUserLimitCleanupInterval: '1h' | '12h' | '24h' | '1w' | '1m';
        defaultAgentId: string | null;
        favicon: string | null;
        appName: string | null;
        ogDescription: string | null;
        footerText: string | null;
        chatLinks: Array<{
            label: string;
            url: string;
        }> | null;
        onboardingWizard: {
            label: string;
            pages: Array<{
                image?: string | null;
                content: string;
            }>;
        } | null;
        chatPlaceholders: Array<string> | null;
        animateChatPlaceholders: boolean;
        iconLogo: string | null;
        iconLogoDark: string | null;
        chatErrorSupportMessage: string | null;
        slimChatErrorUi: boolean;
        showTwoFactor: boolean;
        oauthAccessTokenLifetimeSeconds: number;
        connectionDefaultMcpGatewayId: string | null;
        connectionDefaultLlmProxyId: string | null;
        connectionDefaultClientId: string | null;
        connectionShownClientIds: Array<string> | null;
        connectionShownProviders: Array<string> | null;
        connectionBaseUrls: Array<{
            url: string;
            description: string;
            isDefault: boolean;
            visible: boolean;
        }> | null;
        presetEntityName: string | null;
        presetEntityNamePlural: string | null;
        presetEntityDefaultLabel: string | null;
        skillToolsEnabled: boolean;
        presetEntityDefaultValidationRegex: string | null;
    };
};

export type UpdateSecuritySettingsResponse = UpdateSecuritySettingsResponses[keyof UpdateSecuritySettingsResponses];

export type UpdateLlmSettingsData = {
    body: {
        convertToolResultsToToon?: boolean;
        compressionScope?: 'organization' | 'team';
        defaultUserLimitValue?: number | null;
        defaultUserLimitModel?: Array<string> | null;
        defaultUserLimitCleanupInterval?: '1h' | '12h' | '24h' | '1w' | '1m';
    };
    path?: never;
    query?: never;
    url: '/api/organization/llm-settings';
};

export type UpdateLlmSettingsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateLlmSettingsError = UpdateLlmSettingsErrors[keyof UpdateLlmSettingsErrors];

export type UpdateLlmSettingsResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        slug: string;
        logo: string | null;
        logoDark: string | null;
        createdAt: string;
        metadata: string | null;
        onboardingComplete: boolean;
        theme: 'modern-minimal' | 'clean-slate' | 'mono' | 'twitter' | 'tangerine' | 'bubblegum' | 'caffeine' | 'amber-minimal' | 'cosmic-night' | 'doom-64' | 'mocha-mousse' | 'nature' | 'sunset-horizon' | 'neo-brutalism' | 'vercel' | 'claude' | 'vintage-paper' | 'boxy-minimalistic' | 'catppuccin' | 'solarized-dark' | 'gruvbox-dark' | 'dracula-dark' | 'monokai-dark' | 'moonlight-dark';
        customFont: 'lato' | 'inter' | 'open-sans' | 'roboto' | 'source-sans-pro' | 'jetbrains-mono';
        convertToolResultsToToon: boolean;
        compressionScope: 'organization' | 'team';
        globalToolPolicy: 'permissive' | 'restrictive';
        allowChatFileUploads: boolean;
        embeddingModel: string | null;
        embeddingDimensions: EmbeddingDimensions | null;
        embeddingChatApiKeyId: string | null;
        rerankerChatApiKeyId: string | null;
        rerankerModel: string | null;
        defaultLlmModel: string | null;
        defaultLlmProvider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        defaultModelId: string | null;
        defaultLlmApiKeyId: string | null;
        defaultUserLimitValue: number | null;
        defaultUserLimitModel: Array<string> | null;
        defaultUserLimitCleanupInterval: '1h' | '12h' | '24h' | '1w' | '1m';
        defaultAgentId: string | null;
        favicon: string | null;
        appName: string | null;
        ogDescription: string | null;
        footerText: string | null;
        chatLinks: Array<{
            label: string;
            url: string;
        }> | null;
        onboardingWizard: {
            label: string;
            pages: Array<{
                image?: string | null;
                content: string;
            }>;
        } | null;
        chatPlaceholders: Array<string> | null;
        animateChatPlaceholders: boolean;
        iconLogo: string | null;
        iconLogoDark: string | null;
        chatErrorSupportMessage: string | null;
        slimChatErrorUi: boolean;
        showTwoFactor: boolean;
        oauthAccessTokenLifetimeSeconds: number;
        connectionDefaultMcpGatewayId: string | null;
        connectionDefaultLlmProxyId: string | null;
        connectionDefaultClientId: string | null;
        connectionShownClientIds: Array<string> | null;
        connectionShownProviders: Array<string> | null;
        connectionBaseUrls: Array<{
            url: string;
            description: string;
            isDefault: boolean;
            visible: boolean;
        }> | null;
        presetEntityName: string | null;
        presetEntityNamePlural: string | null;
        presetEntityDefaultLabel: string | null;
        skillToolsEnabled: boolean;
        presetEntityDefaultValidationRegex: string | null;
    };
};

export type UpdateLlmSettingsResponse = UpdateLlmSettingsResponses[keyof UpdateLlmSettingsResponses];

export type UpdateAgentSettingsData = {
    body: {
        defaultModelId?: string | null;
        defaultLlmApiKeyId?: string | null;
        defaultAgentId?: string | null;
    };
    path?: never;
    query?: never;
    url: '/api/organization/agent-settings';
};

export type UpdateAgentSettingsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateAgentSettingsError = UpdateAgentSettingsErrors[keyof UpdateAgentSettingsErrors];

export type UpdateAgentSettingsResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        slug: string;
        logo: string | null;
        logoDark: string | null;
        createdAt: string;
        metadata: string | null;
        onboardingComplete: boolean;
        theme: 'modern-minimal' | 'clean-slate' | 'mono' | 'twitter' | 'tangerine' | 'bubblegum' | 'caffeine' | 'amber-minimal' | 'cosmic-night' | 'doom-64' | 'mocha-mousse' | 'nature' | 'sunset-horizon' | 'neo-brutalism' | 'vercel' | 'claude' | 'vintage-paper' | 'boxy-minimalistic' | 'catppuccin' | 'solarized-dark' | 'gruvbox-dark' | 'dracula-dark' | 'monokai-dark' | 'moonlight-dark';
        customFont: 'lato' | 'inter' | 'open-sans' | 'roboto' | 'source-sans-pro' | 'jetbrains-mono';
        convertToolResultsToToon: boolean;
        compressionScope: 'organization' | 'team';
        globalToolPolicy: 'permissive' | 'restrictive';
        allowChatFileUploads: boolean;
        embeddingModel: string | null;
        embeddingDimensions: EmbeddingDimensions | null;
        embeddingChatApiKeyId: string | null;
        rerankerChatApiKeyId: string | null;
        rerankerModel: string | null;
        defaultLlmModel: string | null;
        defaultLlmProvider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        defaultModelId: string | null;
        defaultLlmApiKeyId: string | null;
        defaultUserLimitValue: number | null;
        defaultUserLimitModel: Array<string> | null;
        defaultUserLimitCleanupInterval: '1h' | '12h' | '24h' | '1w' | '1m';
        defaultAgentId: string | null;
        favicon: string | null;
        appName: string | null;
        ogDescription: string | null;
        footerText: string | null;
        chatLinks: Array<{
            label: string;
            url: string;
        }> | null;
        onboardingWizard: {
            label: string;
            pages: Array<{
                image?: string | null;
                content: string;
            }>;
        } | null;
        chatPlaceholders: Array<string> | null;
        animateChatPlaceholders: boolean;
        iconLogo: string | null;
        iconLogoDark: string | null;
        chatErrorSupportMessage: string | null;
        slimChatErrorUi: boolean;
        showTwoFactor: boolean;
        oauthAccessTokenLifetimeSeconds: number;
        connectionDefaultMcpGatewayId: string | null;
        connectionDefaultLlmProxyId: string | null;
        connectionDefaultClientId: string | null;
        connectionShownClientIds: Array<string> | null;
        connectionShownProviders: Array<string> | null;
        connectionBaseUrls: Array<{
            url: string;
            description: string;
            isDefault: boolean;
            visible: boolean;
        }> | null;
        presetEntityName: string | null;
        presetEntityNamePlural: string | null;
        presetEntityDefaultLabel: string | null;
        skillToolsEnabled: boolean;
        presetEntityDefaultValidationRegex: string | null;
    };
};

export type UpdateAgentSettingsResponse = UpdateAgentSettingsResponses[keyof UpdateAgentSettingsResponses];

export type UpdateConnectionSettingsData = {
    body: {
        connectionDefaultMcpGatewayId?: string | null;
        connectionDefaultLlmProxyId?: string | null;
        connectionDefaultClientId?: string | null;
        connectionShownClientIds?: Array<string> | null;
        connectionShownProviders?: Array<'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure'> | null;
        connectionBaseUrls?: Array<{
            url: string;
            description?: string;
            isDefault?: boolean;
            visible?: boolean;
        }> | null;
    };
    path?: never;
    query?: never;
    url: '/api/organization/connection-settings';
};

export type UpdateConnectionSettingsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateConnectionSettingsError = UpdateConnectionSettingsErrors[keyof UpdateConnectionSettingsErrors];

export type UpdateConnectionSettingsResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        slug: string;
        logo: string | null;
        logoDark: string | null;
        createdAt: string;
        metadata: string | null;
        onboardingComplete: boolean;
        theme: 'modern-minimal' | 'clean-slate' | 'mono' | 'twitter' | 'tangerine' | 'bubblegum' | 'caffeine' | 'amber-minimal' | 'cosmic-night' | 'doom-64' | 'mocha-mousse' | 'nature' | 'sunset-horizon' | 'neo-brutalism' | 'vercel' | 'claude' | 'vintage-paper' | 'boxy-minimalistic' | 'catppuccin' | 'solarized-dark' | 'gruvbox-dark' | 'dracula-dark' | 'monokai-dark' | 'moonlight-dark';
        customFont: 'lato' | 'inter' | 'open-sans' | 'roboto' | 'source-sans-pro' | 'jetbrains-mono';
        convertToolResultsToToon: boolean;
        compressionScope: 'organization' | 'team';
        globalToolPolicy: 'permissive' | 'restrictive';
        allowChatFileUploads: boolean;
        embeddingModel: string | null;
        embeddingDimensions: EmbeddingDimensions | null;
        embeddingChatApiKeyId: string | null;
        rerankerChatApiKeyId: string | null;
        rerankerModel: string | null;
        defaultLlmModel: string | null;
        defaultLlmProvider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        defaultModelId: string | null;
        defaultLlmApiKeyId: string | null;
        defaultUserLimitValue: number | null;
        defaultUserLimitModel: Array<string> | null;
        defaultUserLimitCleanupInterval: '1h' | '12h' | '24h' | '1w' | '1m';
        defaultAgentId: string | null;
        favicon: string | null;
        appName: string | null;
        ogDescription: string | null;
        footerText: string | null;
        chatLinks: Array<{
            label: string;
            url: string;
        }> | null;
        onboardingWizard: {
            label: string;
            pages: Array<{
                image?: string | null;
                content: string;
            }>;
        } | null;
        chatPlaceholders: Array<string> | null;
        animateChatPlaceholders: boolean;
        iconLogo: string | null;
        iconLogoDark: string | null;
        chatErrorSupportMessage: string | null;
        slimChatErrorUi: boolean;
        showTwoFactor: boolean;
        oauthAccessTokenLifetimeSeconds: number;
        connectionDefaultMcpGatewayId: string | null;
        connectionDefaultLlmProxyId: string | null;
        connectionDefaultClientId: string | null;
        connectionShownClientIds: Array<string> | null;
        connectionShownProviders: Array<string> | null;
        connectionBaseUrls: Array<{
            url: string;
            description: string;
            isDefault: boolean;
            visible: boolean;
        }> | null;
        presetEntityName: string | null;
        presetEntityNamePlural: string | null;
        presetEntityDefaultLabel: string | null;
        skillToolsEnabled: boolean;
        presetEntityDefaultValidationRegex: string | null;
    };
};

export type UpdateConnectionSettingsResponse = UpdateConnectionSettingsResponses[keyof UpdateConnectionSettingsResponses];

export type UpdatePresetEntityNameData = {
    body: {
        presetEntityName: string | null;
        presetEntityNamePlural: string | null;
    };
    path?: never;
    query?: never;
    url: '/api/organization/preset-entity-name';
};

export type UpdatePresetEntityNameErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdatePresetEntityNameError = UpdatePresetEntityNameErrors[keyof UpdatePresetEntityNameErrors];

export type UpdatePresetEntityNameResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        slug: string;
        logo: string | null;
        logoDark: string | null;
        createdAt: string;
        metadata: string | null;
        onboardingComplete: boolean;
        theme: 'modern-minimal' | 'clean-slate' | 'mono' | 'twitter' | 'tangerine' | 'bubblegum' | 'caffeine' | 'amber-minimal' | 'cosmic-night' | 'doom-64' | 'mocha-mousse' | 'nature' | 'sunset-horizon' | 'neo-brutalism' | 'vercel' | 'claude' | 'vintage-paper' | 'boxy-minimalistic' | 'catppuccin' | 'solarized-dark' | 'gruvbox-dark' | 'dracula-dark' | 'monokai-dark' | 'moonlight-dark';
        customFont: 'lato' | 'inter' | 'open-sans' | 'roboto' | 'source-sans-pro' | 'jetbrains-mono';
        convertToolResultsToToon: boolean;
        compressionScope: 'organization' | 'team';
        globalToolPolicy: 'permissive' | 'restrictive';
        allowChatFileUploads: boolean;
        embeddingModel: string | null;
        embeddingDimensions: EmbeddingDimensions | null;
        embeddingChatApiKeyId: string | null;
        rerankerChatApiKeyId: string | null;
        rerankerModel: string | null;
        defaultLlmModel: string | null;
        defaultLlmProvider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        defaultModelId: string | null;
        defaultLlmApiKeyId: string | null;
        defaultUserLimitValue: number | null;
        defaultUserLimitModel: Array<string> | null;
        defaultUserLimitCleanupInterval: '1h' | '12h' | '24h' | '1w' | '1m';
        defaultAgentId: string | null;
        favicon: string | null;
        appName: string | null;
        ogDescription: string | null;
        footerText: string | null;
        chatLinks: Array<{
            label: string;
            url: string;
        }> | null;
        onboardingWizard: {
            label: string;
            pages: Array<{
                image?: string | null;
                content: string;
            }>;
        } | null;
        chatPlaceholders: Array<string> | null;
        animateChatPlaceholders: boolean;
        iconLogo: string | null;
        iconLogoDark: string | null;
        chatErrorSupportMessage: string | null;
        slimChatErrorUi: boolean;
        showTwoFactor: boolean;
        oauthAccessTokenLifetimeSeconds: number;
        connectionDefaultMcpGatewayId: string | null;
        connectionDefaultLlmProxyId: string | null;
        connectionDefaultClientId: string | null;
        connectionShownClientIds: Array<string> | null;
        connectionShownProviders: Array<string> | null;
        connectionBaseUrls: Array<{
            url: string;
            description: string;
            isDefault: boolean;
            visible: boolean;
        }> | null;
        presetEntityName: string | null;
        presetEntityNamePlural: string | null;
        presetEntityDefaultLabel: string | null;
        skillToolsEnabled: boolean;
        presetEntityDefaultValidationRegex: string | null;
    };
};

export type UpdatePresetEntityNameResponse = UpdatePresetEntityNameResponses[keyof UpdatePresetEntityNameResponses];

export type UpdatePresetEntityDefaultLabelData = {
    body: {
        presetEntityDefaultLabel: string | null;
    };
    path?: never;
    query?: never;
    url: '/api/organization/preset-entity-default-label';
};

export type UpdatePresetEntityDefaultLabelErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdatePresetEntityDefaultLabelError = UpdatePresetEntityDefaultLabelErrors[keyof UpdatePresetEntityDefaultLabelErrors];

export type UpdatePresetEntityDefaultLabelResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        slug: string;
        logo: string | null;
        logoDark: string | null;
        createdAt: string;
        metadata: string | null;
        onboardingComplete: boolean;
        theme: 'modern-minimal' | 'clean-slate' | 'mono' | 'twitter' | 'tangerine' | 'bubblegum' | 'caffeine' | 'amber-minimal' | 'cosmic-night' | 'doom-64' | 'mocha-mousse' | 'nature' | 'sunset-horizon' | 'neo-brutalism' | 'vercel' | 'claude' | 'vintage-paper' | 'boxy-minimalistic' | 'catppuccin' | 'solarized-dark' | 'gruvbox-dark' | 'dracula-dark' | 'monokai-dark' | 'moonlight-dark';
        customFont: 'lato' | 'inter' | 'open-sans' | 'roboto' | 'source-sans-pro' | 'jetbrains-mono';
        convertToolResultsToToon: boolean;
        compressionScope: 'organization' | 'team';
        globalToolPolicy: 'permissive' | 'restrictive';
        allowChatFileUploads: boolean;
        embeddingModel: string | null;
        embeddingDimensions: EmbeddingDimensions | null;
        embeddingChatApiKeyId: string | null;
        rerankerChatApiKeyId: string | null;
        rerankerModel: string | null;
        defaultLlmModel: string | null;
        defaultLlmProvider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        defaultModelId: string | null;
        defaultLlmApiKeyId: string | null;
        defaultUserLimitValue: number | null;
        defaultUserLimitModel: Array<string> | null;
        defaultUserLimitCleanupInterval: '1h' | '12h' | '24h' | '1w' | '1m';
        defaultAgentId: string | null;
        favicon: string | null;
        appName: string | null;
        ogDescription: string | null;
        footerText: string | null;
        chatLinks: Array<{
            label: string;
            url: string;
        }> | null;
        onboardingWizard: {
            label: string;
            pages: Array<{
                image?: string | null;
                content: string;
            }>;
        } | null;
        chatPlaceholders: Array<string> | null;
        animateChatPlaceholders: boolean;
        iconLogo: string | null;
        iconLogoDark: string | null;
        chatErrorSupportMessage: string | null;
        slimChatErrorUi: boolean;
        showTwoFactor: boolean;
        oauthAccessTokenLifetimeSeconds: number;
        connectionDefaultMcpGatewayId: string | null;
        connectionDefaultLlmProxyId: string | null;
        connectionDefaultClientId: string | null;
        connectionShownClientIds: Array<string> | null;
        connectionShownProviders: Array<string> | null;
        connectionBaseUrls: Array<{
            url: string;
            description: string;
            isDefault: boolean;
            visible: boolean;
        }> | null;
        presetEntityName: string | null;
        presetEntityNamePlural: string | null;
        presetEntityDefaultLabel: string | null;
        skillToolsEnabled: boolean;
        presetEntityDefaultValidationRegex: string | null;
    };
};

export type UpdatePresetEntityDefaultLabelResponse = UpdatePresetEntityDefaultLabelResponses[keyof UpdatePresetEntityDefaultLabelResponses];

export type UpdatePresetEntityDefaultValidationRegexData = {
    body: {
        presetEntityDefaultValidationRegex: string | null;
    };
    path?: never;
    query?: never;
    url: '/api/organization/preset-entity-default-validation-regex';
};

export type UpdatePresetEntityDefaultValidationRegexErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdatePresetEntityDefaultValidationRegexError = UpdatePresetEntityDefaultValidationRegexErrors[keyof UpdatePresetEntityDefaultValidationRegexErrors];

export type UpdatePresetEntityDefaultValidationRegexResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        slug: string;
        logo: string | null;
        logoDark: string | null;
        createdAt: string;
        metadata: string | null;
        onboardingComplete: boolean;
        theme: 'modern-minimal' | 'clean-slate' | 'mono' | 'twitter' | 'tangerine' | 'bubblegum' | 'caffeine' | 'amber-minimal' | 'cosmic-night' | 'doom-64' | 'mocha-mousse' | 'nature' | 'sunset-horizon' | 'neo-brutalism' | 'vercel' | 'claude' | 'vintage-paper' | 'boxy-minimalistic' | 'catppuccin' | 'solarized-dark' | 'gruvbox-dark' | 'dracula-dark' | 'monokai-dark' | 'moonlight-dark';
        customFont: 'lato' | 'inter' | 'open-sans' | 'roboto' | 'source-sans-pro' | 'jetbrains-mono';
        convertToolResultsToToon: boolean;
        compressionScope: 'organization' | 'team';
        globalToolPolicy: 'permissive' | 'restrictive';
        allowChatFileUploads: boolean;
        embeddingModel: string | null;
        embeddingDimensions: EmbeddingDimensions | null;
        embeddingChatApiKeyId: string | null;
        rerankerChatApiKeyId: string | null;
        rerankerModel: string | null;
        defaultLlmModel: string | null;
        defaultLlmProvider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        defaultModelId: string | null;
        defaultLlmApiKeyId: string | null;
        defaultUserLimitValue: number | null;
        defaultUserLimitModel: Array<string> | null;
        defaultUserLimitCleanupInterval: '1h' | '12h' | '24h' | '1w' | '1m';
        defaultAgentId: string | null;
        favicon: string | null;
        appName: string | null;
        ogDescription: string | null;
        footerText: string | null;
        chatLinks: Array<{
            label: string;
            url: string;
        }> | null;
        onboardingWizard: {
            label: string;
            pages: Array<{
                image?: string | null;
                content: string;
            }>;
        } | null;
        chatPlaceholders: Array<string> | null;
        animateChatPlaceholders: boolean;
        iconLogo: string | null;
        iconLogoDark: string | null;
        chatErrorSupportMessage: string | null;
        slimChatErrorUi: boolean;
        showTwoFactor: boolean;
        oauthAccessTokenLifetimeSeconds: number;
        connectionDefaultMcpGatewayId: string | null;
        connectionDefaultLlmProxyId: string | null;
        connectionDefaultClientId: string | null;
        connectionShownClientIds: Array<string> | null;
        connectionShownProviders: Array<string> | null;
        connectionBaseUrls: Array<{
            url: string;
            description: string;
            isDefault: boolean;
            visible: boolean;
        }> | null;
        presetEntityName: string | null;
        presetEntityNamePlural: string | null;
        presetEntityDefaultLabel: string | null;
        skillToolsEnabled: boolean;
        presetEntityDefaultValidationRegex: string | null;
    };
};

export type UpdatePresetEntityDefaultValidationRegexResponse = UpdatePresetEntityDefaultValidationRegexResponses[keyof UpdatePresetEntityDefaultValidationRegexResponses];

export type UpdateAuthSettingsData = {
    body: {
        oauthAccessTokenLifetimeSeconds?: number;
        showTwoFactor?: boolean;
    };
    path?: never;
    query?: never;
    url: '/api/organization/auth-settings';
};

export type UpdateAuthSettingsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateAuthSettingsError = UpdateAuthSettingsErrors[keyof UpdateAuthSettingsErrors];

export type UpdateAuthSettingsResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        slug: string;
        logo: string | null;
        logoDark: string | null;
        createdAt: string;
        metadata: string | null;
        onboardingComplete: boolean;
        theme: 'modern-minimal' | 'clean-slate' | 'mono' | 'twitter' | 'tangerine' | 'bubblegum' | 'caffeine' | 'amber-minimal' | 'cosmic-night' | 'doom-64' | 'mocha-mousse' | 'nature' | 'sunset-horizon' | 'neo-brutalism' | 'vercel' | 'claude' | 'vintage-paper' | 'boxy-minimalistic' | 'catppuccin' | 'solarized-dark' | 'gruvbox-dark' | 'dracula-dark' | 'monokai-dark' | 'moonlight-dark';
        customFont: 'lato' | 'inter' | 'open-sans' | 'roboto' | 'source-sans-pro' | 'jetbrains-mono';
        convertToolResultsToToon: boolean;
        compressionScope: 'organization' | 'team';
        globalToolPolicy: 'permissive' | 'restrictive';
        allowChatFileUploads: boolean;
        embeddingModel: string | null;
        embeddingDimensions: EmbeddingDimensions | null;
        embeddingChatApiKeyId: string | null;
        rerankerChatApiKeyId: string | null;
        rerankerModel: string | null;
        defaultLlmModel: string | null;
        defaultLlmProvider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        defaultModelId: string | null;
        defaultLlmApiKeyId: string | null;
        defaultUserLimitValue: number | null;
        defaultUserLimitModel: Array<string> | null;
        defaultUserLimitCleanupInterval: '1h' | '12h' | '24h' | '1w' | '1m';
        defaultAgentId: string | null;
        favicon: string | null;
        appName: string | null;
        ogDescription: string | null;
        footerText: string | null;
        chatLinks: Array<{
            label: string;
            url: string;
        }> | null;
        onboardingWizard: {
            label: string;
            pages: Array<{
                image?: string | null;
                content: string;
            }>;
        } | null;
        chatPlaceholders: Array<string> | null;
        animateChatPlaceholders: boolean;
        iconLogo: string | null;
        iconLogoDark: string | null;
        chatErrorSupportMessage: string | null;
        slimChatErrorUi: boolean;
        showTwoFactor: boolean;
        oauthAccessTokenLifetimeSeconds: number;
        connectionDefaultMcpGatewayId: string | null;
        connectionDefaultLlmProxyId: string | null;
        connectionDefaultClientId: string | null;
        connectionShownClientIds: Array<string> | null;
        connectionShownProviders: Array<string> | null;
        connectionBaseUrls: Array<{
            url: string;
            description: string;
            isDefault: boolean;
            visible: boolean;
        }> | null;
        presetEntityName: string | null;
        presetEntityNamePlural: string | null;
        presetEntityDefaultLabel: string | null;
        skillToolsEnabled: boolean;
        presetEntityDefaultValidationRegex: string | null;
    };
};

export type UpdateAuthSettingsResponse = UpdateAuthSettingsResponses[keyof UpdateAuthSettingsResponses];

export type UpdateKnowledgeSettingsData = {
    body: {
        embeddingModel?: string | null;
        embeddingChatApiKeyId?: string | null;
        rerankerChatApiKeyId?: string | null;
        rerankerModel?: string | null;
    };
    path?: never;
    query?: never;
    url: '/api/organization/knowledge-settings';
};

export type UpdateKnowledgeSettingsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateKnowledgeSettingsError = UpdateKnowledgeSettingsErrors[keyof UpdateKnowledgeSettingsErrors];

export type UpdateKnowledgeSettingsResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        slug: string;
        logo: string | null;
        logoDark: string | null;
        createdAt: string;
        metadata: string | null;
        onboardingComplete: boolean;
        theme: 'modern-minimal' | 'clean-slate' | 'mono' | 'twitter' | 'tangerine' | 'bubblegum' | 'caffeine' | 'amber-minimal' | 'cosmic-night' | 'doom-64' | 'mocha-mousse' | 'nature' | 'sunset-horizon' | 'neo-brutalism' | 'vercel' | 'claude' | 'vintage-paper' | 'boxy-minimalistic' | 'catppuccin' | 'solarized-dark' | 'gruvbox-dark' | 'dracula-dark' | 'monokai-dark' | 'moonlight-dark';
        customFont: 'lato' | 'inter' | 'open-sans' | 'roboto' | 'source-sans-pro' | 'jetbrains-mono';
        convertToolResultsToToon: boolean;
        compressionScope: 'organization' | 'team';
        globalToolPolicy: 'permissive' | 'restrictive';
        allowChatFileUploads: boolean;
        embeddingModel: string | null;
        embeddingDimensions: EmbeddingDimensions | null;
        embeddingChatApiKeyId: string | null;
        rerankerChatApiKeyId: string | null;
        rerankerModel: string | null;
        defaultLlmModel: string | null;
        defaultLlmProvider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        defaultModelId: string | null;
        defaultLlmApiKeyId: string | null;
        defaultUserLimitValue: number | null;
        defaultUserLimitModel: Array<string> | null;
        defaultUserLimitCleanupInterval: '1h' | '12h' | '24h' | '1w' | '1m';
        defaultAgentId: string | null;
        favicon: string | null;
        appName: string | null;
        ogDescription: string | null;
        footerText: string | null;
        chatLinks: Array<{
            label: string;
            url: string;
        }> | null;
        onboardingWizard: {
            label: string;
            pages: Array<{
                image?: string | null;
                content: string;
            }>;
        } | null;
        chatPlaceholders: Array<string> | null;
        animateChatPlaceholders: boolean;
        iconLogo: string | null;
        iconLogoDark: string | null;
        chatErrorSupportMessage: string | null;
        slimChatErrorUi: boolean;
        showTwoFactor: boolean;
        oauthAccessTokenLifetimeSeconds: number;
        connectionDefaultMcpGatewayId: string | null;
        connectionDefaultLlmProxyId: string | null;
        connectionDefaultClientId: string | null;
        connectionShownClientIds: Array<string> | null;
        connectionShownProviders: Array<string> | null;
        connectionBaseUrls: Array<{
            url: string;
            description: string;
            isDefault: boolean;
            visible: boolean;
        }> | null;
        presetEntityName: string | null;
        presetEntityNamePlural: string | null;
        presetEntityDefaultLabel: string | null;
        skillToolsEnabled: boolean;
        presetEntityDefaultValidationRegex: string | null;
    };
};

export type UpdateKnowledgeSettingsResponse = UpdateKnowledgeSettingsResponses[keyof UpdateKnowledgeSettingsResponses];

export type DropEmbeddingConfigData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/organization/knowledge-settings/drop-embedding';
};

export type DropEmbeddingConfigErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DropEmbeddingConfigError = DropEmbeddingConfigErrors[keyof DropEmbeddingConfigErrors];

export type DropEmbeddingConfigResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        slug: string;
        logo: string | null;
        logoDark: string | null;
        createdAt: string;
        metadata: string | null;
        onboardingComplete: boolean;
        theme: 'modern-minimal' | 'clean-slate' | 'mono' | 'twitter' | 'tangerine' | 'bubblegum' | 'caffeine' | 'amber-minimal' | 'cosmic-night' | 'doom-64' | 'mocha-mousse' | 'nature' | 'sunset-horizon' | 'neo-brutalism' | 'vercel' | 'claude' | 'vintage-paper' | 'boxy-minimalistic' | 'catppuccin' | 'solarized-dark' | 'gruvbox-dark' | 'dracula-dark' | 'monokai-dark' | 'moonlight-dark';
        customFont: 'lato' | 'inter' | 'open-sans' | 'roboto' | 'source-sans-pro' | 'jetbrains-mono';
        convertToolResultsToToon: boolean;
        compressionScope: 'organization' | 'team';
        globalToolPolicy: 'permissive' | 'restrictive';
        allowChatFileUploads: boolean;
        embeddingModel: string | null;
        embeddingDimensions: EmbeddingDimensions | null;
        embeddingChatApiKeyId: string | null;
        rerankerChatApiKeyId: string | null;
        rerankerModel: string | null;
        defaultLlmModel: string | null;
        defaultLlmProvider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        defaultModelId: string | null;
        defaultLlmApiKeyId: string | null;
        defaultUserLimitValue: number | null;
        defaultUserLimitModel: Array<string> | null;
        defaultUserLimitCleanupInterval: '1h' | '12h' | '24h' | '1w' | '1m';
        defaultAgentId: string | null;
        favicon: string | null;
        appName: string | null;
        ogDescription: string | null;
        footerText: string | null;
        chatLinks: Array<{
            label: string;
            url: string;
        }> | null;
        onboardingWizard: {
            label: string;
            pages: Array<{
                image?: string | null;
                content: string;
            }>;
        } | null;
        chatPlaceholders: Array<string> | null;
        animateChatPlaceholders: boolean;
        iconLogo: string | null;
        iconLogoDark: string | null;
        chatErrorSupportMessage: string | null;
        slimChatErrorUi: boolean;
        showTwoFactor: boolean;
        oauthAccessTokenLifetimeSeconds: number;
        connectionDefaultMcpGatewayId: string | null;
        connectionDefaultLlmProxyId: string | null;
        connectionDefaultClientId: string | null;
        connectionShownClientIds: Array<string> | null;
        connectionShownProviders: Array<string> | null;
        connectionBaseUrls: Array<{
            url: string;
            description: string;
            isDefault: boolean;
            visible: boolean;
        }> | null;
        presetEntityName: string | null;
        presetEntityNamePlural: string | null;
        presetEntityDefaultLabel: string | null;
        skillToolsEnabled: boolean;
        presetEntityDefaultValidationRegex: string | null;
    };
};

export type DropEmbeddingConfigResponse = DropEmbeddingConfigResponses[keyof DropEmbeddingConfigResponses];

export type TestEmbeddingConnectionData = {
    body: {
        embeddingChatApiKeyId: string;
        embeddingModel: string;
    };
    path?: never;
    query?: never;
    url: '/api/organization/knowledge-settings/test-embedding';
};

export type TestEmbeddingConnectionErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type TestEmbeddingConnectionError = TestEmbeddingConnectionErrors[keyof TestEmbeddingConnectionErrors];

export type TestEmbeddingConnectionResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
        error?: string;
    };
};

export type TestEmbeddingConnectionResponse = TestEmbeddingConnectionResponses[keyof TestEmbeddingConnectionResponses];

export type CompleteOnboardingData = {
    body: {
        onboardingComplete: true;
    };
    path?: never;
    query?: never;
    url: '/api/organization/complete-onboarding';
};

export type CompleteOnboardingErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CompleteOnboardingError = CompleteOnboardingErrors[keyof CompleteOnboardingErrors];

export type CompleteOnboardingResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        slug: string;
        logo: string | null;
        logoDark: string | null;
        createdAt: string;
        metadata: string | null;
        onboardingComplete: boolean;
        theme: 'modern-minimal' | 'clean-slate' | 'mono' | 'twitter' | 'tangerine' | 'bubblegum' | 'caffeine' | 'amber-minimal' | 'cosmic-night' | 'doom-64' | 'mocha-mousse' | 'nature' | 'sunset-horizon' | 'neo-brutalism' | 'vercel' | 'claude' | 'vintage-paper' | 'boxy-minimalistic' | 'catppuccin' | 'solarized-dark' | 'gruvbox-dark' | 'dracula-dark' | 'monokai-dark' | 'moonlight-dark';
        customFont: 'lato' | 'inter' | 'open-sans' | 'roboto' | 'source-sans-pro' | 'jetbrains-mono';
        convertToolResultsToToon: boolean;
        compressionScope: 'organization' | 'team';
        globalToolPolicy: 'permissive' | 'restrictive';
        allowChatFileUploads: boolean;
        embeddingModel: string | null;
        embeddingDimensions: EmbeddingDimensions | null;
        embeddingChatApiKeyId: string | null;
        rerankerChatApiKeyId: string | null;
        rerankerModel: string | null;
        defaultLlmModel: string | null;
        defaultLlmProvider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        defaultModelId: string | null;
        defaultLlmApiKeyId: string | null;
        defaultUserLimitValue: number | null;
        defaultUserLimitModel: Array<string> | null;
        defaultUserLimitCleanupInterval: '1h' | '12h' | '24h' | '1w' | '1m';
        defaultAgentId: string | null;
        favicon: string | null;
        appName: string | null;
        ogDescription: string | null;
        footerText: string | null;
        chatLinks: Array<{
            label: string;
            url: string;
        }> | null;
        onboardingWizard: {
            label: string;
            pages: Array<{
                image?: string | null;
                content: string;
            }>;
        } | null;
        chatPlaceholders: Array<string> | null;
        animateChatPlaceholders: boolean;
        iconLogo: string | null;
        iconLogoDark: string | null;
        chatErrorSupportMessage: string | null;
        slimChatErrorUi: boolean;
        showTwoFactor: boolean;
        oauthAccessTokenLifetimeSeconds: number;
        connectionDefaultMcpGatewayId: string | null;
        connectionDefaultLlmProxyId: string | null;
        connectionDefaultClientId: string | null;
        connectionShownClientIds: Array<string> | null;
        connectionShownProviders: Array<string> | null;
        connectionBaseUrls: Array<{
            url: string;
            description: string;
            isDefault: boolean;
            visible: boolean;
        }> | null;
        presetEntityName: string | null;
        presetEntityNamePlural: string | null;
        presetEntityDefaultLabel: string | null;
        skillToolsEnabled: boolean;
        presetEntityDefaultValidationRegex: string | null;
    };
};

export type CompleteOnboardingResponse = CompleteOnboardingResponses[keyof CompleteOnboardingResponses];

export type GetOnboardingStatusData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/organization/onboarding-status';
};

export type GetOnboardingStatusErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetOnboardingStatusError = GetOnboardingStatusErrors[keyof GetOnboardingStatusErrors];

export type GetOnboardingStatusResponses = {
    /**
     * Default Response
     */
    200: {
        hasLlmProxyLogs: boolean;
        hasMcpGatewayLogs: boolean;
    };
};

export type GetOnboardingStatusResponse = GetOnboardingStatusResponses[keyof GetOnboardingStatusResponses];

export type GetMemberSignupStatusData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/organization/members/signup-status';
};

export type GetMemberSignupStatusErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetMemberSignupStatusError = GetMemberSignupStatusErrors[keyof GetMemberSignupStatusErrors];

export type GetMemberSignupStatusResponses = {
    /**
     * Default Response
     */
    200: {
        pendingSignupMembers: Array<{
            userId: string;
            name: string | null;
            email: string;
            image: string | null;
            role: string;
            provider: string | null;
            invitationId: string | null;
        }>;
    };
};

export type GetMemberSignupStatusResponse = GetMemberSignupStatusResponses[keyof GetMemberSignupStatusResponses];

export type DeletePendingSignupMemberData = {
    body?: never;
    path: {
        userId: string;
    };
    query?: never;
    url: '/api/organization/members/{userId}/pending-signup';
};

export type DeletePendingSignupMemberErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeletePendingSignupMemberError = DeletePendingSignupMemberErrors[keyof DeletePendingSignupMemberErrors];

export type DeletePendingSignupMemberResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type DeletePendingSignupMemberResponse = DeletePendingSignupMemberResponses[keyof DeletePendingSignupMemberResponses];

export type GetOrganizationMembersData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/organization/members';
};

export type GetOrganizationMembersErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetOrganizationMembersError = GetOrganizationMembersErrors[keyof GetOrganizationMembersErrors];

export type GetOrganizationMembersResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        name: string;
        email: string;
    }>;
};

export type GetOrganizationMembersResponse = GetOrganizationMembersResponses[keyof GetOrganizationMembersResponses];

export type GetOrganizationMemberData = {
    body?: never;
    path: {
        /**
         * User ID or email address
         */
        idOrEmail: string;
    };
    query?: never;
    url: '/api/organization/members/{idOrEmail}';
};

export type GetOrganizationMemberErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetOrganizationMemberError = GetOrganizationMemberErrors[keyof GetOrganizationMemberErrors];

export type GetOrganizationMemberResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        email: string;
        role: string;
    };
};

export type GetOrganizationMemberResponse = GetOrganizationMemberResponses[keyof GetOrganizationMemberResponses];

export type PerplexityChatCompletionsWithDefaultAgentData = {
    body: XaiChatCompletionRequestInput;
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path?: never;
    query?: never;
    url: '/v1/perplexity/chat/completions';
};

export type PerplexityChatCompletionsWithDefaultAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type PerplexityChatCompletionsWithDefaultAgentError = PerplexityChatCompletionsWithDefaultAgentErrors[keyof PerplexityChatCompletionsWithDefaultAgentErrors];

export type PerplexityChatCompletionsWithDefaultAgentResponses = {
    /**
     * Default Response
     */
    200: PerplexityChatCompletionResponse;
};

export type PerplexityChatCompletionsWithDefaultAgentResponse = PerplexityChatCompletionsWithDefaultAgentResponses[keyof PerplexityChatCompletionsWithDefaultAgentResponses];

export type PerplexityChatCompletionsWithAgentData = {
    body: XaiChatCompletionRequestInput;
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/perplexity/{agentId}/chat/completions';
};

export type PerplexityChatCompletionsWithAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type PerplexityChatCompletionsWithAgentError = PerplexityChatCompletionsWithAgentErrors[keyof PerplexityChatCompletionsWithAgentErrors];

export type PerplexityChatCompletionsWithAgentResponses = {
    /**
     * Default Response
     */
    200: PerplexityChatCompletionResponse;
};

export type PerplexityChatCompletionsWithAgentResponse = PerplexityChatCompletionsWithAgentResponses[keyof PerplexityChatCompletionsWithAgentResponses];

export type GetScheduleTriggersData = {
    body?: never;
    path?: never;
    query?: {
        limit?: number;
        offset?: number;
        enabled?: boolean;
        name?: string;
        actorUserIds?: string;
        agentIds?: string;
        showAll?: boolean;
    };
    url: '/api/schedule-triggers';
};

export type GetScheduleTriggersErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetScheduleTriggersError = GetScheduleTriggersErrors[keyof GetScheduleTriggersErrors];

export type GetScheduleTriggersResponses = {
    /**
     * Default Response
     */
    200: {
        data: Array<{
            id: string;
            organizationId: string;
            name: string;
            agentId: string;
            messageTemplate: string;
            cronExpression: string;
            timezone: string;
            enabled: boolean;
            actorUserId: string;
            lastExecutedAt: string | null;
            createdAt: string;
            actor?: {
                id: string;
                name: string | null;
                email: string | null;
            } | null;
            agent?: {
                id: string;
                name: string | null;
                agentType: string | null;
            } | null;
        }>;
        pagination: {
            currentPage: number;
            limit: number;
            total: number;
            totalPages: number;
            hasNext: boolean;
            hasPrev: boolean;
        };
    };
};

export type GetScheduleTriggersResponse = GetScheduleTriggersResponses[keyof GetScheduleTriggersResponses];

export type CreateScheduleTriggerData = {
    body: {
        name: string;
        agentId: string;
        enabled?: boolean;
        cronExpression: string;
        timezone: string;
        messageTemplate: string;
    };
    path?: never;
    query?: never;
    url: '/api/schedule-triggers';
};

export type CreateScheduleTriggerErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CreateScheduleTriggerError = CreateScheduleTriggerErrors[keyof CreateScheduleTriggerErrors];

export type CreateScheduleTriggerResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        name: string;
        agentId: string;
        messageTemplate: string;
        cronExpression: string;
        timezone: string;
        enabled: boolean;
        actorUserId: string;
        lastExecutedAt: string | null;
        createdAt: string;
        actor?: {
            id: string;
            name: string | null;
            email: string | null;
        } | null;
        agent?: {
            id: string;
            name: string | null;
            agentType: string | null;
        } | null;
    };
};

export type CreateScheduleTriggerResponse = CreateScheduleTriggerResponses[keyof CreateScheduleTriggerResponses];

export type DeleteScheduleTriggerData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/schedule-triggers/{id}';
};

export type DeleteScheduleTriggerErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeleteScheduleTriggerError = DeleteScheduleTriggerErrors[keyof DeleteScheduleTriggerErrors];

export type DeleteScheduleTriggerResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type DeleteScheduleTriggerResponse = DeleteScheduleTriggerResponses[keyof DeleteScheduleTriggerResponses];

export type GetScheduleTriggerData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/schedule-triggers/{id}';
};

export type GetScheduleTriggerErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetScheduleTriggerError = GetScheduleTriggerErrors[keyof GetScheduleTriggerErrors];

export type GetScheduleTriggerResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        name: string;
        agentId: string;
        messageTemplate: string;
        cronExpression: string;
        timezone: string;
        enabled: boolean;
        actorUserId: string;
        lastExecutedAt: string | null;
        createdAt: string;
        actor?: {
            id: string;
            name: string | null;
            email: string | null;
        } | null;
        agent?: {
            id: string;
            name: string | null;
            agentType: string | null;
        } | null;
    };
};

export type GetScheduleTriggerResponse = GetScheduleTriggerResponses[keyof GetScheduleTriggerResponses];

export type UpdateScheduleTriggerData = {
    body: {
        name?: string;
        agentId?: string;
        enabled?: boolean;
        cronExpression?: string;
        timezone?: string;
        messageTemplate?: string;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/schedule-triggers/{id}';
};

export type UpdateScheduleTriggerErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateScheduleTriggerError = UpdateScheduleTriggerErrors[keyof UpdateScheduleTriggerErrors];

export type UpdateScheduleTriggerResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        name: string;
        agentId: string;
        messageTemplate: string;
        cronExpression: string;
        timezone: string;
        enabled: boolean;
        actorUserId: string;
        lastExecutedAt: string | null;
        createdAt: string;
        actor?: {
            id: string;
            name: string | null;
            email: string | null;
        } | null;
        agent?: {
            id: string;
            name: string | null;
            agentType: string | null;
        } | null;
    };
};

export type UpdateScheduleTriggerResponse = UpdateScheduleTriggerResponses[keyof UpdateScheduleTriggerResponses];

export type EnableScheduleTriggerData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/schedule-triggers/{id}/enable';
};

export type EnableScheduleTriggerErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type EnableScheduleTriggerError = EnableScheduleTriggerErrors[keyof EnableScheduleTriggerErrors];

export type EnableScheduleTriggerResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        name: string;
        agentId: string;
        messageTemplate: string;
        cronExpression: string;
        timezone: string;
        enabled: boolean;
        actorUserId: string;
        lastExecutedAt: string | null;
        createdAt: string;
        actor?: {
            id: string;
            name: string | null;
            email: string | null;
        } | null;
        agent?: {
            id: string;
            name: string | null;
            agentType: string | null;
        } | null;
    };
};

export type EnableScheduleTriggerResponse = EnableScheduleTriggerResponses[keyof EnableScheduleTriggerResponses];

export type DisableScheduleTriggerData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/schedule-triggers/{id}/disable';
};

export type DisableScheduleTriggerErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DisableScheduleTriggerError = DisableScheduleTriggerErrors[keyof DisableScheduleTriggerErrors];

export type DisableScheduleTriggerResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        name: string;
        agentId: string;
        messageTemplate: string;
        cronExpression: string;
        timezone: string;
        enabled: boolean;
        actorUserId: string;
        lastExecutedAt: string | null;
        createdAt: string;
        actor?: {
            id: string;
            name: string | null;
            email: string | null;
        } | null;
        agent?: {
            id: string;
            name: string | null;
            agentType: string | null;
        } | null;
    };
};

export type DisableScheduleTriggerResponse = DisableScheduleTriggerResponses[keyof DisableScheduleTriggerResponses];

export type RunScheduleTriggerNowData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/schedule-triggers/{id}/run-now';
};

export type RunScheduleTriggerNowErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type RunScheduleTriggerNowError = RunScheduleTriggerNowErrors[keyof RunScheduleTriggerNowErrors];

export type RunScheduleTriggerNowResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        triggerId: string;
        runKind: 'due' | 'manual';
        status: 'running' | 'success' | 'failed';
        initiatedByUserId: string | null;
        chatConversationId: string | null;
        startedAt: string | null;
        completedAt: string | null;
        error: string | null;
        artifact: string | null;
        createdAt: string;
    };
};

export type RunScheduleTriggerNowResponse = RunScheduleTriggerNowResponses[keyof RunScheduleTriggerNowResponses];

export type GetScheduleTriggerRunsData = {
    body?: never;
    path: {
        id: string;
    };
    query?: {
        limit?: number;
        offset?: number;
        status?: 'running' | 'success' | 'failed';
    };
    url: '/api/schedule-triggers/{id}/runs';
};

export type GetScheduleTriggerRunsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetScheduleTriggerRunsError = GetScheduleTriggerRunsErrors[keyof GetScheduleTriggerRunsErrors];

export type GetScheduleTriggerRunsResponses = {
    /**
     * Default Response
     */
    200: {
        data: Array<{
            id: string;
            organizationId: string;
            triggerId: string;
            runKind: 'due' | 'manual';
            status: 'running' | 'success' | 'failed';
            initiatedByUserId: string | null;
            chatConversationId: string | null;
            startedAt: string | null;
            completedAt: string | null;
            error: string | null;
            artifact: string | null;
            createdAt: string;
        }>;
        pagination: {
            currentPage: number;
            limit: number;
            total: number;
            totalPages: number;
            hasNext: boolean;
            hasPrev: boolean;
        };
    };
};

export type GetScheduleTriggerRunsResponse = GetScheduleTriggerRunsResponses[keyof GetScheduleTriggerRunsResponses];

export type GetScheduleTriggerRunData = {
    body?: never;
    path: {
        id: string;
        runId: string;
    };
    query?: never;
    url: '/api/schedule-triggers/{id}/runs/{runId}';
};

export type GetScheduleTriggerRunErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetScheduleTriggerRunError = GetScheduleTriggerRunErrors[keyof GetScheduleTriggerRunErrors];

export type GetScheduleTriggerRunResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        triggerId: string;
        runKind: 'due' | 'manual';
        status: 'running' | 'success' | 'failed';
        initiatedByUserId: string | null;
        chatConversationId: string | null;
        startedAt: string | null;
        completedAt: string | null;
        error: string | null;
        artifact: string | null;
        createdAt: string;
    };
};

export type GetScheduleTriggerRunResponse = GetScheduleTriggerRunResponses[keyof GetScheduleTriggerRunResponses];

export type CreateScheduleTriggerRunConversationData = {
    body?: never;
    path: {
        id: string;
        runId: string;
    };
    query?: never;
    url: '/api/schedule-triggers/{id}/runs/{runId}/conversation';
};

export type CreateScheduleTriggerRunConversationErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CreateScheduleTriggerRunConversationError = CreateScheduleTriggerRunConversationErrors[keyof CreateScheduleTriggerRunConversationErrors];

export type CreateScheduleTriggerRunConversationResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        userId: string;
        organizationId: string;
        agentId: string | null;
        chatApiKeyId: string | null;
        title: string | null;
        selectedModel: string;
        selectedProvider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
        modelId: string | null;
        hasCustomToolSelection: boolean;
        todoList: string | number | boolean | null | {
            [key: string]: unknown;
        } | Array<unknown> | null;
        artifact: string | null;
        pinnedAt: string | null;
        createdAt: string;
        updatedAt: string;
        agent: {
            id: string;
            name: string;
            systemPrompt: string | null;
            agentType: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
            llmApiKeyId: string | null;
        } | null;
        share: {
            id: string;
            visibility: 'organization' | 'team' | 'user';
        } | null;
        messages: Array<unknown>;
        chatErrors: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'content_filtered' | 'server_error' | 'network_error' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                    status?: number;
                    message?: string;
                    type?: string;
                    raw?: unknown;
                };
            };
            createdAt: string;
        }>;
        compactions: Array<{
            id: string;
            conversationId: string;
            summary: string;
            compactedThroughMessageId: string | null;
            trigger: 'auto' | 'manual';
            provider: string;
            model: string;
            originalTokenEstimate: number;
            compactedTokenEstimate: number;
            createdAt: string;
        }>;
    };
};

export type CreateScheduleTriggerRunConversationResponse = CreateScheduleTriggerRunConversationResponses[keyof CreateScheduleTriggerRunConversationResponses];

export type GetSecretsTypeData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/secrets/type';
};

export type GetSecretsTypeErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetSecretsTypeError = GetSecretsTypeErrors[keyof GetSecretsTypeErrors];

export type GetSecretsTypeResponses = {
    /**
     * Default Response
     */
    200: {
        type: 'DB' | 'Vault' | 'BYOS_VAULT';
        meta: {
            [key: string]: string;
        };
    };
};

export type GetSecretsTypeResponse = GetSecretsTypeResponses[keyof GetSecretsTypeResponses];

export type GetSecretData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/secrets/{id}';
};

export type GetSecretErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetSecretError = GetSecretErrors[keyof GetSecretErrors];

export type GetSecretResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        secret: {
            [key: string]: unknown;
        };
        isVault: boolean;
        isByosVault: boolean;
        createdAt: string;
        updatedAt: string;
    };
};

export type GetSecretResponse = GetSecretResponses[keyof GetSecretResponses];

export type CheckSecretsConnectivityData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/secrets/check-connectivity';
};

export type CheckSecretsConnectivityErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CheckSecretsConnectivityError = CheckSecretsConnectivityErrors[keyof CheckSecretsConnectivityErrors];

export type CheckSecretsConnectivityResponses = {
    /**
     * Default Response
     */
    200: {
        secretCount: number;
    };
};

export type CheckSecretsConnectivityResponse = CheckSecretsConnectivityResponses[keyof CheckSecretsConnectivityResponses];

export type GetSkillsData = {
    body?: never;
    path?: never;
    query?: {
        limit?: number;
        offset?: number;
        search?: string;
        sourceRepo?: string;
    };
    url: '/api/skills';
};

export type GetSkillsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetSkillsError = GetSkillsErrors[keyof GetSkillsErrors];

export type GetSkillsResponses = {
    /**
     * Default Response
     */
    200: {
        data: Array<{
            id: string;
            organizationId: string;
            authorId: string | null;
            name: string;
            description: string;
            content: string;
            license: string | null;
            compatibility: string | null;
            metadata: {
                [key: string]: string;
            };
            sourceType: 'manual' | 'github';
            sourceRef: string | null;
            sourceCommit: string | null;
            createdAt: string;
            updatedAt: string;
            fileCount: number;
        }>;
        pagination: {
            currentPage: number;
            limit: number;
            total: number;
            totalPages: number;
            hasNext: boolean;
            hasPrev: boolean;
        };
    };
};

export type GetSkillsResponse = GetSkillsResponses[keyof GetSkillsResponses];

export type CreateSkillData = {
    body: {
        content: string;
        files?: Array<{
            path: string;
            content: string;
            encoding?: 'utf8' | 'base64';
        }>;
    };
    path?: never;
    query?: never;
    url: '/api/skills';
};

export type CreateSkillErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CreateSkillError = CreateSkillErrors[keyof CreateSkillErrors];

export type CreateSkillResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        authorId: string | null;
        name: string;
        description: string;
        content: string;
        license: string | null;
        compatibility: string | null;
        metadata: {
            [key: string]: string;
        };
        sourceType: 'manual' | 'github';
        sourceRef: string | null;
        sourceCommit: string | null;
        createdAt: string;
        updatedAt: string;
        files: Array<{
            id: string;
            skillId: string;
            path: string;
            content: string;
            encoding: 'utf8' | 'base64';
            kind: 'reference' | 'script' | 'asset';
            createdAt: string;
        }>;
    };
};

export type CreateSkillResponse = CreateSkillResponses[keyof CreateSkillResponses];

export type DeleteSkillData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/skills/{id}';
};

export type DeleteSkillErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeleteSkillError = DeleteSkillErrors[keyof DeleteSkillErrors];

export type DeleteSkillResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type DeleteSkillResponse = DeleteSkillResponses[keyof DeleteSkillResponses];

export type GetSkillData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/skills/{id}';
};

export type GetSkillErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetSkillError = GetSkillErrors[keyof GetSkillErrors];

export type GetSkillResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        authorId: string | null;
        name: string;
        description: string;
        content: string;
        license: string | null;
        compatibility: string | null;
        metadata: {
            [key: string]: string;
        };
        sourceType: 'manual' | 'github';
        sourceRef: string | null;
        sourceCommit: string | null;
        createdAt: string;
        updatedAt: string;
        files: Array<{
            id: string;
            skillId: string;
            path: string;
            content: string;
            encoding: 'utf8' | 'base64';
            kind: 'reference' | 'script' | 'asset';
            createdAt: string;
        }>;
    };
};

export type GetSkillResponse = GetSkillResponses[keyof GetSkillResponses];

export type UpdateSkillData = {
    body: {
        content: string;
        files?: Array<{
            path: string;
            content: string;
            encoding?: 'utf8' | 'base64';
        }>;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/skills/{id}';
};

export type UpdateSkillErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateSkillError = UpdateSkillErrors[keyof UpdateSkillErrors];

export type UpdateSkillResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        authorId: string | null;
        name: string;
        description: string;
        content: string;
        license: string | null;
        compatibility: string | null;
        metadata: {
            [key: string]: string;
        };
        sourceType: 'manual' | 'github';
        sourceRef: string | null;
        sourceCommit: string | null;
        createdAt: string;
        updatedAt: string;
        files: Array<{
            id: string;
            skillId: string;
            path: string;
            content: string;
            encoding: 'utf8' | 'base64';
            kind: 'reference' | 'script' | 'asset';
            createdAt: string;
        }>;
    };
};

export type UpdateSkillResponse = UpdateSkillResponses[keyof UpdateSkillResponses];

export type GetSkillSourceReposData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/skills/source-repos';
};

export type GetSkillSourceReposErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetSkillSourceReposError = GetSkillSourceReposErrors[keyof GetSkillSourceReposErrors];

export type GetSkillSourceReposResponses = {
    /**
     * Default Response
     */
    200: {
        repos: Array<string>;
    };
};

export type GetSkillSourceReposResponse = GetSkillSourceReposResponses[keyof GetSkillSourceReposResponses];

export type EnableSkillToolDefaultsData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/skills/enable-defaults';
};

export type EnableSkillToolDefaultsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type EnableSkillToolDefaultsError = EnableSkillToolDefaultsErrors[keyof EnableSkillToolDefaultsErrors];

export type EnableSkillToolDefaultsResponses = {
    /**
     * Default Response
     */
    200: {
        enabled: true;
        agentsBackfilled: number;
    };
};

export type EnableSkillToolDefaultsResponse = EnableSkillToolDefaultsResponses[keyof EnableSkillToolDefaultsResponses];

export type DiscoverGithubSkillsData = {
    body: {
        repoUrl: string;
        path?: string;
        githubToken?: string;
    };
    path?: never;
    query?: never;
    url: '/api/skills/github/discover';
};

export type DiscoverGithubSkillsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DiscoverGithubSkillsError = DiscoverGithubSkillsErrors[keyof DiscoverGithubSkillsErrors];

export type DiscoverGithubSkillsResponses = {
    /**
     * Default Response
     */
    200: {
        repoUrl: string;
        ref: string;
        skills: Array<{
            skillPath: string;
            name: string;
            description: string;
            compatibility: string | null;
            fileCount: number;
            exists: boolean;
        }>;
    };
};

export type DiscoverGithubSkillsResponse = DiscoverGithubSkillsResponses[keyof DiscoverGithubSkillsResponses];

export type PreviewGithubSkillData = {
    body: {
        repoUrl: string;
        path?: string;
        githubToken?: string;
        skillPath: string;
    };
    path?: never;
    query?: never;
    url: '/api/skills/github/preview';
};

export type PreviewGithubSkillErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type PreviewGithubSkillError = PreviewGithubSkillErrors[keyof PreviewGithubSkillErrors];

export type PreviewGithubSkillResponses = {
    /**
     * Default Response
     */
    200: {
        name: string;
        description: string;
        content: string;
        license: string | null;
        compatibility: string | null;
        metadata: {
            [key: string]: string;
        };
        files: Array<{
            path: string;
            content: string;
            encoding: 'utf8' | 'base64';
            kind: 'reference' | 'script' | 'asset';
        }>;
        sourceRef: string;
        sourceCommit: string;
    };
};

export type PreviewGithubSkillResponse = PreviewGithubSkillResponses[keyof PreviewGithubSkillResponses];

export type ImportGithubSkillsData = {
    body: {
        repoUrl: string;
        path?: string;
        githubToken?: string;
        skillPaths: Array<string>;
    };
    path?: never;
    query?: never;
    url: '/api/skills/github/import';
};

export type ImportGithubSkillsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type ImportGithubSkillsError = ImportGithubSkillsErrors[keyof ImportGithubSkillsErrors];

export type ImportGithubSkillsResponses = {
    /**
     * Default Response
     */
    200: {
        created: Array<{
            id: string;
            organizationId: string;
            authorId: string | null;
            name: string;
            description: string;
            content: string;
            license: string | null;
            compatibility: string | null;
            metadata: {
                [key: string]: string;
            };
            sourceType: 'manual' | 'github';
            sourceRef: string | null;
            sourceCommit: string | null;
            createdAt: string;
            updatedAt: string;
        }>;
        skipped: Array<string>;
    };
};

export type ImportGithubSkillsResponse = ImportGithubSkillsResponses[keyof ImportGithubSkillsResponses];

export type GetTeamStatisticsData = {
    body?: never;
    path?: never;
    query?: {
        timeframe?: '5m' | '15m' | '30m' | '1h' | '24h' | '7d' | '30d' | '90d' | '12m' | 'all' | string;
    };
    url: '/api/statistics/teams';
};

export type GetTeamStatisticsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetTeamStatisticsError = GetTeamStatisticsErrors[keyof GetTeamStatisticsErrors];

export type GetTeamStatisticsResponses = {
    /**
     * Default Response
     */
    200: Array<{
        teamId: string;
        teamName: string;
        members: number;
        agents: number;
        requests: number;
        inputTokens: number;
        outputTokens: number;
        cost: number;
        timeSeries: Array<{
            timestamp: string;
            value: number;
        }>;
    }>;
};

export type GetTeamStatisticsResponse = GetTeamStatisticsResponses[keyof GetTeamStatisticsResponses];

export type GetAgentStatisticsData = {
    body?: never;
    path?: never;
    query?: {
        timeframe?: '5m' | '15m' | '30m' | '1h' | '24h' | '7d' | '30d' | '90d' | '12m' | 'all' | string;
    };
    url: '/api/statistics/agents';
};

export type GetAgentStatisticsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetAgentStatisticsError = GetAgentStatisticsErrors[keyof GetAgentStatisticsErrors];

export type GetAgentStatisticsResponses = {
    /**
     * Default Response
     */
    200: Array<{
        agentId: string;
        agentName: string;
        agentType: string;
        teamName: string;
        requests: number;
        inputTokens: number;
        outputTokens: number;
        cost: number;
        timeSeries: Array<{
            timestamp: string;
            value: number;
        }>;
    }>;
};

export type GetAgentStatisticsResponse = GetAgentStatisticsResponses[keyof GetAgentStatisticsResponses];

export type GetModelStatisticsData = {
    body?: never;
    path?: never;
    query?: {
        timeframe?: '5m' | '15m' | '30m' | '1h' | '24h' | '7d' | '30d' | '90d' | '12m' | 'all' | string;
    };
    url: '/api/statistics/models';
};

export type GetModelStatisticsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetModelStatisticsError = GetModelStatisticsErrors[keyof GetModelStatisticsErrors];

export type GetModelStatisticsResponses = {
    /**
     * Default Response
     */
    200: Array<{
        model: string;
        requests: number;
        inputTokens: number;
        outputTokens: number;
        cost: number;
        percentage: number;
        timeSeries: Array<{
            timestamp: string;
            value: number;
        }>;
    }>;
};

export type GetModelStatisticsResponse = GetModelStatisticsResponses[keyof GetModelStatisticsResponses];

export type GetOverviewStatisticsData = {
    body?: never;
    path?: never;
    query?: {
        timeframe?: '5m' | '15m' | '30m' | '1h' | '24h' | '7d' | '30d' | '90d' | '12m' | 'all' | string;
    };
    url: '/api/statistics/overview';
};

export type GetOverviewStatisticsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetOverviewStatisticsError = GetOverviewStatisticsErrors[keyof GetOverviewStatisticsErrors];

export type GetOverviewStatisticsResponses = {
    /**
     * Default Response
     */
    200: {
        totalRequests: number;
        totalTokens: number;
        totalCost: number;
        topTeam: string;
        topAgent: string;
        topModel: string;
    };
};

export type GetOverviewStatisticsResponse = GetOverviewStatisticsResponses[keyof GetOverviewStatisticsResponses];

export type GetCostSavingsStatisticsData = {
    body?: never;
    path?: never;
    query?: {
        timeframe?: '5m' | '15m' | '30m' | '1h' | '24h' | '7d' | '30d' | '90d' | '12m' | 'all' | string;
    };
    url: '/api/statistics/cost-savings';
};

export type GetCostSavingsStatisticsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetCostSavingsStatisticsError = GetCostSavingsStatisticsErrors[keyof GetCostSavingsStatisticsErrors];

export type GetCostSavingsStatisticsResponses = {
    /**
     * Default Response
     */
    200: {
        totalBaselineCost: number;
        totalActualCost: number;
        totalSavings: number;
        totalOptimizationSavings: number;
        totalToonSavings: number;
        timeSeries: Array<{
            timestamp: string;
            baselineCost: number;
            actualCost: number;
            optimizationSavings: number;
            toonSavings: number;
        }>;
    };
};

export type GetCostSavingsStatisticsResponse = GetCostSavingsStatisticsResponses[keyof GetCostSavingsStatisticsResponses];

export type GetTeamsData = {
    body?: never;
    path?: never;
    query?: {
        limit?: number;
        offset?: number;
        name?: string;
    };
    url: '/api/teams';
};

export type GetTeamsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetTeamsError = GetTeamsErrors[keyof GetTeamsErrors];

export type GetTeamsResponses = {
    /**
     * Default Response
     */
    200: {
        data: Array<{
            id: string;
            name: string;
            description: string | null;
            organizationId: string;
            createdBy: string;
            createdAt: string;
            updatedAt: string;
            convertToolResultsToToon: boolean;
            members?: Array<{
                id: string;
                teamId: string;
                userId: string;
                role: string;
                syncedFromSso: boolean;
                createdAt: string;
            }>;
        }>;
        pagination: {
            currentPage: number;
            limit: number;
            total: number;
            totalPages: number;
            hasNext: boolean;
            hasPrev: boolean;
        };
    };
};

export type GetTeamsResponse = GetTeamsResponses[keyof GetTeamsResponses];

export type CreateTeamData = {
    body: {
        name: string;
        description?: string;
    };
    path?: never;
    query?: never;
    url: '/api/teams';
};

export type CreateTeamErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CreateTeamError = CreateTeamErrors[keyof CreateTeamErrors];

export type CreateTeamResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        description: string | null;
        organizationId: string;
        createdBy: string;
        createdAt: string;
        updatedAt: string;
        convertToolResultsToToon: boolean;
        members?: Array<{
            id: string;
            teamId: string;
            userId: string;
            role: string;
            syncedFromSso: boolean;
            createdAt: string;
        }>;
    };
};

export type CreateTeamResponse = CreateTeamResponses[keyof CreateTeamResponses];

export type DeleteTeamData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/teams/{id}';
};

export type DeleteTeamErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeleteTeamError = DeleteTeamErrors[keyof DeleteTeamErrors];

export type DeleteTeamResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type DeleteTeamResponse = DeleteTeamResponses[keyof DeleteTeamResponses];

export type GetTeamData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/teams/{id}';
};

export type GetTeamErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetTeamError = GetTeamErrors[keyof GetTeamErrors];

export type GetTeamResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        description: string | null;
        organizationId: string;
        createdBy: string;
        createdAt: string;
        updatedAt: string;
        convertToolResultsToToon: boolean;
        members?: Array<{
            id: string;
            teamId: string;
            userId: string;
            role: string;
            syncedFromSso: boolean;
            createdAt: string;
        }>;
    };
};

export type GetTeamResponse = GetTeamResponses[keyof GetTeamResponses];

export type UpdateTeamData = {
    body: {
        name?: string;
        description?: string;
        convertToolResultsToToon?: boolean;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/teams/{id}';
};

export type UpdateTeamErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateTeamError = UpdateTeamErrors[keyof UpdateTeamErrors];

export type UpdateTeamResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        description: string | null;
        organizationId: string;
        createdBy: string;
        createdAt: string;
        updatedAt: string;
        convertToolResultsToToon: boolean;
        members?: Array<{
            id: string;
            teamId: string;
            userId: string;
            role: string;
            syncedFromSso: boolean;
            createdAt: string;
        }>;
    };
};

export type UpdateTeamResponse = UpdateTeamResponses[keyof UpdateTeamResponses];

export type GetTeamMembersData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/teams/{id}/members';
};

export type GetTeamMembersErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetTeamMembersError = GetTeamMembersErrors[keyof GetTeamMembersErrors];

export type GetTeamMembersResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        teamId: string;
        userId: string;
        role: string;
        syncedFromSso: boolean;
        createdAt: string;
        name: string | null;
        email: string;
        image: string | null;
    }>;
};

export type GetTeamMembersResponse = GetTeamMembersResponses[keyof GetTeamMembersResponses];

export type AddTeamMemberData = {
    body: {
        userId: string;
        role?: string;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/teams/{id}/members';
};

export type AddTeamMemberErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type AddTeamMemberError = AddTeamMemberErrors[keyof AddTeamMemberErrors];

export type AddTeamMemberResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        teamId: string;
        userId: string;
        role: string;
        syncedFromSso: boolean;
        createdAt: string;
    };
};

export type AddTeamMemberResponse = AddTeamMemberResponses[keyof AddTeamMemberResponses];

export type RemoveTeamMemberData = {
    body?: never;
    path: {
        id: string;
        userId: string;
    };
    query?: never;
    url: '/api/teams/{id}/members/{userId}';
};

export type RemoveTeamMemberErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type RemoveTeamMemberError = RemoveTeamMemberErrors[keyof RemoveTeamMemberErrors];

export type RemoveTeamMemberResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type RemoveTeamMemberResponse = RemoveTeamMemberResponses[keyof RemoveTeamMemberResponses];

export type GetTeamExternalGroupsData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/teams/{id}/external-groups';
};

export type GetTeamExternalGroupsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetTeamExternalGroupsError = GetTeamExternalGroupsErrors[keyof GetTeamExternalGroupsErrors];

export type GetTeamExternalGroupsResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        teamId: string;
        groupIdentifier: string;
        createdAt: string;
    }>;
};

export type GetTeamExternalGroupsResponse = GetTeamExternalGroupsResponses[keyof GetTeamExternalGroupsResponses];

export type AddTeamExternalGroupData = {
    body: {
        groupIdentifier: string;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/teams/{id}/external-groups';
};

export type AddTeamExternalGroupErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type AddTeamExternalGroupError = AddTeamExternalGroupErrors[keyof AddTeamExternalGroupErrors];

export type AddTeamExternalGroupResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        teamId: string;
        groupIdentifier: string;
        createdAt: string;
    };
};

export type AddTeamExternalGroupResponse = AddTeamExternalGroupResponses[keyof AddTeamExternalGroupResponses];

export type RemoveTeamExternalGroupData = {
    body?: never;
    path: {
        id: string;
        groupId: string;
    };
    query?: never;
    url: '/api/teams/{id}/external-groups/{groupId}';
};

export type RemoveTeamExternalGroupErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type RemoveTeamExternalGroupError = RemoveTeamExternalGroupErrors[keyof RemoveTeamExternalGroupErrors];

export type RemoveTeamExternalGroupResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type RemoveTeamExternalGroupResponse = RemoveTeamExternalGroupResponses[keyof RemoveTeamExternalGroupResponses];

export type GetTokensData = {
    body?: never;
    path?: never;
    query?: {
        /**
         * Filter team tokens to only show tokens for teams the profile is assigned to
         */
        profileId?: string;
    };
    url: '/api/tokens';
};

export type GetTokensErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetTokensError = GetTokensErrors[keyof GetTokensErrors];

export type GetTokensResponses = {
    /**
     * Default Response
     */
    200: {
        tokens: Array<{
            id: string;
            name: string;
            tokenStart: string;
            isOrganizationToken: boolean;
            team: {
                id: string;
                name: string;
            } | null;
            createdAt: string;
            lastUsedAt: string | null;
        }>;
        permissions: {
            canAccessOrgToken: boolean;
            canAccessTeamTokens: boolean;
        };
    };
};

export type GetTokensResponse = GetTokensResponses[keyof GetTokensResponses];

export type GetTokenValueData = {
    body?: never;
    path: {
        tokenId: string;
    };
    query?: never;
    url: '/api/tokens/{tokenId}/value';
};

export type GetTokenValueErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetTokenValueError = GetTokenValueErrors[keyof GetTokenValueErrors];

export type GetTokenValueResponses = {
    /**
     * Default Response
     */
    200: {
        value: string;
    };
};

export type GetTokenValueResponse = GetTokenValueResponses[keyof GetTokenValueResponses];

export type RotateTokenData = {
    body?: never;
    path: {
        tokenId: string;
    };
    query?: never;
    url: '/api/tokens/{tokenId}/rotate';
};

export type RotateTokenErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type RotateTokenError = RotateTokenErrors[keyof RotateTokenErrors];

export type RotateTokenResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        tokenStart: string;
        isOrganizationToken: boolean;
        team: {
            id: string;
            name: string;
        } | null;
        createdAt: string;
        lastUsedAt: string | null;
        value: string;
    };
};

export type RotateTokenResponse = RotateTokenResponses[keyof RotateTokenResponses];

export type GetToolsData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/tools';
};

export type GetToolsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetToolsError = GetToolsErrors[keyof GetToolsErrors];

export type GetToolsResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        catalogId: string | null;
        delegateToAgentId: string | null;
        name: string;
        /**
         *
         * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
         *
         * The parameters the functions accepts, described as a JSON Schema object. See the
         * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
         * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
         * documentation about the format.
         *
         * Omitting parameters defines a function with an empty parameter list.
         *
         */
        parameters?: {
            [key: string]: unknown;
        };
        description: string | null;
        meta: string | number | boolean | null | {
            [key: string]: unknown;
        } | Array<unknown> | null;
        policiesAutoConfiguredAt: string | null;
        policiesAutoConfiguringStartedAt: string | null;
        policiesAutoConfiguredReasoning: string | null;
        policiesAutoConfiguredModel: string | null;
        createdAt: string;
        updatedAt: string;
        agent: {
            id: string;
            name: string;
        } | null;
        catalog: {
            id: string;
            name: string;
        } | null;
    }>;
};

export type GetToolsResponse = GetToolsResponses[keyof GetToolsResponses];

export type GetToolsWithAssignmentsData = {
    body?: never;
    path?: never;
    query?: {
        sortBy?: 'name' | 'origin' | 'createdAt' | 'assignmentCount';
        sortDirection?: 'asc' | 'desc';
        search?: string;
        /**
         * Can be 'llm-proxy', 'agent', or a catalogId
         */
        origin?: string;
        /**
         * Hide built-in Archestra tools
         */
        excludeArchestraTools?: boolean;
        limit?: number;
        offset?: number;
    };
    url: '/api/tools/with-assignments';
};

export type GetToolsWithAssignmentsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetToolsWithAssignmentsError = GetToolsWithAssignmentsErrors[keyof GetToolsWithAssignmentsErrors];

export type GetToolsWithAssignmentsResponses = {
    /**
     * Default Response
     */
    200: {
        data: Array<{
            id: string;
            name: string;
            description: string | null;
            /**
             *
             * https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217
             *
             * The parameters the functions accepts, described as a JSON Schema object. See the
             * [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
             * and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
             * documentation about the format.
             *
             * Omitting parameters defines a function with an empty parameter list.
             *
             */
            parameters?: {
                [key: string]: unknown;
            };
            catalogId: string | null;
            createdAt: string;
            updatedAt: string;
            policiesAutoConfiguredAt: string | null;
            policiesAutoConfiguredReasoning: string | null;
            policiesAutoConfiguredModel: string | null;
            assignmentCount: number;
            assignments: Array<{
                agentToolId: string;
                agent: {
                    id: string;
                    name: string;
                };
                mcpServerId: string | null;
                credentialOwnerEmail: string | null;
                executionOwnerEmail: string | null;
                credentialResolutionMode: 'static' | 'dynamic' | 'enterprise_managed';
            }>;
        }>;
        pagination: {
            currentPage: number;
            limit: number;
            total: number;
            totalPages: number;
            hasNext: boolean;
            hasPrev: boolean;
        };
    };
};

export type GetToolsWithAssignmentsResponse = GetToolsWithAssignmentsResponses[keyof GetToolsWithAssignmentsResponses];

export type DeleteToolData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/tools/{id}';
};

export type DeleteToolErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeleteToolError = DeleteToolErrors[keyof DeleteToolErrors];

export type DeleteToolResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type DeleteToolResponse = DeleteToolResponses[keyof DeleteToolResponses];

export type GetUserPermissionsData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/user/permissions';
};

export type GetUserPermissionsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetUserPermissionsError = GetUserPermissionsErrors[keyof GetUserPermissionsErrors];

export type GetUserPermissionsResponses = {
    /**
     * Default Response
     */
    200: {
        [key: string]: Array<'create' | 'read' | 'update' | 'delete' | 'team-admin' | 'admin' | 'cancel' | 'enable' | 'query'>;
    };
};

export type GetUserPermissionsResponse = GetUserPermissionsResponses[keyof GetUserPermissionsResponses];

export type GetImpersonableUsersData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/user/impersonable';
};

export type GetImpersonableUsersErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetImpersonableUsersError = GetImpersonableUsersErrors[keyof GetImpersonableUsersErrors];

export type GetImpersonableUsersResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        name: string;
        email: string;
        role: string | null;
    }>;
};

export type GetImpersonableUsersResponse = GetImpersonableUsersResponses[keyof GetImpersonableUsersResponses];

export type GetUserTokenData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/user-tokens/me';
};

export type GetUserTokenErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetUserTokenError = GetUserTokenErrors[keyof GetUserTokenErrors];

export type GetUserTokenResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        tokenStart: string;
        createdAt: string;
        lastUsedAt: string | null;
    };
};

export type GetUserTokenResponse = GetUserTokenResponses[keyof GetUserTokenResponses];

export type GetUserTokenValueData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/user-tokens/me/value';
};

export type GetUserTokenValueErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetUserTokenValueError = GetUserTokenValueErrors[keyof GetUserTokenValueErrors];

export type GetUserTokenValueResponses = {
    /**
     * Default Response
     */
    200: {
        value: string;
    };
};

export type GetUserTokenValueResponse = GetUserTokenValueResponses[keyof GetUserTokenValueResponses];

export type RotateUserTokenData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/user-tokens/me/rotate';
};

export type RotateUserTokenErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type RotateUserTokenError = RotateUserTokenErrors[keyof RotateUserTokenErrors];

export type RotateUserTokenResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        tokenStart: string;
        createdAt: string;
        lastUsedAt: string | null;
        value: string;
    };
};

export type RotateUserTokenResponse = RotateUserTokenResponses[keyof RotateUserTokenResponses];

export type GetAllVirtualApiKeysData = {
    body?: never;
    path?: never;
    query?: {
        limit?: number;
        offset?: number;
        search?: string;
        providerApiKeyId?: string;
    };
    url: '/api/llm-virtual-keys';
};

export type GetAllVirtualApiKeysErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetAllVirtualApiKeysError = GetAllVirtualApiKeysErrors[keyof GetAllVirtualApiKeysErrors];

export type GetAllVirtualApiKeysResponses = {
    /**
     * Default Response
     */
    200: {
        data: Array<{
            id: string;
            organizationId: string;
            name: string;
            secretId: string;
            tokenStart: string;
            scope: 'personal' | 'team' | 'org';
            authorId: string | null;
            expiresAt: string | null;
            createdAt: string;
            lastUsedAt: string | null;
            teams: Array<{
                id: string;
                name: string;
            }>;
            authorName: string | null;
            providerApiKeys: Array<{
                provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
                providerApiKeyId: string;
                providerApiKeyName: string;
            }>;
        }>;
        pagination: {
            currentPage: number;
            limit: number;
            total: number;
            totalPages: number;
            hasNext: boolean;
            hasPrev: boolean;
        };
    };
};

export type GetAllVirtualApiKeysResponse = GetAllVirtualApiKeysResponses[keyof GetAllVirtualApiKeysResponses];

export type CreateVirtualApiKeyData = {
    body: {
        name: string;
        expiresAt?: unknown;
        scope?: 'personal' | 'team' | 'org';
        teams?: Array<string>;
        providerApiKeys: Array<{
            provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
            providerApiKeyId: string;
        }>;
    };
    path?: never;
    query?: never;
    url: '/api/llm-virtual-keys';
};

export type CreateVirtualApiKeyErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CreateVirtualApiKeyError = CreateVirtualApiKeyErrors[keyof CreateVirtualApiKeyErrors];

export type CreateVirtualApiKeyResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        name: string;
        secretId: string;
        tokenStart: string;
        scope: 'personal' | 'team' | 'org';
        authorId: string | null;
        expiresAt: string | null;
        createdAt: string;
        lastUsedAt: string | null;
        value: string;
        teams: Array<{
            id: string;
            name: string;
        }>;
        authorName: string | null;
        providerApiKeys: Array<{
            provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
            providerApiKeyId: string;
            providerApiKeyName: string;
        }>;
    };
};

export type CreateVirtualApiKeyResponse = CreateVirtualApiKeyResponses[keyof CreateVirtualApiKeyResponses];

export type DeleteVirtualApiKeyData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/llm-virtual-keys/{id}';
};

export type DeleteVirtualApiKeyErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeleteVirtualApiKeyError = DeleteVirtualApiKeyErrors[keyof DeleteVirtualApiKeyErrors];

export type DeleteVirtualApiKeyResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type DeleteVirtualApiKeyResponse = DeleteVirtualApiKeyResponses[keyof DeleteVirtualApiKeyResponses];

export type UpdateVirtualApiKeyData = {
    body: {
        name: string;
        expiresAt?: unknown;
        scope?: 'personal' | 'team' | 'org';
        teams?: Array<string>;
        providerApiKeys: Array<{
            provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
            providerApiKeyId: string;
        }>;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/llm-virtual-keys/{id}';
};

export type UpdateVirtualApiKeyErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateVirtualApiKeyError = UpdateVirtualApiKeyErrors[keyof UpdateVirtualApiKeyErrors];

export type UpdateVirtualApiKeyResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        name: string;
        secretId: string;
        tokenStart: string;
        scope: 'personal' | 'team' | 'org';
        authorId: string | null;
        expiresAt: string | null;
        createdAt: string;
        lastUsedAt: string | null;
        teams: Array<{
            id: string;
            name: string;
        }>;
        authorName: string | null;
        providerApiKeys: Array<{
            provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure';
            providerApiKeyId: string;
            providerApiKeyName: string;
        }>;
    };
};

export type UpdateVirtualApiKeyResponse = UpdateVirtualApiKeyResponses[keyof UpdateVirtualApiKeyResponses];

export type VllmChatCompletionsWithDefaultAgentData = {
    body: VllmChatCompletionRequestInput;
    headers?: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for vLLM (often not required)
         */
        authorization?: string;
    };
    path?: never;
    query?: never;
    url: '/v1/vllm/chat/completions';
};

export type VllmChatCompletionsWithDefaultAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type VllmChatCompletionsWithDefaultAgentError = VllmChatCompletionsWithDefaultAgentErrors[keyof VllmChatCompletionsWithDefaultAgentErrors];

export type VllmChatCompletionsWithDefaultAgentResponses = {
    /**
     * Default Response
     */
    200: VllmChatCompletionResponse;
};

export type VllmChatCompletionsWithDefaultAgentResponse = VllmChatCompletionsWithDefaultAgentResponses[keyof VllmChatCompletionsWithDefaultAgentResponses];

export type VllmChatCompletionsWithAgentData = {
    body: VllmChatCompletionRequestInput;
    headers?: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for vLLM (often not required)
         */
        authorization?: string;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/vllm/{agentId}/chat/completions';
};

export type VllmChatCompletionsWithAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type VllmChatCompletionsWithAgentError = VllmChatCompletionsWithAgentErrors[keyof VllmChatCompletionsWithAgentErrors];

export type VllmChatCompletionsWithAgentResponses = {
    /**
     * Default Response
     */
    200: VllmChatCompletionResponse;
};

export type VllmChatCompletionsWithAgentResponse = VllmChatCompletionsWithAgentResponses[keyof VllmChatCompletionsWithAgentResponses];

export type XaiChatCompletionsWithDefaultAgentData = {
    body: XaiChatCompletionRequestInput;
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path?: never;
    query?: never;
    url: '/v1/xai/chat/completions';
};

export type XaiChatCompletionsWithDefaultAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type XaiChatCompletionsWithDefaultAgentError = XaiChatCompletionsWithDefaultAgentErrors[keyof XaiChatCompletionsWithDefaultAgentErrors];

export type XaiChatCompletionsWithDefaultAgentResponses = {
    /**
     * Default Response
     */
    200: XaiChatCompletionResponse;
};

export type XaiChatCompletionsWithDefaultAgentResponse = XaiChatCompletionsWithDefaultAgentResponses[keyof XaiChatCompletionsWithDefaultAgentResponses];

export type XaiChatCompletionsWithAgentData = {
    body: XaiChatCompletionRequestInput;
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/xai/{agentId}/chat/completions';
};

export type XaiChatCompletionsWithAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type XaiChatCompletionsWithAgentError = XaiChatCompletionsWithAgentErrors[keyof XaiChatCompletionsWithAgentErrors];

export type XaiChatCompletionsWithAgentResponses = {
    /**
     * Default Response
     */
    200: XaiChatCompletionResponse;
};

export type XaiChatCompletionsWithAgentResponse = XaiChatCompletionsWithAgentResponses[keyof XaiChatCompletionsWithAgentResponses];

export type ZhipuaiChatCompletionsWithDefaultAgentData = {
    body: ZhipuaiChatCompletionRequestInput;
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for Zhipu AI
         */
        authorization: string;
        'accept-language'?: string;
    };
    path?: never;
    query?: never;
    url: '/v1/zhipuai/chat/completions';
};

export type ZhipuaiChatCompletionsWithDefaultAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type ZhipuaiChatCompletionsWithDefaultAgentError = ZhipuaiChatCompletionsWithDefaultAgentErrors[keyof ZhipuaiChatCompletionsWithDefaultAgentErrors];

export type ZhipuaiChatCompletionsWithDefaultAgentResponses = {
    /**
     * Default Response
     */
    200: ZhipuaiChatCompletionResponse;
};

export type ZhipuaiChatCompletionsWithDefaultAgentResponse = ZhipuaiChatCompletionsWithDefaultAgentResponses[keyof ZhipuaiChatCompletionsWithDefaultAgentResponses];

export type ZhipuaiChatCompletionsWithAgentData = {
    body: ZhipuaiChatCompletionRequestInput;
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for Zhipu AI
         */
        authorization: string;
        'accept-language'?: string;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/zhipuai/{agentId}/chat/completions';
};

export type ZhipuaiChatCompletionsWithAgentErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type ZhipuaiChatCompletionsWithAgentError = ZhipuaiChatCompletionsWithAgentErrors[keyof ZhipuaiChatCompletionsWithAgentErrors];

export type ZhipuaiChatCompletionsWithAgentResponses = {
    /**
     * Default Response
     */
    200: ZhipuaiChatCompletionResponse;
};

export type ZhipuaiChatCompletionsWithAgentResponse = ZhipuaiChatCompletionsWithAgentResponses[keyof ZhipuaiChatCompletionsWithAgentResponses];

export type GetPublicIdentityProvidersData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/identity-providers/public';
};

export type GetPublicIdentityProvidersErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetPublicIdentityProvidersError = GetPublicIdentityProvidersErrors[keyof GetPublicIdentityProvidersErrors];

export type GetPublicIdentityProvidersResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        providerId: string;
    }>;
};

export type GetPublicIdentityProvidersResponse = GetPublicIdentityProvidersResponses[keyof GetPublicIdentityProvidersResponses];

export type GetIdentityProvidersData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/identity-providers';
};

export type GetIdentityProvidersErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetIdentityProvidersError = GetIdentityProvidersErrors[keyof GetIdentityProvidersErrors];

export type GetIdentityProvidersResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        issuer: string;
        /**
         * https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L22
         */
        oidcConfig?: {
            issuer: string;
            skipDiscovery?: boolean;
            pkce: boolean;
            enableRpInitiatedLogout?: boolean;
            hd?: string;
            clientId: string;
            clientSecret: string;
            authorizationEndpoint?: string;
            discoveryEndpoint: string;
            userInfoEndpoint?: string;
            scopes?: Array<string>;
            overrideUserInfo?: boolean;
            tokenEndpoint?: string;
            tokenEndpointAuthentication?: 'client_secret_post' | 'client_secret_basic' | 'private_key_jwt';
            jwksEndpoint?: string;
            enterpriseManagedCredentials?: {
                exchangeStrategy?: 'rfc8693' | 'okta_managed' | 'entra_obo';
                clientId?: string;
                clientSecret?: string;
                tokenEndpoint?: string;
                tokenEndpointAuthentication?: 'client_secret_post' | 'client_secret_basic' | 'private_key_jwt';
                privateKeyPem?: string;
                privateKeyId?: string;
                clientAssertionAudience?: string;
                subjectTokenType?: 'urn:ietf:params:oauth:token-type:access_token' | 'urn:ietf:params:oauth:token-type:id_token' | 'urn:ietf:params:oauth:token-type:jwt';
            };
            /**
             * https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L3
             */
            mapping?: {
                id?: string;
                email?: string;
                emailVerified?: string;
                name?: string;
                image?: string;
                extraFields?: {
                    [key: string]: string;
                };
            };
        };
        /**
         * https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L40
         */
        samlConfig?: {
            issuer: string;
            entryPoint: string;
            cert: string;
            callbackUrl: string;
            audience?: string;
            idpMetadata?: {
                metadata?: string;
                entityID?: string;
                entityURL?: string;
                redirectURL?: string;
                cert?: string;
                privateKey?: string;
                privateKeyPass?: string;
                isAssertionEncrypted?: boolean;
                encPrivateKey?: string;
                encPrivateKeyPass?: string;
                singleSignOnService?: Array<{
                    Binding: string;
                    Location: string;
                }>;
            };
            spMetadata: {
                metadata?: string;
                entityID?: string;
                binding?: string;
                privateKey?: string;
                privateKeyPass?: string;
                isAssertionEncrypted?: boolean;
                encPrivateKey?: string;
                encPrivateKeyPass?: string;
            };
            wantAssertionsSigned?: boolean;
            signatureAlgorithm?: string;
            digestAlgorithm?: string;
            identifierFormat?: string;
            privateKey?: string;
            decryptionPvk?: string;
            additionalParams?: {
                [key: string]: unknown;
            };
            /**
             * https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L12C30-L20C2
             */
            mapping?: {
                id?: string;
                email?: string;
                emailVerified?: string;
                name?: string;
                firstName?: string;
                lastName?: string;
                extraFields?: {
                    [key: string]: string;
                };
            };
        };
        roleMapping?: {
            rules?: Array<{
                expression: string;
                role: string;
            }>;
            defaultRole?: string;
            strictMode?: boolean;
            skipRoleSync?: boolean;
        };
        teamSyncConfig?: {
            groupsExpression?: string;
            enabled?: boolean;
        };
        userId: string | null;
        providerId: string;
        organizationId: string | null;
        domain: string;
        domainVerified: boolean | null;
        ssoLoginEnabled: boolean;
    }>;
};

export type GetIdentityProvidersResponse = GetIdentityProvidersResponses[keyof GetIdentityProvidersResponses];

export type CreateIdentityProviderData = {
    body: {
        issuer: string;
        /**
         * https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L22
         */
        oidcConfig?: {
            issuer: string;
            skipDiscovery?: boolean;
            pkce: boolean;
            enableRpInitiatedLogout?: boolean;
            hd?: string;
            clientId: string;
            clientSecret: string;
            authorizationEndpoint?: string;
            discoveryEndpoint: string;
            userInfoEndpoint?: string;
            scopes?: Array<string>;
            overrideUserInfo?: boolean;
            tokenEndpoint?: string;
            tokenEndpointAuthentication?: 'client_secret_post' | 'client_secret_basic' | 'private_key_jwt';
            jwksEndpoint?: string;
            enterpriseManagedCredentials?: {
                exchangeStrategy?: 'rfc8693' | 'okta_managed' | 'entra_obo';
                clientId?: string;
                clientSecret?: string;
                tokenEndpoint?: string;
                tokenEndpointAuthentication?: 'client_secret_post' | 'client_secret_basic' | 'private_key_jwt';
                privateKeyPem?: string;
                privateKeyId?: string;
                clientAssertionAudience?: string;
                subjectTokenType?: 'urn:ietf:params:oauth:token-type:access_token' | 'urn:ietf:params:oauth:token-type:id_token' | 'urn:ietf:params:oauth:token-type:jwt';
            };
            /**
             * https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L3
             */
            mapping?: {
                id?: string;
                email?: string;
                emailVerified?: string;
                name?: string;
                image?: string;
                extraFields?: {
                    [key: string]: string;
                };
            };
        };
        /**
         * https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L40
         */
        samlConfig?: {
            issuer: string;
            entryPoint: string;
            cert: string;
            callbackUrl: string;
            audience?: string;
            idpMetadata?: {
                metadata?: string;
                entityID?: string;
                entityURL?: string;
                redirectURL?: string;
                cert?: string;
                privateKey?: string;
                privateKeyPass?: string;
                isAssertionEncrypted?: boolean;
                encPrivateKey?: string;
                encPrivateKeyPass?: string;
                singleSignOnService?: Array<{
                    Binding: string;
                    Location: string;
                }>;
            };
            spMetadata: {
                metadata?: string;
                entityID?: string;
                binding?: string;
                privateKey?: string;
                privateKeyPass?: string;
                isAssertionEncrypted?: boolean;
                encPrivateKey?: string;
                encPrivateKeyPass?: string;
            };
            wantAssertionsSigned?: boolean;
            signatureAlgorithm?: string;
            digestAlgorithm?: string;
            identifierFormat?: string;
            privateKey?: string;
            decryptionPvk?: string;
            additionalParams?: {
                [key: string]: unknown;
            };
            /**
             * https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L12C30-L20C2
             */
            mapping?: {
                id?: string;
                email?: string;
                emailVerified?: string;
                name?: string;
                firstName?: string;
                lastName?: string;
                extraFields?: {
                    [key: string]: string;
                };
            };
        };
        roleMapping?: {
            rules?: Array<{
                expression: string;
                role: string;
            }>;
            defaultRole?: string;
            strictMode?: boolean;
            skipRoleSync?: boolean;
        };
        teamSyncConfig?: {
            groupsExpression?: string;
            enabled?: boolean;
        };
        userId?: string | null;
        providerId: string;
        domain: string;
        domainVerified?: boolean | null;
        ssoLoginEnabled?: boolean;
    };
    path?: never;
    query?: never;
    url: '/api/identity-providers';
};

export type CreateIdentityProviderErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CreateIdentityProviderError = CreateIdentityProviderErrors[keyof CreateIdentityProviderErrors];

export type CreateIdentityProviderResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        issuer: string;
        /**
         * https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L22
         */
        oidcConfig?: {
            issuer: string;
            skipDiscovery?: boolean;
            pkce: boolean;
            enableRpInitiatedLogout?: boolean;
            hd?: string;
            clientId: string;
            clientSecret: string;
            authorizationEndpoint?: string;
            discoveryEndpoint: string;
            userInfoEndpoint?: string;
            scopes?: Array<string>;
            overrideUserInfo?: boolean;
            tokenEndpoint?: string;
            tokenEndpointAuthentication?: 'client_secret_post' | 'client_secret_basic' | 'private_key_jwt';
            jwksEndpoint?: string;
            enterpriseManagedCredentials?: {
                exchangeStrategy?: 'rfc8693' | 'okta_managed' | 'entra_obo';
                clientId?: string;
                clientSecret?: string;
                tokenEndpoint?: string;
                tokenEndpointAuthentication?: 'client_secret_post' | 'client_secret_basic' | 'private_key_jwt';
                privateKeyPem?: string;
                privateKeyId?: string;
                clientAssertionAudience?: string;
                subjectTokenType?: 'urn:ietf:params:oauth:token-type:access_token' | 'urn:ietf:params:oauth:token-type:id_token' | 'urn:ietf:params:oauth:token-type:jwt';
            };
            /**
             * https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L3
             */
            mapping?: {
                id?: string;
                email?: string;
                emailVerified?: string;
                name?: string;
                image?: string;
                extraFields?: {
                    [key: string]: string;
                };
            };
        };
        /**
         * https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L40
         */
        samlConfig?: {
            issuer: string;
            entryPoint: string;
            cert: string;
            callbackUrl: string;
            audience?: string;
            idpMetadata?: {
                metadata?: string;
                entityID?: string;
                entityURL?: string;
                redirectURL?: string;
                cert?: string;
                privateKey?: string;
                privateKeyPass?: string;
                isAssertionEncrypted?: boolean;
                encPrivateKey?: string;
                encPrivateKeyPass?: string;
                singleSignOnService?: Array<{
                    Binding: string;
                    Location: string;
                }>;
            };
            spMetadata: {
                metadata?: string;
                entityID?: string;
                binding?: string;
                privateKey?: string;
                privateKeyPass?: string;
                isAssertionEncrypted?: boolean;
                encPrivateKey?: string;
                encPrivateKeyPass?: string;
            };
            wantAssertionsSigned?: boolean;
            signatureAlgorithm?: string;
            digestAlgorithm?: string;
            identifierFormat?: string;
            privateKey?: string;
            decryptionPvk?: string;
            additionalParams?: {
                [key: string]: unknown;
            };
            /**
             * https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L12C30-L20C2
             */
            mapping?: {
                id?: string;
                email?: string;
                emailVerified?: string;
                name?: string;
                firstName?: string;
                lastName?: string;
                extraFields?: {
                    [key: string]: string;
                };
            };
        };
        roleMapping?: {
            rules?: Array<{
                expression: string;
                role: string;
            }>;
            defaultRole?: string;
            strictMode?: boolean;
            skipRoleSync?: boolean;
        };
        teamSyncConfig?: {
            groupsExpression?: string;
            enabled?: boolean;
        };
        userId: string | null;
        providerId: string;
        organizationId: string | null;
        domain: string;
        domainVerified: boolean | null;
        ssoLoginEnabled: boolean;
    };
};

export type CreateIdentityProviderResponse = CreateIdentityProviderResponses[keyof CreateIdentityProviderResponses];

export type GetIdentityProviderIdpLogoutUrlData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/identity-providers/idp-logout-url';
};

export type GetIdentityProviderIdpLogoutUrlErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetIdentityProviderIdpLogoutUrlError = GetIdentityProviderIdpLogoutUrlErrors[keyof GetIdentityProviderIdpLogoutUrlErrors];

export type GetIdentityProviderIdpLogoutUrlResponses = {
    /**
     * Default Response
     */
    200: {
        url: string | null;
    };
};

export type GetIdentityProviderIdpLogoutUrlResponse = GetIdentityProviderIdpLogoutUrlResponses[keyof GetIdentityProviderIdpLogoutUrlResponses];

export type GetIdentityProviderLatestIdTokenClaimsData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/identity-providers/{id}/latest-id-token-claims';
};

export type GetIdentityProviderLatestIdTokenClaimsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetIdentityProviderLatestIdTokenClaimsError = GetIdentityProviderLatestIdTokenClaimsErrors[keyof GetIdentityProviderLatestIdTokenClaimsErrors];

export type GetIdentityProviderLatestIdTokenClaimsResponses = {
    /**
     * Default Response
     */
    200: {
        providerId: string;
        claims: {
            [key: string]: unknown;
        } | null;
        updatedAt: string | null;
    };
};

export type GetIdentityProviderLatestIdTokenClaimsResponse = GetIdentityProviderLatestIdTokenClaimsResponses[keyof GetIdentityProviderLatestIdTokenClaimsResponses];

export type DeleteIdentityProviderData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/identity-providers/{id}';
};

export type DeleteIdentityProviderErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeleteIdentityProviderError = DeleteIdentityProviderErrors[keyof DeleteIdentityProviderErrors];

export type DeleteIdentityProviderResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type DeleteIdentityProviderResponse = DeleteIdentityProviderResponses[keyof DeleteIdentityProviderResponses];

export type GetIdentityProviderData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/identity-providers/{id}';
};

export type GetIdentityProviderErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetIdentityProviderError = GetIdentityProviderErrors[keyof GetIdentityProviderErrors];

export type GetIdentityProviderResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        issuer: string;
        /**
         * https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L22
         */
        oidcConfig?: {
            issuer: string;
            skipDiscovery?: boolean;
            pkce: boolean;
            enableRpInitiatedLogout?: boolean;
            hd?: string;
            clientId: string;
            clientSecret: string;
            authorizationEndpoint?: string;
            discoveryEndpoint: string;
            userInfoEndpoint?: string;
            scopes?: Array<string>;
            overrideUserInfo?: boolean;
            tokenEndpoint?: string;
            tokenEndpointAuthentication?: 'client_secret_post' | 'client_secret_basic' | 'private_key_jwt';
            jwksEndpoint?: string;
            enterpriseManagedCredentials?: {
                exchangeStrategy?: 'rfc8693' | 'okta_managed' | 'entra_obo';
                clientId?: string;
                clientSecret?: string;
                tokenEndpoint?: string;
                tokenEndpointAuthentication?: 'client_secret_post' | 'client_secret_basic' | 'private_key_jwt';
                privateKeyPem?: string;
                privateKeyId?: string;
                clientAssertionAudience?: string;
                subjectTokenType?: 'urn:ietf:params:oauth:token-type:access_token' | 'urn:ietf:params:oauth:token-type:id_token' | 'urn:ietf:params:oauth:token-type:jwt';
            };
            /**
             * https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L3
             */
            mapping?: {
                id?: string;
                email?: string;
                emailVerified?: string;
                name?: string;
                image?: string;
                extraFields?: {
                    [key: string]: string;
                };
            };
        };
        /**
         * https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L40
         */
        samlConfig?: {
            issuer: string;
            entryPoint: string;
            cert: string;
            callbackUrl: string;
            audience?: string;
            idpMetadata?: {
                metadata?: string;
                entityID?: string;
                entityURL?: string;
                redirectURL?: string;
                cert?: string;
                privateKey?: string;
                privateKeyPass?: string;
                isAssertionEncrypted?: boolean;
                encPrivateKey?: string;
                encPrivateKeyPass?: string;
                singleSignOnService?: Array<{
                    Binding: string;
                    Location: string;
                }>;
            };
            spMetadata: {
                metadata?: string;
                entityID?: string;
                binding?: string;
                privateKey?: string;
                privateKeyPass?: string;
                isAssertionEncrypted?: boolean;
                encPrivateKey?: string;
                encPrivateKeyPass?: string;
            };
            wantAssertionsSigned?: boolean;
            signatureAlgorithm?: string;
            digestAlgorithm?: string;
            identifierFormat?: string;
            privateKey?: string;
            decryptionPvk?: string;
            additionalParams?: {
                [key: string]: unknown;
            };
            /**
             * https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L12C30-L20C2
             */
            mapping?: {
                id?: string;
                email?: string;
                emailVerified?: string;
                name?: string;
                firstName?: string;
                lastName?: string;
                extraFields?: {
                    [key: string]: string;
                };
            };
        };
        roleMapping?: {
            rules?: Array<{
                expression: string;
                role: string;
            }>;
            defaultRole?: string;
            strictMode?: boolean;
            skipRoleSync?: boolean;
        };
        teamSyncConfig?: {
            groupsExpression?: string;
            enabled?: boolean;
        };
        userId: string | null;
        providerId: string;
        organizationId: string | null;
        domain: string;
        domainVerified: boolean | null;
        ssoLoginEnabled: boolean;
    };
};

export type GetIdentityProviderResponse = GetIdentityProviderResponses[keyof GetIdentityProviderResponses];

export type UpdateIdentityProviderData = {
    body: {
        issuer?: string;
        /**
         * https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L22
         */
        oidcConfig?: {
            issuer: string;
            skipDiscovery?: boolean;
            pkce: boolean;
            enableRpInitiatedLogout?: boolean;
            hd?: string;
            clientId: string;
            clientSecret: string;
            authorizationEndpoint?: string;
            discoveryEndpoint: string;
            userInfoEndpoint?: string;
            scopes?: Array<string>;
            overrideUserInfo?: boolean;
            tokenEndpoint?: string;
            tokenEndpointAuthentication?: 'client_secret_post' | 'client_secret_basic' | 'private_key_jwt';
            jwksEndpoint?: string;
            enterpriseManagedCredentials?: {
                exchangeStrategy?: 'rfc8693' | 'okta_managed' | 'entra_obo';
                clientId?: string;
                clientSecret?: string;
                tokenEndpoint?: string;
                tokenEndpointAuthentication?: 'client_secret_post' | 'client_secret_basic' | 'private_key_jwt';
                privateKeyPem?: string;
                privateKeyId?: string;
                clientAssertionAudience?: string;
                subjectTokenType?: 'urn:ietf:params:oauth:token-type:access_token' | 'urn:ietf:params:oauth:token-type:id_token' | 'urn:ietf:params:oauth:token-type:jwt';
            };
            /**
             * https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L3
             */
            mapping?: {
                id?: string;
                email?: string;
                emailVerified?: string;
                name?: string;
                image?: string;
                extraFields?: {
                    [key: string]: string;
                };
            };
        };
        /**
         * https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L40
         */
        samlConfig?: {
            issuer: string;
            entryPoint: string;
            cert: string;
            callbackUrl: string;
            audience?: string;
            idpMetadata?: {
                metadata?: string;
                entityID?: string;
                entityURL?: string;
                redirectURL?: string;
                cert?: string;
                privateKey?: string;
                privateKeyPass?: string;
                isAssertionEncrypted?: boolean;
                encPrivateKey?: string;
                encPrivateKeyPass?: string;
                singleSignOnService?: Array<{
                    Binding: string;
                    Location: string;
                }>;
            };
            spMetadata: {
                metadata?: string;
                entityID?: string;
                binding?: string;
                privateKey?: string;
                privateKeyPass?: string;
                isAssertionEncrypted?: boolean;
                encPrivateKey?: string;
                encPrivateKeyPass?: string;
            };
            wantAssertionsSigned?: boolean;
            signatureAlgorithm?: string;
            digestAlgorithm?: string;
            identifierFormat?: string;
            privateKey?: string;
            decryptionPvk?: string;
            additionalParams?: {
                [key: string]: unknown;
            };
            /**
             * https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L12C30-L20C2
             */
            mapping?: {
                id?: string;
                email?: string;
                emailVerified?: string;
                name?: string;
                firstName?: string;
                lastName?: string;
                extraFields?: {
                    [key: string]: string;
                };
            };
        };
        roleMapping?: {
            rules?: Array<{
                expression: string;
                role: string;
            }>;
            defaultRole?: string;
            strictMode?: boolean;
            skipRoleSync?: boolean;
        };
        teamSyncConfig?: {
            groupsExpression?: string;
            enabled?: boolean;
        };
        providerId?: string;
        domain?: string;
        domainVerified?: boolean | null;
        ssoLoginEnabled?: boolean;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/identity-providers/{id}';
};

export type UpdateIdentityProviderErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type UpdateIdentityProviderError = UpdateIdentityProviderErrors[keyof UpdateIdentityProviderErrors];

export type UpdateIdentityProviderResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        issuer: string;
        /**
         * https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L22
         */
        oidcConfig?: {
            issuer: string;
            skipDiscovery?: boolean;
            pkce: boolean;
            enableRpInitiatedLogout?: boolean;
            hd?: string;
            clientId: string;
            clientSecret: string;
            authorizationEndpoint?: string;
            discoveryEndpoint: string;
            userInfoEndpoint?: string;
            scopes?: Array<string>;
            overrideUserInfo?: boolean;
            tokenEndpoint?: string;
            tokenEndpointAuthentication?: 'client_secret_post' | 'client_secret_basic' | 'private_key_jwt';
            jwksEndpoint?: string;
            enterpriseManagedCredentials?: {
                exchangeStrategy?: 'rfc8693' | 'okta_managed' | 'entra_obo';
                clientId?: string;
                clientSecret?: string;
                tokenEndpoint?: string;
                tokenEndpointAuthentication?: 'client_secret_post' | 'client_secret_basic' | 'private_key_jwt';
                privateKeyPem?: string;
                privateKeyId?: string;
                clientAssertionAudience?: string;
                subjectTokenType?: 'urn:ietf:params:oauth:token-type:access_token' | 'urn:ietf:params:oauth:token-type:id_token' | 'urn:ietf:params:oauth:token-type:jwt';
            };
            /**
             * https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L3
             */
            mapping?: {
                id?: string;
                email?: string;
                emailVerified?: string;
                name?: string;
                image?: string;
                extraFields?: {
                    [key: string]: string;
                };
            };
        };
        /**
         * https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L40
         */
        samlConfig?: {
            issuer: string;
            entryPoint: string;
            cert: string;
            callbackUrl: string;
            audience?: string;
            idpMetadata?: {
                metadata?: string;
                entityID?: string;
                entityURL?: string;
                redirectURL?: string;
                cert?: string;
                privateKey?: string;
                privateKeyPass?: string;
                isAssertionEncrypted?: boolean;
                encPrivateKey?: string;
                encPrivateKeyPass?: string;
                singleSignOnService?: Array<{
                    Binding: string;
                    Location: string;
                }>;
            };
            spMetadata: {
                metadata?: string;
                entityID?: string;
                binding?: string;
                privateKey?: string;
                privateKeyPass?: string;
                isAssertionEncrypted?: boolean;
                encPrivateKey?: string;
                encPrivateKeyPass?: string;
            };
            wantAssertionsSigned?: boolean;
            signatureAlgorithm?: string;
            digestAlgorithm?: string;
            identifierFormat?: string;
            privateKey?: string;
            decryptionPvk?: string;
            additionalParams?: {
                [key: string]: unknown;
            };
            /**
             * https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L12C30-L20C2
             */
            mapping?: {
                id?: string;
                email?: string;
                emailVerified?: string;
                name?: string;
                firstName?: string;
                lastName?: string;
                extraFields?: {
                    [key: string]: string;
                };
            };
        };
        roleMapping?: {
            rules?: Array<{
                expression: string;
                role: string;
            }>;
            defaultRole?: string;
            strictMode?: boolean;
            skipRoleSync?: boolean;
        };
        teamSyncConfig?: {
            groupsExpression?: string;
            enabled?: boolean;
        };
        userId: string | null;
        providerId: string;
        organizationId: string | null;
        domain: string;
        domainVerified: boolean | null;
        ssoLoginEnabled: boolean;
    };
};

export type UpdateIdentityProviderResponse = UpdateIdentityProviderResponses[keyof UpdateIdentityProviderResponses];

export type DeleteTeamVaultFolderData = {
    body?: never;
    path: {
        teamId: string;
    };
    query?: never;
    url: '/api/teams/{teamId}/vault-folder';
};

export type DeleteTeamVaultFolderErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type DeleteTeamVaultFolderError = DeleteTeamVaultFolderErrors[keyof DeleteTeamVaultFolderErrors];

export type DeleteTeamVaultFolderResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
    };
};

export type DeleteTeamVaultFolderResponse = DeleteTeamVaultFolderResponses[keyof DeleteTeamVaultFolderResponses];

export type GetTeamVaultFolderData = {
    body?: never;
    path: {
        teamId: string;
    };
    query?: never;
    url: '/api/teams/{teamId}/vault-folder';
};

export type GetTeamVaultFolderErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetTeamVaultFolderError = GetTeamVaultFolderErrors[keyof GetTeamVaultFolderErrors];

export type GetTeamVaultFolderResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        teamId: string;
        vaultPath: string;
        createdAt: string;
        updatedAt: string;
    } | null;
};

export type GetTeamVaultFolderResponse = GetTeamVaultFolderResponses[keyof GetTeamVaultFolderResponses];

export type SetTeamVaultFolderData = {
    body: {
        vaultPath: string;
    };
    path: {
        teamId: string;
    };
    query?: never;
    url: '/api/teams/{teamId}/vault-folder';
};

export type SetTeamVaultFolderErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type SetTeamVaultFolderError = SetTeamVaultFolderErrors[keyof SetTeamVaultFolderErrors];

export type SetTeamVaultFolderResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        teamId: string;
        vaultPath: string;
        createdAt: string;
        updatedAt: string;
    };
};

export type SetTeamVaultFolderResponse = SetTeamVaultFolderResponses[keyof SetTeamVaultFolderResponses];

export type CheckTeamVaultFolderConnectivityData = {
    body: {
        vaultPath?: string;
    };
    path: {
        teamId: string;
    };
    query?: never;
    url: '/api/teams/{teamId}/vault-folder/check-connectivity';
};

export type CheckTeamVaultFolderConnectivityErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type CheckTeamVaultFolderConnectivityError = CheckTeamVaultFolderConnectivityErrors[keyof CheckTeamVaultFolderConnectivityErrors];

export type CheckTeamVaultFolderConnectivityResponses = {
    /**
     * Default Response
     */
    200: {
        connected: boolean;
        secretCount: number;
        error?: string;
    };
};

export type CheckTeamVaultFolderConnectivityResponse = CheckTeamVaultFolderConnectivityResponses[keyof CheckTeamVaultFolderConnectivityResponses];

export type ListTeamVaultFolderSecretsData = {
    body?: never;
    path: {
        teamId: string;
    };
    query?: never;
    url: '/api/teams/{teamId}/vault-folder/secrets';
};

export type ListTeamVaultFolderSecretsErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type ListTeamVaultFolderSecretsError = ListTeamVaultFolderSecretsErrors[keyof ListTeamVaultFolderSecretsErrors];

export type ListTeamVaultFolderSecretsResponses = {
    /**
     * Default Response
     */
    200: Array<{
        name: string;
        path: string;
    }>;
};

export type ListTeamVaultFolderSecretsResponse = ListTeamVaultFolderSecretsResponses[keyof ListTeamVaultFolderSecretsResponses];

export type GetTeamVaultSecretKeysData = {
    body: {
        secretPath: string;
    };
    path: {
        teamId: string;
    };
    query?: never;
    url: '/api/teams/{teamId}/vault-folder/secrets/keys';
};

export type GetTeamVaultSecretKeysErrors = {
    /**
     * Default Response
     */
    400: {
        error: {
            message: string;
            type: 'api_validation_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    401: {
        error: {
            message: string;
            type: 'api_authentication_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    403: {
        error: {
            message: string;
            type: 'api_authorization_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    404: {
        error: {
            message: string;
            type: 'api_not_found_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    409: {
        error: {
            message: string;
            type: 'api_conflict_error';
            internal_code?: string;
        };
    };
    /**
     * Default Response
     */
    500: {
        error: {
            message: string;
            type: 'api_internal_server_error';
            internal_code?: string;
        };
    };
};

export type GetTeamVaultSecretKeysError = GetTeamVaultSecretKeysErrors[keyof GetTeamVaultSecretKeysErrors];

export type GetTeamVaultSecretKeysResponses = {
    /**
     * Default Response
     */
    200: {
        keys: Array<string>;
    };
};

export type GetTeamVaultSecretKeysResponse = GetTeamVaultSecretKeysResponses[keyof GetTeamVaultSecretKeysResponses];
