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

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

export type EmbeddingDimensionsInput = 3072 | 1536 | 1024 | 768 | 384;

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' | string;
        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> | null;
            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;
            } | {
                type: 'url';
                url: 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;
                    } | {
                        type: 'url';
                        url: string;
                    };
                    cache_control?: unknown;
                }>;
            };
            title?: string | null;
            context?: string | null;
            citations?: {
                enabled: boolean;
            } | null;
            cache_control?: unknown;
        } | {
            type: 'thinking';
            thinking: string;
            signature: string;
        } | {
            type: 'redacted_thinking';
            data: string;
        } | {
            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;
                } | {
                    type: 'url';
                    url: 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;
                        } | {
                            type: 'url';
                            url: string;
                        };
                        cache_control?: unknown;
                    }>;
                };
                title?: string | null;
                context?: string | null;
                citations?: {
                    enabled: boolean;
                } | null;
                cache_control?: unknown;
            }>;
            is_error?: boolean;
        } | {
            type: 'search_result' | 'server_tool_use' | 'web_search_tool_result' | 'web_fetch_tool_result' | 'code_execution_tool_result' | 'bash_code_execution_tool_result' | 'text_editor_code_execution_tool_result' | 'tool_search_tool_result' | 'container_upload';
            [key: string]: unknown;
        } | {
            type: string;
            [key: string]: unknown;
        }>;
        role: 'user' | 'assistant' | 'system';
    }>;
    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;
        cache_read_input_tokens?: number | null;
        cache_creation_input_tokens?: number | null;
        cache_creation?: {
            ephemeral_1h_input_tokens?: number | null;
            ephemeral_5m_input_tokens?: number | null;
        } | null;
    };
};

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' | string;
        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> | null;
            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: 'image_url';
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        }>;
    } | {
        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' | string;
        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> | null;
            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' | string;
        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> | null;
            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' | string;
        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> | null;
            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;
    response_format?: {
        type: 'text' | 'json_object' | 'json_schema';
        [key: string]: unknown;
    };
};

export type OpenrouterChatCompletionResponseInput = {
    id: string;
    choices: Array<{
        finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call' | string;
        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> | null;
            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> | null;
            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> | null;
            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' | string;
        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> | null;
            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' | string;
        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> | null;
            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;
    required?: boolean;
    default?: UserConfigFieldDefaultInput;
    multiple?: boolean;
    sensitive?: boolean;
    min?: number;
    max?: number;
    headerName?: string;
    valuePrefix?: string;
};

export type EmbeddingDimensions = 3072 | 1536 | 1024 | 768 | 384;

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' | string;
        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> | null;
            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;
            } | {
                type: 'url';
                url: 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;
                    } | {
                        type: 'url';
                        url: string;
                    };
                    cache_control?: unknown;
                }>;
            };
            title?: string | null;
            context?: string | null;
            citations?: {
                enabled: boolean;
            } | null;
            cache_control?: unknown;
        } | {
            type: 'thinking';
            thinking: string;
            signature: string;
        } | {
            type: 'redacted_thinking';
            data: string;
        } | {
            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;
                } | {
                    type: 'url';
                    url: 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;
                        } | {
                            type: 'url';
                            url: string;
                        };
                        cache_control?: unknown;
                    }>;
                };
                title?: string | null;
                context?: string | null;
                citations?: {
                    enabled: boolean;
                } | null;
                cache_control?: unknown;
            }>;
            is_error?: boolean;
        } | {
            type: 'search_result' | 'server_tool_use' | 'web_search_tool_result' | 'web_fetch_tool_result' | 'code_execution_tool_result' | 'bash_code_execution_tool_result' | 'text_editor_code_execution_tool_result' | 'tool_search_tool_result' | 'container_upload';
            [key: string]: unknown;
        } | {
            type: string;
            [key: string]: unknown;
        }>;
        role: 'user' | 'assistant' | 'system';
    }>;
    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;
        cache_read_input_tokens?: number | null;
        cache_creation_input_tokens?: number | null;
        cache_creation?: {
            ephemeral_1h_input_tokens?: number | null;
            ephemeral_5m_input_tokens?: number | null;
        } | null;
    };
};

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' | string;
        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> | null;
            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: 'image_url';
            image_url: {
                url: string;
                detail?: 'auto' | 'low' | 'high';
            };
        }>;
    } | {
        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' | string;
        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> | null;
            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' | string;
        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> | null;
            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' | string;
        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> | null;
            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;
    response_format?: {
        type: 'text' | 'json_object' | 'json_schema';
        [key: string]: unknown;
    };
};

export type OpenrouterChatCompletionResponse = {
    id: string;
    choices: Array<{
        finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call' | string;
        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> | null;
            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> | null;
            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> | null;
            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' | string;
        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> | null;
            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' | string;
        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> | null;
            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;
    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;
        /**
         * Filter by lifecycle status. Deleted rows require delete permission.
         */
        status?: 'active' | 'deleted';
        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;
            isPersonalProxy: 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;
            environmentId: string | null;
            passthroughHeaders: Array<string> | null;
            toolExposureMode: 'full' | 'search_and_run_only';
            accessAllTools: boolean;
            builtInAgentConfig: {
                name: 'policy-configuration-subagent';
                autoConfigureOnToolDiscovery: boolean;
            } | {
                name: 'dual-llm-main-agent';
                maxRounds: number;
            } | {
                name: 'dual-llm-quarantine-agent';
            } | {
                name: 'context-compaction-subagent';
            } | {
                name: 'chat-title-generation-subagent';
            } | {
                name: 'app-runtime-llm-agent';
            } | null;
            builtIn: boolean | null;
            createdAt: string;
            updatedAt: string;
            deletedAt: string | null;
            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;
                clonedPendingDiscovery: boolean;
                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;
            authorEmail?: string | null;
            knowledgeBaseIds: Array<string>;
            connectorIds: Array<string>;
            suggestedPrompts: Array<{
                summaryTitle: string;
                prompt: string;
            }>;
            resolvedLlmProvider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
            resolvedLlmModelName?: string | null;
            llmProviderRequiresPerUserCredential?: boolean;
            sandboxAvailable?: boolean;
        }>;
        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;
        isPersonalProxy?: 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;
        environmentId?: string | null;
        passthroughHeaders?: Array<string> | null;
        toolExposureMode?: 'full' | 'search_and_run_only';
        accessAllTools?: boolean;
        builtInAgentConfig?: {
            name: 'policy-configuration-subagent';
            autoConfigureOnToolDiscovery: boolean;
        } | {
            name: 'dual-llm-main-agent';
            maxRounds: number;
        } | {
            name: 'dual-llm-quarantine-agent';
        } | {
            name: 'context-compaction-subagent';
        } | {
            name: 'chat-title-generation-subagent';
        } | {
            name: 'app-runtime-llm-agent';
        } | null;
        deletedAt?: unknown;
        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;
        isPersonalProxy: 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;
        environmentId: string | null;
        passthroughHeaders: Array<string> | null;
        toolExposureMode: 'full' | 'search_and_run_only';
        accessAllTools: boolean;
        builtInAgentConfig: {
            name: 'policy-configuration-subagent';
            autoConfigureOnToolDiscovery: boolean;
        } | {
            name: 'dual-llm-main-agent';
            maxRounds: number;
        } | {
            name: 'dual-llm-quarantine-agent';
        } | {
            name: 'context-compaction-subagent';
        } | {
            name: 'chat-title-generation-subagent';
        } | {
            name: 'app-runtime-llm-agent';
        } | null;
        builtIn: boolean | null;
        createdAt: string;
        updatedAt: string;
        deletedAt: string | null;
        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;
            clonedPendingDiscovery: boolean;
            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;
        authorEmail?: string | null;
        knowledgeBaseIds: Array<string>;
        connectorIds: Array<string>;
        suggestedPrompts: Array<{
            summaryTitle: string;
            prompt: string;
        }>;
        resolvedLlmProvider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
        resolvedLlmModelName?: string | null;
        llmProviderRequiresPerUserCredential?: boolean;
        sandboxAvailable?: boolean;
    };
};

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;
        /**
         * Filter by lifecycle status. Deleted rows require delete permission.
         */
        status?: 'active' | 'deleted';
    };
    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;
        isPersonalProxy: 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;
        environmentId: string | null;
        passthroughHeaders: Array<string> | null;
        toolExposureMode: 'full' | 'search_and_run_only';
        accessAllTools: boolean;
        builtInAgentConfig: {
            name: 'policy-configuration-subagent';
            autoConfigureOnToolDiscovery: boolean;
        } | {
            name: 'dual-llm-main-agent';
            maxRounds: number;
        } | {
            name: 'dual-llm-quarantine-agent';
        } | {
            name: 'context-compaction-subagent';
        } | {
            name: 'chat-title-generation-subagent';
        } | {
            name: 'app-runtime-llm-agent';
        } | null;
        builtIn: boolean | null;
        createdAt: string;
        updatedAt: string;
        deletedAt: string | null;
        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;
            clonedPendingDiscovery: boolean;
            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;
        authorEmail?: string | null;
        knowledgeBaseIds: Array<string>;
        connectorIds: Array<string>;
        suggestedPrompts: Array<{
            summaryTitle: string;
            prompt: string;
        }>;
        resolvedLlmProvider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
        resolvedLlmModelName?: string | null;
        llmProviderRequiresPerUserCredential?: boolean;
        sandboxAvailable?: boolean;
    }>;
};

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;
        isPersonalProxy: 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;
        environmentId: string | null;
        passthroughHeaders: Array<string> | null;
        toolExposureMode: 'full' | 'search_and_run_only';
        accessAllTools: boolean;
        builtInAgentConfig: {
            name: 'policy-configuration-subagent';
            autoConfigureOnToolDiscovery: boolean;
        } | {
            name: 'dual-llm-main-agent';
            maxRounds: number;
        } | {
            name: 'dual-llm-quarantine-agent';
        } | {
            name: 'context-compaction-subagent';
        } | {
            name: 'chat-title-generation-subagent';
        } | {
            name: 'app-runtime-llm-agent';
        } | null;
        builtIn: boolean | null;
        createdAt: string;
        updatedAt: string;
        deletedAt: string | null;
        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;
            clonedPendingDiscovery: boolean;
            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;
        authorEmail?: string | null;
        knowledgeBaseIds: Array<string>;
        connectorIds: Array<string>;
        suggestedPrompts: Array<{
            summaryTitle: string;
            prompt: string;
        }>;
        resolvedLlmProvider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
        resolvedLlmModelName?: string | null;
        llmProviderRequiresPerUserCredential?: boolean;
        sandboxAvailable?: boolean;
    };
};

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;
        isPersonalProxy: 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;
        environmentId: string | null;
        passthroughHeaders: Array<string> | null;
        toolExposureMode: 'full' | 'search_and_run_only';
        accessAllTools: boolean;
        builtInAgentConfig: {
            name: 'policy-configuration-subagent';
            autoConfigureOnToolDiscovery: boolean;
        } | {
            name: 'dual-llm-main-agent';
            maxRounds: number;
        } | {
            name: 'dual-llm-quarantine-agent';
        } | {
            name: 'context-compaction-subagent';
        } | {
            name: 'chat-title-generation-subagent';
        } | {
            name: 'app-runtime-llm-agent';
        } | null;
        builtIn: boolean | null;
        createdAt: string;
        updatedAt: string;
        deletedAt: string | null;
        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;
            clonedPendingDiscovery: boolean;
            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;
        authorEmail?: string | null;
        knowledgeBaseIds: Array<string>;
        connectorIds: Array<string>;
        suggestedPrompts: Array<{
            summaryTitle: string;
            prompt: string;
        }>;
        resolvedLlmProvider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
        resolvedLlmModelName?: string | null;
        llmProviderRequiresPerUserCredential?: boolean;
        sandboxAvailable?: boolean;
    };
};

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;
            toolExposureMode: 'full' | 'search_and_run_only';
            accessAllTools?: boolean;
            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' | 'dropbox' | 'onedrive' | 'asana' | 'linear' | 'outline' | 'salesforce' | 'web_crawler' | 'perforce';
        }>;
    };
    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;
            isPersonalProxy: 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;
            environmentId: string | null;
            passthroughHeaders: Array<string> | null;
            toolExposureMode: 'full' | 'search_and_run_only';
            accessAllTools: boolean;
            builtInAgentConfig: {
                name: 'policy-configuration-subagent';
                autoConfigureOnToolDiscovery: boolean;
            } | {
                name: 'dual-llm-main-agent';
                maxRounds: number;
            } | {
                name: 'dual-llm-quarantine-agent';
            } | {
                name: 'context-compaction-subagent';
            } | {
                name: 'chat-title-generation-subagent';
            } | {
                name: 'app-runtime-llm-agent';
            } | null;
            builtIn: boolean | null;
            createdAt: string;
            updatedAt: string;
            deletedAt: string | null;
            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;
                clonedPendingDiscovery: boolean;
                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;
            authorEmail?: string | null;
            knowledgeBaseIds: Array<string>;
            connectorIds: Array<string>;
            suggestedPrompts: Array<{
                summaryTitle: string;
                prompt: string;
            }>;
            resolvedLlmProvider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
            resolvedLlmModelName?: string | null;
            llmProviderRequiresPerUserCredential?: boolean;
            sandboxAvailable?: boolean;
        };
        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;
        isPersonalProxy: 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;
        environmentId: string | null;
        passthroughHeaders: Array<string> | null;
        toolExposureMode: 'full' | 'search_and_run_only';
        accessAllTools: boolean;
        builtInAgentConfig: {
            name: 'policy-configuration-subagent';
            autoConfigureOnToolDiscovery: boolean;
        } | {
            name: 'dual-llm-main-agent';
            maxRounds: number;
        } | {
            name: 'dual-llm-quarantine-agent';
        } | {
            name: 'context-compaction-subagent';
        } | {
            name: 'chat-title-generation-subagent';
        } | {
            name: 'app-runtime-llm-agent';
        } | null;
        builtIn: boolean | null;
        createdAt: string;
        updatedAt: string;
        deletedAt: string | null;
        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;
            clonedPendingDiscovery: boolean;
            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;
        authorEmail?: string | null;
        knowledgeBaseIds: Array<string>;
        connectorIds: Array<string>;
        suggestedPrompts: Array<{
            summaryTitle: string;
            prompt: string;
        }>;
        resolvedLlmProvider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
        resolvedLlmModelName?: string | null;
        llmProviderRequiresPerUserCredential?: boolean;
        sandboxAvailable?: boolean;
    };
};

export type GetAgentResponse = GetAgentResponses[keyof GetAgentResponses];

export type UpdateAgentData = {
    body: {
        organizationId?: string;
        scope?: 'personal' | 'team' | 'org';
        name?: string;
        isDefault?: boolean;
        isPersonalProxy?: 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;
        environmentId?: string | null;
        passthroughHeaders?: Array<string> | null;
        toolExposureMode?: 'full' | 'search_and_run_only';
        accessAllTools?: boolean;
        builtInAgentConfig?: {
            name: 'policy-configuration-subagent';
            autoConfigureOnToolDiscovery: boolean;
        } | {
            name: 'dual-llm-main-agent';
            maxRounds: number;
        } | {
            name: 'dual-llm-quarantine-agent';
        } | {
            name: 'context-compaction-subagent';
        } | {
            name: 'chat-title-generation-subagent';
        } | {
            name: 'app-runtime-llm-agent';
        } | null;
        deletedAt?: unknown;
        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;
        isPersonalProxy: 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;
        environmentId: string | null;
        passthroughHeaders: Array<string> | null;
        toolExposureMode: 'full' | 'search_and_run_only';
        accessAllTools: boolean;
        builtInAgentConfig: {
            name: 'policy-configuration-subagent';
            autoConfigureOnToolDiscovery: boolean;
        } | {
            name: 'dual-llm-main-agent';
            maxRounds: number;
        } | {
            name: 'dual-llm-quarantine-agent';
        } | {
            name: 'context-compaction-subagent';
        } | {
            name: 'chat-title-generation-subagent';
        } | {
            name: 'app-runtime-llm-agent';
        } | null;
        builtIn: boolean | null;
        createdAt: string;
        updatedAt: string;
        deletedAt: string | null;
        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;
            clonedPendingDiscovery: boolean;
            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;
        authorEmail?: string | null;
        knowledgeBaseIds: Array<string>;
        connectorIds: Array<string>;
        suggestedPrompts: Array<{
            summaryTitle: string;
            prompt: string;
        }>;
        resolvedLlmProvider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
        resolvedLlmModelName?: string | null;
        llmProviderRequiresPerUserCredential?: boolean;
        sandboxAvailable?: boolean;
    };
};

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;
        isPersonalProxy: 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;
        environmentId: string | null;
        passthroughHeaders: Array<string> | null;
        toolExposureMode: 'full' | 'search_and_run_only';
        accessAllTools: boolean;
        builtInAgentConfig: {
            name: 'policy-configuration-subagent';
            autoConfigureOnToolDiscovery: boolean;
        } | {
            name: 'dual-llm-main-agent';
            maxRounds: number;
        } | {
            name: 'dual-llm-quarantine-agent';
        } | {
            name: 'context-compaction-subagent';
        } | {
            name: 'chat-title-generation-subagent';
        } | {
            name: 'app-runtime-llm-agent';
        } | null;
        builtIn: boolean | null;
        createdAt: string;
        updatedAt: string;
        deletedAt: string | null;
        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;
            clonedPendingDiscovery: boolean;
            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;
        authorEmail?: string | null;
        knowledgeBaseIds: Array<string>;
        connectorIds: Array<string>;
        suggestedPrompts: Array<{
            summaryTitle: string;
            prompt: string;
        }>;
        resolvedLlmProvider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
        resolvedLlmModelName?: string | null;
        llmProviderRequiresPerUserCredential?: boolean;
        sandboxAvailable?: boolean;
    };
};

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;
            toolExposureMode: 'full' | 'search_and_run_only';
            accessAllTools: boolean;
            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' | 'dropbox' | 'onedrive' | 'asana' | 'linear' | 'outline' | 'salesforce' | 'web_crawler' | 'perforce';
        }>;
    };
};

export type ExportAgentResponse = ExportAgentResponses[keyof ExportAgentResponses];

export type GetAgentToolExclusionsData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/agents/{id}/tool-exclusions';
};

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

export type GetAgentToolExclusionsError = GetAgentToolExclusionsErrors[keyof GetAgentToolExclusionsErrors];

export type GetAgentToolExclusionsResponses = {
    /**
     * Default Response
     */
    200: {
        /**
         * Individual tool IDs excluded from the agent's surface
         */
        excludedToolIds: Array<string>;
    };
};

export type GetAgentToolExclusionsResponse = GetAgentToolExclusionsResponses[keyof GetAgentToolExclusionsResponses];

export type UpdateAgentToolExclusionsData = {
    body: {
        /**
         * Individual tool IDs excluded from the agent's surface
         */
        excludedToolIds: Array<string>;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/agents/{id}/tool-exclusions';
};

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

export type UpdateAgentToolExclusionsError = UpdateAgentToolExclusionsErrors[keyof UpdateAgentToolExclusionsErrors];

export type UpdateAgentToolExclusionsResponses = {
    /**
     * Default Response
     */
    200: {
        /**
         * Individual tool IDs excluded from the agent's surface
         */
        excludedToolIds: Array<string>;
    };
};

export type UpdateAgentToolExclusionsResponse = UpdateAgentToolExclusionsResponses[keyof UpdateAgentToolExclusionsResponses];

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

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

export type RestoreAgentError = RestoreAgentErrors[keyof RestoreAgentErrors];

export type RestoreAgentResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        authorId: string | null;
        scope: 'personal' | 'team' | 'org';
        name: string;
        slug: string | null;
        isDefault: boolean;
        isPersonalGateway: boolean;
        isPersonalProxy: 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;
        environmentId: string | null;
        passthroughHeaders: Array<string> | null;
        toolExposureMode: 'full' | 'search_and_run_only';
        accessAllTools: boolean;
        builtInAgentConfig: {
            name: 'policy-configuration-subagent';
            autoConfigureOnToolDiscovery: boolean;
        } | {
            name: 'dual-llm-main-agent';
            maxRounds: number;
        } | {
            name: 'dual-llm-quarantine-agent';
        } | {
            name: 'context-compaction-subagent';
        } | {
            name: 'chat-title-generation-subagent';
        } | {
            name: 'app-runtime-llm-agent';
        } | null;
        builtIn: boolean | null;
        createdAt: string;
        updatedAt: string;
        deletedAt: string | null;
        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;
            clonedPendingDiscovery: boolean;
            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;
        authorEmail?: string | null;
        knowledgeBaseIds: Array<string>;
        connectorIds: Array<string>;
        suggestedPrompts: Array<{
            summaryTitle: string;
            prompt: string;
        }>;
        resolvedLlmProvider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
        resolvedLlmModelName?: string | null;
        llmProviderRequiresPerUserCredential?: boolean;
        sandboxAvailable?: boolean;
    };
};

export type RestoreAgentResponse = RestoreAgentResponses[keyof RestoreAgentResponses];

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;
        clonedPendingDiscovery: boolean;
        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 AnthropicListModelsWithDefaultAgentData = {
    body?: never;
    headers?: {
        'x-api-key'?: string;
        authorization?: string;
        'anthropic-version'?: string;
    };
    path?: never;
    query?: never;
    url: '/v1/anthropic/v1/models';
};

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

export type AnthropicListModelsWithDefaultAgentError = AnthropicListModelsWithDefaultAgentErrors[keyof AnthropicListModelsWithDefaultAgentErrors];

export type AnthropicListModelsWithDefaultAgentResponses = {
    /**
     * Default Response
     */
    200: {
        data: Array<{
            type: 'model';
            id: string;
            display_name: string;
            created_at?: string;
        }>;
        has_more: boolean;
    };
};

export type AnthropicListModelsWithDefaultAgentResponse = AnthropicListModelsWithDefaultAgentResponses[keyof AnthropicListModelsWithDefaultAgentResponses];

export type AnthropicListModelsWithAgentData = {
    body?: never;
    headers?: {
        'x-api-key'?: string;
        authorization?: string;
        'anthropic-version'?: string;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/anthropic/{agentId}/v1/models';
};

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

export type AnthropicListModelsWithAgentError = AnthropicListModelsWithAgentErrors[keyof AnthropicListModelsWithAgentErrors];

export type AnthropicListModelsWithAgentResponses = {
    /**
     * Default Response
     */
    200: {
        data: Array<{
            type: 'model';
            id: string;
            display_name: string;
            created_at?: string;
        }>;
        has_more: boolean;
    };
};

export type AnthropicListModelsWithAgentResponse = AnthropicListModelsWithAgentResponses[keyof AnthropicListModelsWithAgentResponses];

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 GetAppsData = {
    body?: never;
    path?: never;
    query?: {
        limit?: number;
        offset?: number;
        search?: string;
    };
    url: '/api/apps';
};

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

export type GetAppsError = GetAppsErrors[keyof GetAppsErrors];

export type GetAppsResponses = {
    /**
     * Default Response
     */
    200: {
        data: Array<{
            name: string;
            description: string | null;
            executionModel: 'viewer-scoped' | 'server-scoped';
            cspOrigin: 'platform-pinned' | 'author-declared';
            pinnedAt: string | null;
            source: 'owned';
            id: string;
            scope: 'personal' | 'team' | 'org';
            authorId: string | null;
            latestVersion: number;
            teams: Array<{
                id: string;
                name: string;
            }>;
        } | {
            name: string;
            description: string | null;
            executionModel: 'viewer-scoped' | 'server-scoped';
            cspOrigin: 'platform-pinned' | 'author-declared';
            pinnedAt: string | null;
            source: 'external';
            catalogId: string;
            mcpServerId: string;
            scope: 'personal' | 'team' | 'org';
            resourceUri: string;
            icon: string | null;
        }>;
        pagination: {
            currentPage: number;
            limit: number;
            total: number;
            totalPages: number;
            hasNext: boolean;
            hasPrev: boolean;
        };
    };
};

export type GetAppsResponse = GetAppsResponses[keyof GetAppsResponses];

export type CreateAppData = {
    body: {
        name: string;
        description?: string;
        scope?: 'personal' | 'team' | 'org';
        html?: string;
        uiPermissions?: {
            camera?: {
                [key: string]: unknown;
            };
            microphone?: {
                [key: string]: unknown;
            };
            geolocation?: {
                [key: string]: unknown;
            };
            clipboardWrite?: {
                [key: string]: unknown;
            };
        };
        environmentId?: string | null;
        teamIds?: Array<string>;
        openInChat?: boolean;
    };
    path?: never;
    query?: never;
    url: '/api/apps';
};

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

export type CreateAppError = CreateAppErrors[keyof CreateAppErrors];

export type CreateAppResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        authorId: string | null;
        name: string;
        description: string | null;
        templateId: string | null;
        mcpServerId: string | null;
        spec: {
            summary: string;
            features: Array<string>;
            data?: string | null;
            ui?: string | null;
            tools: Array<string>;
        } | null;
        latestVersion: number;
        createdAt: string;
        updatedAt: string;
        deletedAt: string | null;
        scope: 'personal' | 'team' | 'org';
        environmentId: string | null;
        warnings?: Array<string>;
        conversationId?: string;
    };
};

export type CreateAppResponse = CreateAppResponses[keyof CreateAppResponses];

export type GetExternalAppData = {
    body?: never;
    path: {
        catalogId: string;
    };
    query?: never;
    url: '/api/apps/external/{catalogId}';
};

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

export type GetExternalAppError = GetExternalAppErrors[keyof GetExternalAppErrors];

export type GetExternalAppResponses = {
    /**
     * Default Response
     */
    200: {
        catalogId: string;
        name: string;
        description: string | null;
        resourceUri: string;
        resources: Array<{
            resourceUri: string;
            toolName: string;
            name: string;
        }>;
        defaultMcpServerId: string | null;
        installs: Array<{
            mcpServerId: string;
            scope: 'personal' | 'team' | 'org';
            ownerId: string | null;
            teamId: string | null;
            name: string;
            localInstallationStatus: string | null;
        }>;
    };
};

export type GetExternalAppResponse = GetExternalAppResponses[keyof GetExternalAppResponses];

export type GetAppTemplatesData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/app-templates';
};

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

export type GetAppTemplatesError = GetAppTemplatesErrors[keyof GetAppTemplatesErrors];

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

export type GetAppTemplatesResponse = GetAppTemplatesResponses[keyof GetAppTemplatesResponses];

export type OpenAppInChatData = {
    body?: never;
    path: {
        appId: string;
    };
    query?: never;
    url: '/api/apps/{appId}/open-in-chat';
};

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

export type OpenAppInChatError = OpenAppInChatErrors[keyof OpenAppInChatErrors];

export type OpenAppInChatResponses = {
    /**
     * Default Response
     */
    200: {
        conversationId: string;
    };
};

export type OpenAppInChatResponse = OpenAppInChatResponses[keyof OpenAppInChatResponses];

export type OpenExternalAppInChatData = {
    body: {
        resourceUri: string;
    };
    path: {
        mcpServerId: string;
    };
    query?: never;
    url: '/api/apps/external/{mcpServerId}/open-in-chat';
};

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

export type OpenExternalAppInChatError = OpenExternalAppInChatErrors[keyof OpenExternalAppInChatErrors];

export type OpenExternalAppInChatResponses = {
    /**
     * Default Response
     */
    200: {
        conversationId: string;
        mode: 'render' | 'prompt';
        prompt?: string;
    };
};

export type OpenExternalAppInChatResponse = OpenExternalAppInChatResponses[keyof OpenExternalAppInChatResponses];

export type UnpinAppData = {
    body?: never;
    path: {
        appId: string;
    };
    query?: never;
    url: '/api/apps/{appId}/pin';
};

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

export type UnpinAppError = UnpinAppErrors[keyof UnpinAppErrors];

export type UnpinAppResponses = {
    /**
     * Default Response
     */
    200: {
        ok: true;
    };
};

export type UnpinAppResponse = UnpinAppResponses[keyof UnpinAppResponses];

export type PinAppData = {
    body?: never;
    path: {
        appId: string;
    };
    query?: never;
    url: '/api/apps/{appId}/pin';
};

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

export type PinAppError = PinAppErrors[keyof PinAppErrors];

export type PinAppResponses = {
    /**
     * Default Response
     */
    200: {
        ok: true;
    };
};

export type PinAppResponse = PinAppResponses[keyof PinAppResponses];

export type UnpinExternalAppData = {
    body?: never;
    path: {
        mcpServerId: string;
    };
    query: {
        resourceUri: string;
    };
    url: '/api/apps/external/{mcpServerId}/pin';
};

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

export type UnpinExternalAppError = UnpinExternalAppErrors[keyof UnpinExternalAppErrors];

export type UnpinExternalAppResponses = {
    /**
     * Default Response
     */
    200: {
        ok: true;
    };
};

export type UnpinExternalAppResponse = UnpinExternalAppResponses[keyof UnpinExternalAppResponses];

export type PinExternalAppData = {
    body: {
        resourceUri: string;
    };
    path: {
        mcpServerId: string;
    };
    query?: never;
    url: '/api/apps/external/{mcpServerId}/pin';
};

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

export type PinExternalAppError = PinExternalAppErrors[keyof PinExternalAppErrors];

export type PinExternalAppResponses = {
    /**
     * Default Response
     */
    200: {
        ok: true;
    };
};

export type PinExternalAppResponse = PinExternalAppResponses[keyof PinExternalAppResponses];

export type DeleteAppData = {
    body?: never;
    path: {
        appId: string;
    };
    query?: never;
    url: '/api/apps/{appId}';
};

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

export type DeleteAppError = DeleteAppErrors[keyof DeleteAppErrors];

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

export type DeleteAppResponse = DeleteAppResponses[keyof DeleteAppResponses];

export type GetAppData = {
    body?: never;
    path: {
        appId: string;
    };
    query?: never;
    url: '/api/apps/{appId}';
};

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

export type GetAppError = GetAppErrors[keyof GetAppErrors];

export type GetAppResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        authorId: string | null;
        name: string;
        description: string | null;
        templateId: string | null;
        mcpServerId: string | null;
        spec: {
            summary: string;
            features: Array<string>;
            data?: string | null;
            ui?: string | null;
            tools: Array<string>;
        } | null;
        latestVersion: number;
        createdAt: string;
        updatedAt: string;
        deletedAt: string | null;
        scope: 'personal' | 'team' | 'org';
        environmentId: string | null;
        teams: Array<{
            id: string;
            name: string;
        }>;
    };
};

export type GetAppResponse = GetAppResponses[keyof GetAppResponses];

export type UpdateAppData = {
    body: {
        name?: string;
        description?: string | null;
        scope?: 'personal' | 'team' | 'org';
        html?: string;
        uiPermissions?: {
            camera?: {
                [key: string]: unknown;
            };
            microphone?: {
                [key: string]: unknown;
            };
            geolocation?: {
                [key: string]: unknown;
            };
            clipboardWrite?: {
                [key: string]: unknown;
            };
        };
        environmentId?: string | null;
        teamIds?: Array<string>;
    };
    path: {
        appId: string;
    };
    query?: never;
    url: '/api/apps/{appId}';
};

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

export type UpdateAppError = UpdateAppErrors[keyof UpdateAppErrors];

export type UpdateAppResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        authorId: string | null;
        name: string;
        description: string | null;
        templateId: string | null;
        mcpServerId: string | null;
        spec: {
            summary: string;
            features: Array<string>;
            data?: string | null;
            ui?: string | null;
            tools: Array<string>;
        } | null;
        latestVersion: number;
        createdAt: string;
        updatedAt: string;
        deletedAt: string | null;
        scope: 'personal' | 'team' | 'org';
        environmentId: string | null;
        warnings?: Array<string>;
    };
};

export type UpdateAppResponse = UpdateAppResponses[keyof UpdateAppResponses];

export type GetAppVersionsData = {
    body?: never;
    path: {
        appId: string;
    };
    query?: never;
    url: '/api/apps/{appId}/versions';
};

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

export type GetAppVersionsError = GetAppVersionsErrors[keyof GetAppVersionsErrors];

export type GetAppVersionsResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        appId: string | null;
        version: number;
        html: string;
        uiPermissions: {
            camera?: {
                [key: string]: never;
            };
            microphone?: {
                [key: string]: never;
            };
            geolocation?: {
                [key: string]: never;
            };
            clipboardWrite?: {
                [key: string]: never;
            };
        } | null;
        contentHash: string;
        spec: {
            summary: string;
            features: Array<string>;
            data?: string | null;
            ui?: string | null;
            tools: Array<string>;
        } | null;
        createdAt: string;
    }>;
};

export type GetAppVersionsResponse = GetAppVersionsResponses[keyof GetAppVersionsResponses];

export type GetAppVersionData = {
    body?: never;
    path: {
        appId: string;
        version: number;
    };
    query?: never;
    url: '/api/apps/{appId}/versions/{version}';
};

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

export type GetAppVersionError = GetAppVersionErrors[keyof GetAppVersionErrors];

export type GetAppVersionResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        appId: string | null;
        version: number;
        html: string;
        uiPermissions: {
            camera?: {
                [key: string]: never;
            };
            microphone?: {
                [key: string]: never;
            };
            geolocation?: {
                [key: string]: never;
            };
            clipboardWrite?: {
                [key: string]: never;
            };
        } | null;
        contentHash: string;
        spec: {
            summary: string;
            features: Array<string>;
            data?: string | null;
            ui?: string | null;
            tools: Array<string>;
        } | null;
        createdAt: string;
    };
};

export type GetAppVersionResponse = GetAppVersionResponses[keyof GetAppVersionResponses];

export type GetAppToolsData = {
    body?: never;
    path: {
        appId: string;
    };
    query?: never;
    url: '/api/apps/{appId}/tools';
};

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

export type GetAppToolsError = GetAppToolsErrors[keyof GetAppToolsErrors];

export type GetAppToolsResponses = {
    /**
     * 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;
        clonedPendingDiscovery: boolean;
        policiesAutoConfiguredAt: string | null;
        policiesAutoConfiguringStartedAt: string | null;
        policiesAutoConfiguredReasoning: string | null;
        policiesAutoConfiguredModel: string | null;
        createdAt: string;
        updatedAt: string;
    }>;
};

export type GetAppToolsResponse = GetAppToolsResponses[keyof GetAppToolsResponses];

export type PostAppRenderDiagnosticsData = {
    body: {
        version: number;
        entries: Array<{
            type: string;
            message: string;
        }>;
    };
    path: {
        appId: string;
    };
    query?: never;
    url: '/api/apps/{appId}/diagnostics';
};

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

export type PostAppRenderDiagnosticsError = PostAppRenderDiagnosticsErrors[keyof PostAppRenderDiagnosticsErrors];

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

export type PostAppRenderDiagnosticsResponse = PostAppRenderDiagnosticsResponses[keyof PostAppRenderDiagnosticsResponses];

export type PostAppRenderScreenshotData = {
    body: {
        version: number;
        dataUrl: string;
    };
    path: {
        appId: string;
    };
    query?: never;
    url: '/api/apps/{appId}/screenshot';
};

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

export type PostAppRenderScreenshotError = PostAppRenderScreenshotErrors[keyof PostAppRenderScreenshotErrors];

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

export type PostAppRenderScreenshotResponse = PostAppRenderScreenshotResponses[keyof PostAppRenderScreenshotResponses];

export type UnassignToolFromAppData = {
    body?: never;
    path: {
        appId: string;
        toolId: string;
    };
    query?: never;
    url: '/api/apps/{appId}/tools/{toolId}';
};

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

export type UnassignToolFromAppError = UnassignToolFromAppErrors[keyof UnassignToolFromAppErrors];

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

export type UnassignToolFromAppResponse = UnassignToolFromAppResponses[keyof UnassignToolFromAppResponses];

export type AssignToolToAppData = {
    body: {
        mcpServerId?: string | null;
        credentialResolutionMode?: 'static' | 'dynamic' | 'enterprise_managed';
    };
    path: {
        appId: string;
        toolId: string;
    };
    query?: never;
    url: '/api/apps/{appId}/tools/{toolId}';
};

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

export type AssignToolToAppError = AssignToolToAppErrors[keyof AssignToolToAppErrors];

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

export type AssignToolToAppResponse = AssignToolToAppResponses[keyof AssignToolToAppResponses];

export type GetAuditLogsData = {
    body?: never;
    path?: never;
    query?: {
        /**
         * Filter events on or after this date (ISO 8601)
         */
        startDate?: string;
        /**
         * Filter events on or before this date (ISO 8601)
         */
        endDate?: string;
        /**
         * Filter by actor ID
         */
        actorId?: string;
        /**
         * Filter by action type (dotted name, e.g. agent.created)
         */
        action?: 'agent.created' | 'agent.updated' | 'agent.deleted' | 'agent.restored' | 'agentTool.created' | 'agentTool.updated' | 'agentTool.deleted' | 'agentTool.bulk_assigned' | 'apiKey.created' | 'apiKey.deleted' | 'app.created' | 'app.updated' | 'app.deleted' | 'chatOpsBinding.created' | 'chatOpsBinding.updated' | 'chatOpsBinding.deleted' | 'chatOpsBinding.refreshed' | 'chatOpsConfig.updated' | 'connector.created' | 'connector.updated' | 'connector.deleted' | 'defaultUserLimit.created' | 'defaultUserLimit.updated' | 'defaultUserLimit.deleted' | 'environment.created' | 'environment.updated' | 'environment.deleted' | 'githubAppConfig.created' | 'githubAppConfig.updated' | 'githubAppConfig.deleted' | 'identityProvider.created' | 'identityProvider.updated' | 'identityProvider.deleted' | 'internalMcpCatalog.created' | 'internalMcpCatalog.updated' | 'internalMcpCatalog.deleted' | 'invitation.created' | 'invitation.deleted' | 'knowledgeBase.created' | 'knowledgeBase.updated' | 'knowledgeBase.deleted' | 'limit.created' | 'limit.updated' | 'limit.deleted' | 'llmModel.updated' | 'llmModel.synced' | 'llmOauthClient.created' | 'llmOauthClient.updated' | 'llmOauthClient.deleted' | 'llmProviderApiKey.created' | 'llmProviderApiKey.deleted' | 'mcpServer.created' | 'mcpServer.updated' | 'mcpServer.deleted' | 'mcpServer.reinstalled' | 'mcpServerInstallationRequest.created' | 'mcpServerInstallationRequest.updated' | 'member.created' | 'member.role_updated' | 'member.deleted' | 'optimizationRule.created' | 'optimizationRule.updated' | 'optimizationRule.deleted' | 'organization.updated' | 'role.created' | 'role.updated' | 'role.deleted' | 'scheduleTrigger.created' | 'scheduleTrigger.updated' | 'scheduleTrigger.deleted' | 'serviceAccount.created' | 'serviceAccount.updated' | 'serviceAccount.deleted' | 'skill.created' | 'skill.updated' | 'skill.deleted' | 'skill.imported' | 'team.created' | 'team.updated' | 'team.deleted' | 'teamToken.rotated' | 'tool.deleted' | 'toolInvocationPolicy.created' | 'toolInvocationPolicy.updated' | 'toolInvocationPolicy.deleted' | 'toolInvocationPolicy.bulk_defaulted' | 'toolInvocationPolicy.auto_configured' | 'trustedDataPolicy.created' | 'trustedDataPolicy.updated' | 'trustedDataPolicy.deleted' | 'trustedDataPolicy.bulk_defaulted' | 'user.password_reset' | 'userToken.rotated' | 'virtualApiKey.created' | 'virtualApiKey.deleted' | 'auth.signed_in' | 'auth.signed_out' | 'auth.signed_up' | 'auth.sso_callback' | 'unknown.created' | 'unknown.updated' | 'unknown.deleted';
        /**
         * Filter by outcome (success, failure, or denied)
         */
        outcome?: 'success' | 'failure' | 'denied';
        /**
         * Filter by actor type (user, api_key, sso, or system)
         */
        actorType?: 'user' | 'api_key' | 'service_account' | 'system' | 'sso';
        /**
         * Filter by resource type (e.g. agent, role)
         */
        resourceType?: string;
        /**
         * Case-insensitive search across actor email, actor name, HTTP path, and resource ID
         */
        search?: string;
        sortDirection?: 'asc' | 'desc';
        limit?: number;
        offset?: number;
    };
    url: '/api/audit-logs';
};

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

export type GetAuditLogsError = GetAuditLogsErrors[keyof GetAuditLogsErrors];

export type GetAuditLogsResponses = {
    /**
     * Default Response
     */
    200: {
        data: Array<{
            id: string;
            eventSequence: number;
            organizationId: string;
            occurredAt: string;
            createdAt: string;
            actorId: string | null;
            actorType: 'user' | 'api_key' | 'service_account' | 'system' | 'sso';
            actorName: string | null;
            actorEmail: string | null;
            action: 'agent.created' | 'agent.updated' | 'agent.deleted' | 'agent.restored' | 'agentTool.created' | 'agentTool.updated' | 'agentTool.deleted' | 'agentTool.bulk_assigned' | 'apiKey.created' | 'apiKey.deleted' | 'app.created' | 'app.updated' | 'app.deleted' | 'chatOpsBinding.created' | 'chatOpsBinding.updated' | 'chatOpsBinding.deleted' | 'chatOpsBinding.refreshed' | 'chatOpsConfig.updated' | 'connector.created' | 'connector.updated' | 'connector.deleted' | 'defaultUserLimit.created' | 'defaultUserLimit.updated' | 'defaultUserLimit.deleted' | 'environment.created' | 'environment.updated' | 'environment.deleted' | 'githubAppConfig.created' | 'githubAppConfig.updated' | 'githubAppConfig.deleted' | 'identityProvider.created' | 'identityProvider.updated' | 'identityProvider.deleted' | 'internalMcpCatalog.created' | 'internalMcpCatalog.updated' | 'internalMcpCatalog.deleted' | 'invitation.created' | 'invitation.deleted' | 'knowledgeBase.created' | 'knowledgeBase.updated' | 'knowledgeBase.deleted' | 'limit.created' | 'limit.updated' | 'limit.deleted' | 'llmModel.updated' | 'llmModel.synced' | 'llmOauthClient.created' | 'llmOauthClient.updated' | 'llmOauthClient.deleted' | 'llmProviderApiKey.created' | 'llmProviderApiKey.deleted' | 'mcpServer.created' | 'mcpServer.updated' | 'mcpServer.deleted' | 'mcpServer.reinstalled' | 'mcpServerInstallationRequest.created' | 'mcpServerInstallationRequest.updated' | 'member.created' | 'member.role_updated' | 'member.deleted' | 'optimizationRule.created' | 'optimizationRule.updated' | 'optimizationRule.deleted' | 'organization.updated' | 'role.created' | 'role.updated' | 'role.deleted' | 'scheduleTrigger.created' | 'scheduleTrigger.updated' | 'scheduleTrigger.deleted' | 'serviceAccount.created' | 'serviceAccount.updated' | 'serviceAccount.deleted' | 'skill.created' | 'skill.updated' | 'skill.deleted' | 'skill.imported' | 'team.created' | 'team.updated' | 'team.deleted' | 'teamToken.rotated' | 'tool.deleted' | 'toolInvocationPolicy.created' | 'toolInvocationPolicy.updated' | 'toolInvocationPolicy.deleted' | 'toolInvocationPolicy.bulk_defaulted' | 'toolInvocationPolicy.auto_configured' | 'trustedDataPolicy.created' | 'trustedDataPolicy.updated' | 'trustedDataPolicy.deleted' | 'trustedDataPolicy.bulk_defaulted' | 'user.password_reset' | 'userToken.rotated' | 'virtualApiKey.created' | 'virtualApiKey.deleted' | 'auth.signed_in' | 'auth.signed_out' | 'auth.signed_up' | 'auth.sso_callback' | 'unknown.created' | 'unknown.updated' | 'unknown.deleted';
            outcome: 'success' | 'failure' | 'denied';
            resourceType: string | null;
            resourceId: string | null;
            before: {
                [key: string]: unknown;
            } | null;
            after: {
                [key: string]: unknown;
            } | null;
            httpMethod: string | null;
            httpPath: string | null;
            httpRoute: string | null;
            httpStatus: number | null;
            requestId: string | null;
            sourceIp: string | null;
            userAgent: string | null;
        }>;
        pagination: {
            currentPage: number;
            limit: number;
            total: number;
            totalPages: number;
            hasNext: boolean;
            hasPrev: boolean;
        };
    };
};

export type GetAuditLogsResponse = GetAuditLogsResponses[keyof GetAuditLogsResponses];

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 AzureEmbeddingsWithDefaultAgentData = {
    body: {
        model: string;
        input: string | Array<string>;
        dimensions?: number;
        encoding_format?: 'float' | 'base64';
    };
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path?: never;
    query?: never;
    url: '/v1/azure/embeddings';
};

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

export type AzureEmbeddingsWithDefaultAgentError = AzureEmbeddingsWithDefaultAgentErrors[keyof AzureEmbeddingsWithDefaultAgentErrors];

export type AzureEmbeddingsWithDefaultAgentResponses = {
    /**
     * Default Response
     */
    200: {
        object: 'list';
        data: Array<{
            object: 'embedding';
            embedding: Array<number>;
            index: number;
        }>;
        model: string;
        usage: {
            prompt_tokens: number;
            total_tokens: number;
        };
    };
};

export type AzureEmbeddingsWithDefaultAgentResponse = AzureEmbeddingsWithDefaultAgentResponses[keyof AzureEmbeddingsWithDefaultAgentResponses];

export type AzureEmbeddingsWithAgentData = {
    body: {
        model: string;
        input: string | Array<string>;
        dimensions?: number;
        encoding_format?: 'float' | 'base64';
    };
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/azure/{agentId}/embeddings';
};

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

export type AzureEmbeddingsWithAgentError = AzureEmbeddingsWithAgentErrors[keyof AzureEmbeddingsWithAgentErrors];

export type AzureEmbeddingsWithAgentResponses = {
    /**
     * Default Response
     */
    200: {
        object: 'list';
        data: Array<{
            object: 'embedding';
            embedding: Array<number>;
            index: number;
        }>;
        model: string;
        usage: {
            prompt_tokens: number;
            total_tokens: number;
        };
    };
};

export type AzureEmbeddingsWithAgentResponse = AzureEmbeddingsWithAgentResponses[keyof AzureEmbeddingsWithAgentResponses];

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' | string;
            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> | null;
                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' | string;
            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> | null;
                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';
                };
            } | {
                cachePoint: {
                    type: string;
                    ttl?: string;
                };
            } | {
                reasoningContent: {
                    reasoningText: {
                        text: string;
                        signature?: string;
                    };
                } | {
                    redactedReasoning: {
                        data: string;
                    };
                };
            }>;
        }>;
        system?: Array<{
            type: 'text';
            text: string;
        } | {
            text: string;
        } | {
            guardContent: {
                text: {
                    text: string;
                    qualifiers?: Array<'grounding_source' | 'query' | 'guard_content'>;
                };
            };
        } | {
            cachePoint: {
                type: string;
                ttl?: string;
            };
        } | {
            [key: string]: unknown;
        }>;
        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;
            cacheDetails?: Array<{
                ttl?: string;
                inputTokens?: 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';
                };
            } | {
                cachePoint: {
                    type: string;
                    ttl?: string;
                };
            } | {
                reasoningContent: {
                    reasoningText: {
                        text: string;
                        signature?: string;
                    };
                } | {
                    redactedReasoning: {
                        data: string;
                    };
                };
            }>;
        }>;
        system?: Array<{
            type: 'text';
            text: string;
        } | {
            text: string;
        } | {
            guardContent: {
                text: {
                    text: string;
                    qualifiers?: Array<'grounding_source' | 'query' | 'guard_content'>;
                };
            };
        } | {
            cachePoint: {
                type: string;
                ttl?: string;
            };
        } | {
            [key: string]: unknown;
        }>;
        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;
            cacheDetails?: Array<{
                ttl?: string;
                inputTokens?: 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';
                };
            } | {
                cachePoint: {
                    type: string;
                    ttl?: string;
                };
            } | {
                reasoningContent: {
                    reasoningText: {
                        text: string;
                        signature?: string;
                    };
                } | {
                    redactedReasoning: {
                        data: string;
                    };
                };
            }>;
        }>;
        system?: Array<{
            type: 'text';
            text: string;
        } | {
            text: string;
        } | {
            guardContent: {
                text: {
                    text: string;
                    qualifiers?: Array<'grounding_source' | 'query' | 'guard_content'>;
                };
            };
        } | {
            cachePoint: {
                type: string;
                ttl?: string;
            };
        } | {
            [key: string]: unknown;
        }>;
        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';
                };
            } | {
                cachePoint: {
                    type: string;
                    ttl?: string;
                };
            } | {
                reasoningContent: {
                    reasoningText: {
                        text: string;
                        signature?: string;
                    };
                } | {
                    redactedReasoning: {
                        data: string;
                    };
                };
            }>;
        }>;
        system?: Array<{
            type: 'text';
            text: string;
        } | {
            text: string;
        } | {
            guardContent: {
                text: {
                    text: string;
                    qualifiers?: Array<'grounding_source' | 'query' | 'guard_content'>;
                };
            };
        } | {
            cachePoint: {
                type: string;
                ttl?: string;
            };
        } | {
            [key: string]: unknown;
        }>;
        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';
                };
            } | {
                cachePoint: {
                    type: string;
                    ttl?: string;
                };
            } | {
                reasoningContent: {
                    reasoningText: {
                        text: string;
                        signature?: string;
                    };
                } | {
                    redactedReasoning: {
                        data: string;
                    };
                };
            }>;
        }>;
        system?: Array<{
            type: 'text';
            text: string;
        } | {
            text: string;
        } | {
            guardContent: {
                text: {
                    text: string;
                    qualifiers?: Array<'grounding_source' | 'query' | 'guard_content'>;
                };
            };
        } | {
            cachePoint: {
                type: string;
                ttl?: string;
            };
        } | {
            [key: string]: unknown;
        }>;
        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;
            cacheDetails?: Array<{
                ttl?: string;
                inputTokens?: 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';
                };
            } | {
                cachePoint: {
                    type: string;
                    ttl?: string;
                };
            } | {
                reasoningContent: {
                    reasoningText: {
                        text: string;
                        signature?: string;
                    };
                } | {
                    redactedReasoning: {
                        data: string;
                    };
                };
            }>;
        }>;
        system?: Array<{
            type: 'text';
            text: string;
        } | {
            text: string;
        } | {
            guardContent: {
                text: {
                    text: string;
                    qualifiers?: Array<'grounding_source' | 'query' | 'guard_content'>;
                };
            };
        } | {
            cachePoint: {
                type: string;
                ttl?: string;
            };
        } | {
            [key: string]: unknown;
        }>;
        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';
        temperature?: number;
    };
    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 ResolveChatMcpElicitationData = {
    body: {
        conversationId: string;
        action: 'accept' | 'decline' | 'cancel';
        content?: {
            [key: string]: string | number | boolean | Array<string>;
        };
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/chat/elicitation/{id}';
};

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

export type ResolveChatMcpElicitationError = ResolveChatMcpElicitationErrors[keyof ResolveChatMcpElicitationErrors];

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

export type ResolveChatMcpElicitationResponse = ResolveChatMcpElicitationResponses[keyof ResolveChatMcpElicitationResponses];

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 GetActiveChatRunData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/chat/conversations/{id}/active-run';
};

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

export type GetActiveChatRunError = GetActiveChatRunErrors[keyof GetActiveChatRunErrors];

export type GetActiveChatRunResponses = {
    /**
     * Default Response
     */
    200: unknown;
    /**
     * Default Response
     */
    204: void;
};

export type GetActiveChatRunResponse = GetActiveChatRunResponses[keyof GetActiveChatRunResponses];

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' | 'github-copilot';
        modelId: string | null;
        hasCustomToolSelection: boolean;
        hooksDebugEnabled: boolean;
        todoList: string | number | boolean | null | {
            [key: string]: unknown;
        } | Array<unknown> | null;
        artifact: string | null;
        projectId: string | null;
        origin: 'user' | 'schedule_trigger';
        pinnedAt: string | null;
        lastMessageAt: string;
        createdAt: string;
        updatedAt: string;
        agent: {
            id: string;
            name: string;
            systemPrompt: string | null;
            agentType: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
            toolExposureMode: 'full' | 'search_and_run_only';
            llmApiKeyId: string | null;
        } | null;
        share: {
            id: string;
            visibility: 'organization' | 'team' | 'user';
        } | null;
        projectName?: string | null;
        projectIcon?: string | null;
        unread?: boolean;
        messages: Array<unknown>;
        chatErrors: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                usageLimitExceeded?: boolean;
                usageLimitEntityType?: string;
                authAction?: {
                    provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    providerLabel: string;
                };
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    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;
        projectId?: 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' | 'github-copilot';
        modelId: string | null;
        hasCustomToolSelection: boolean;
        hooksDebugEnabled: boolean;
        todoList: string | number | boolean | null | {
            [key: string]: unknown;
        } | Array<unknown> | null;
        artifact: string | null;
        projectId: string | null;
        origin: 'user' | 'schedule_trigger';
        pinnedAt: string | null;
        lastMessageAt: string;
        createdAt: string;
        updatedAt: string;
        agent: {
            id: string;
            name: string;
            systemPrompt: string | null;
            agentType: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
            toolExposureMode: 'full' | 'search_and_run_only';
            llmApiKeyId: string | null;
        } | null;
        share: {
            id: string;
            visibility: 'organization' | 'team' | 'user';
        } | null;
        projectName?: string | null;
        projectIcon?: string | null;
        unread?: boolean;
        messages: Array<unknown>;
        chatErrors: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                usageLimitExceeded?: boolean;
                usageLimitEntityType?: string;
                authAction?: {
                    provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    providerLabel: string;
                };
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    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' | 'github-copilot';
        modelId: string | null;
        hasCustomToolSelection: boolean;
        hooksDebugEnabled: boolean;
        todoList: string | number | boolean | null | {
            [key: string]: unknown;
        } | Array<unknown> | null;
        artifact: string | null;
        projectId: string | null;
        origin: 'user' | 'schedule_trigger';
        pinnedAt: string | null;
        lastMessageAt: string;
        createdAt: string;
        updatedAt: string;
        agent: {
            id: string;
            name: string;
            systemPrompt: string | null;
            agentType: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
            toolExposureMode: 'full' | 'search_and_run_only';
            llmApiKeyId: string | null;
        } | null;
        share: {
            id: string;
            visibility: 'organization' | 'team' | 'user';
        } | null;
        projectName?: string | null;
        projectIcon?: string | null;
        unread?: boolean;
        messages: Array<unknown>;
        chatErrors: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                usageLimitExceeded?: boolean;
                usageLimitEntityType?: string;
                authAction?: {
                    provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    providerLabel: string;
                };
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    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' | 'github-copilot';
        modelId: string | null;
        hasCustomToolSelection: boolean;
        hooksDebugEnabled: boolean;
        todoList: string | number | boolean | null | {
            [key: string]: unknown;
        } | Array<unknown> | null;
        artifact: string | null;
        projectId: string | null;
        origin: 'user' | 'schedule_trigger';
        pinnedAt: string | null;
        lastMessageAt: string;
        createdAt: string;
        updatedAt: string;
        agent: {
            id: string;
            name: string;
            systemPrompt: string | null;
            agentType: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
            toolExposureMode: 'full' | 'search_and_run_only';
            llmApiKeyId: string | null;
        } | null;
        share: {
            id: string;
            visibility: 'organization' | 'team' | 'user';
        } | null;
        projectName?: string | null;
        projectIcon?: string | null;
        unread?: boolean;
        messages: Array<unknown>;
        chatErrors: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                usageLimitExceeded?: boolean;
                usageLimitEntityType?: string;
                authAction?: {
                    provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    providerLabel: string;
                };
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    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 SetConversationHooksDebugData = {
    body: {
        enabled: boolean;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/chat/conversations/{id}/hooks-debug';
};

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

export type SetConversationHooksDebugError = SetConversationHooksDebugErrors[keyof SetConversationHooksDebugErrors];

export type SetConversationHooksDebugResponses = {
    /**
     * Default Response
     */
    200: {
        hooksDebugEnabled: boolean;
    };
};

export type SetConversationHooksDebugResponse = SetConversationHooksDebugResponses[keyof SetConversationHooksDebugResponses];

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

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

export type MarkChatConversationReadError = MarkChatConversationReadErrors[keyof MarkChatConversationReadErrors];

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

export type MarkChatConversationReadResponse = MarkChatConversationReadResponses[keyof MarkChatConversationReadResponses];

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

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

export type GetChatConversationFilesError = GetChatConversationFilesErrors[keyof GetChatConversationFilesErrors];

export type GetChatConversationFilesResponses = {
    /**
     * Default Response
     */
    200: {
        generated: Array<{
            id: string;
            name: string;
            mimeType: string;
            contentUrl: string;
            createdAt: string;
        }>;
        attachments: Array<{
            id: string;
            name: string;
            mimeType: string;
            contentUrl: string;
            createdAt: string;
        }>;
        projectFiles: Array<{
            id: string;
            name: string;
            mimeType: string;
            contentUrl: string;
            createdAt: string;
        }>;
        projectName: string | null;
        canManageFiles: boolean;
    };
};

export type GetChatConversationFilesResponse = GetChatConversationFilesResponses[keyof GetChatConversationFilesResponses];

export type GetChatAttachmentContentData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/chat/attachments/{id}/content';
};

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

export type GetChatAttachmentContentError = GetChatAttachmentContentErrors[keyof GetChatAttachmentContentErrors];

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

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

export type DeleteChatAttachmentError = DeleteChatAttachmentErrors[keyof DeleteChatAttachmentErrors];

export type DeleteChatAttachmentResponses = {
    /**
     * Default Response
     */
    200: {
        ok: true;
    };
};

export type DeleteChatAttachmentResponse = DeleteChatAttachmentResponses[keyof DeleteChatAttachmentResponses];

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' | 'github-copilot';
        modelId: string | null;
        hasCustomToolSelection: boolean;
        hooksDebugEnabled: boolean;
        todoList: string | number | boolean | null | {
            [key: string]: unknown;
        } | Array<unknown> | null;
        artifact: string | null;
        projectId: string | null;
        origin: 'user' | 'schedule_trigger';
        pinnedAt: string | null;
        lastMessageAt: string;
        createdAt: string;
        updatedAt: string;
        agent: {
            id: string;
            name: string;
            systemPrompt: string | null;
            agentType: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
            toolExposureMode: 'full' | 'search_and_run_only';
            llmApiKeyId: string | null;
        } | null;
        share: {
            id: string;
            visibility: 'organization' | 'team' | 'user';
        } | null;
        projectName?: string | null;
        projectIcon?: string | null;
        unread?: boolean;
        messages: Array<unknown>;
        chatErrors: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                usageLimitExceeded?: boolean;
                usageLimitEntityType?: string;
                authAction?: {
                    provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    providerLabel: string;
                };
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    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 ClearChatConversationErrorsData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/chat/conversations/{id}/chat-errors';
};

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

export type ClearChatConversationErrorsError = ClearChatConversationErrorsErrors[keyof ClearChatConversationErrorsErrors];

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

export type ClearChatConversationErrorsResponse = ClearChatConversationErrorsResponses[keyof ClearChatConversationErrorsResponses];

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' | 'github-copilot';
            modelId: string | null;
            hasCustomToolSelection: boolean;
            hooksDebugEnabled: boolean;
            todoList: string | number | boolean | null | {
                [key: string]: unknown;
            } | Array<unknown> | null;
            artifact: string | null;
            projectId: string | null;
            origin: 'user' | 'schedule_trigger';
            pinnedAt: string | null;
            lastMessageAt: string;
            createdAt: string;
            updatedAt: string;
            agent: {
                id: string;
                name: string;
                systemPrompt: string | null;
                agentType: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
                toolExposureMode: 'full' | 'search_and_run_only';
                llmApiKeyId: string | null;
            } | null;
            share: {
                id: string;
                visibility: 'organization' | 'team' | 'user';
            } | null;
            projectName?: string | null;
            projectIcon?: string | null;
            unread?: boolean;
            messages: Array<unknown>;
            chatErrors: Array<{
                id: string;
                conversationId: string;
                error: {
                    code: 'rate_limit' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    usageLimitExceeded?: boolean;
                    usageLimitEntityType?: string;
                    authAction?: {
                        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        providerLabel: string;
                    };
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        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' | 'github-copilot';
        modelId: string | null;
        hasCustomToolSelection: boolean;
        hooksDebugEnabled: boolean;
        todoList: string | number | boolean | null | {
            [key: string]: unknown;
        } | Array<unknown> | null;
        artifact: string | null;
        projectId: string | null;
        origin: 'user' | 'schedule_trigger';
        pinnedAt: string | null;
        lastMessageAt: string;
        createdAt: string;
        updatedAt: string;
        agent: {
            id: string;
            name: string;
            systemPrompt: string | null;
            agentType: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
            toolExposureMode: 'full' | 'search_and_run_only';
            llmApiKeyId: string | null;
        } | null;
        share: {
            id: string;
            visibility: 'organization' | 'team' | 'user';
        } | null;
        projectName?: string | null;
        projectIcon?: string | null;
        unread?: boolean;
        messages: Array<unknown>;
        chatErrors: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                usageLimitExceeded?: boolean;
                usageLimitEntityType?: string;
                authAction?: {
                    provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    providerLabel: string;
                };
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    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' | 'github-copilot';
        modelId: string | null;
        hasCustomToolSelection: boolean;
        hooksDebugEnabled: boolean;
        todoList: string | number | boolean | null | {
            [key: string]: unknown;
        } | Array<unknown> | null;
        artifact: string | null;
        projectId: string | null;
        origin: 'user' | 'schedule_trigger';
        pinnedAt: string | null;
        lastMessageAt: string;
        createdAt: string;
        updatedAt: string;
        agent: {
            id: string;
            name: string;
            systemPrompt: string | null;
            agentType: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
            toolExposureMode: 'full' | 'search_and_run_only';
            llmApiKeyId: string | null;
        } | null;
        share: {
            id: string;
            visibility: 'organization' | 'team' | 'user';
        } | null;
        projectName?: string | null;
        projectIcon?: string | null;
        unread?: boolean;
        messages: Array<unknown>;
        chatErrors: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                usageLimitExceeded?: boolean;
                usageLimitEntityType?: string;
                authAction?: {
                    provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    providerLabel: string;
                };
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    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' | 'github-copilot';
        modelId: string | null;
        hasCustomToolSelection: boolean;
        hooksDebugEnabled: boolean;
        todoList: string | number | boolean | null | {
            [key: string]: unknown;
        } | Array<unknown> | null;
        artifact: string | null;
        projectId: string | null;
        origin: 'user' | 'schedule_trigger';
        pinnedAt: string | null;
        lastMessageAt: string;
        createdAt: string;
        updatedAt: string;
        agent: {
            id: string;
            name: string;
            systemPrompt: string | null;
            agentType: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
            toolExposureMode: 'full' | 'search_and_run_only';
            llmApiKeyId: string | null;
        } | null;
        share: {
            id: string;
            visibility: 'organization' | 'team' | 'user';
        } | null;
        projectName?: string | null;
        projectIcon?: string | null;
        unread?: boolean;
        messages: Array<unknown>;
        chatErrors: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                usageLimitExceeded?: boolean;
                usageLimitEntityType?: string;
                authAction?: {
                    provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    providerLabel: string;
                };
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    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' | 'github-copilot';
        modelId: string | null;
        hasCustomToolSelection: boolean;
        hooksDebugEnabled: boolean;
        todoList: string | number | boolean | null | {
            [key: string]: unknown;
        } | Array<unknown> | null;
        artifact: string | null;
        projectId: string | null;
        origin: 'user' | 'schedule_trigger';
        pinnedAt: string | null;
        lastMessageAt: string;
        createdAt: string;
        updatedAt: string;
        agent: {
            id: string;
            name: string;
            systemPrompt: string | null;
            agentType: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
            toolExposureMode: 'full' | 'search_and_run_only';
            llmApiKeyId: string | null;
        } | null;
        share: {
            id: string;
            visibility: 'organization' | 'team' | 'user';
        } | null;
        projectName?: string | null;
        projectIcon?: string | null;
        unread?: boolean;
        messages: Array<unknown>;
        chatErrors: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                usageLimitExceeded?: boolean;
                usageLimitEntityType?: string;
                authAction?: {
                    provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    providerLabel: string;
                };
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    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 DisconnectNgrokData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/chatops/config/ngrok';
};

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

export type DisconnectNgrokError = DisconnectNgrokErrors[keyof DisconnectNgrokErrors];

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

export type DisconnectNgrokResponse = DisconnectNgrokResponses[keyof DisconnectNgrokResponses];

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

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

export type GetNgrokConfigError = GetNgrokConfigErrors[keyof GetNgrokConfigErrors];

export type GetNgrokConfigResponses = {
    /**
     * Default Response
     */
    200: {
        hasAuthToken: boolean;
        domain: string;
    };
};

export type GetNgrokConfigResponse = GetNgrokConfigResponses[keyof GetNgrokConfigResponses];

export type ConnectNgrokData = {
    body: {
        authToken?: string;
        domain?: string;
    };
    path?: never;
    query?: never;
    url: '/api/chatops/config/ngrok';
};

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

export type ConnectNgrokError = ConnectNgrokErrors[keyof ConnectNgrokErrors];

export type ConnectNgrokResponses = {
    /**
     * Default Response
     */
    200: {
        success: boolean;
        domain: string;
    };
};

export type ConnectNgrokResponse = ConnectNgrokResponses[keyof ConnectNgrokResponses];

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;
        devAutoLoginEnabled: boolean;
        maintenanceMode: string | null;
        siteNotificationMessage: string | null;
        enterpriseCoreActive: boolean;
        analytics: {
            enabled: boolean;
            instanceId: string | null;
            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;
        };
        smallTeamTier: {
            threshold: number;
            userCount: number;
            smallTeam: boolean;
            envFlag: boolean;
            communicate: boolean;
        };
        features: {
            betaEnabled: boolean;
            orchestratorK8sRuntime: boolean;
            sandbox: boolean;
            sandboxArtifactBytesLimit: number;
            byosEnabled: boolean;
            byosVaultKvVersion: '1' | '2';
            azureOpenAiEntraIdEnabled: boolean;
            anthropicWifEnabled: boolean;
            bedrockIamAuthEnabled: boolean;
            geminiVertexAiEnabled: boolean;
            incomingEmail: {
                enabled: boolean;
                provider?: 'outlook';
                displayName?: string;
                emailDomain?: string;
            };
            mcpServerBaseImage: string;
            orchestratorK8sNamespace: string;
            environmentNamespaces: Array<string>;
            isQuickstart: boolean;
            ngrokDomain: string;
            virtualKeyDefaultExpirationSeconds: number;
            mcpSandboxDomain: string | null;
            maintenanceMode: string | null;
            chatSecretScanEnabled: boolean;
            agentHooksEnabled: boolean;
        };
        providerBaseUrls: {
            [key: string]: string | null;
        };
    };
};

export type GetConfigResponse = GetConfigResponses[keyof GetConfigResponses];

export type CreateConnectionSetupData = {
    body: {
        clientId: 'claude-code' | 'codex' | 'copilot-cli' | 'cursor';
        platform?: 'macos' | 'linux' | 'windows';
        baseUrl: string;
        mcpGatewayId?: string;
        llmProxyId?: string;
        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
        proxyAuth?: 'provider-key' | 'virtual-key';
        attributePassthrough?: boolean;
        skills?: {
            skillIds: Array<string>;
            ttlDays: number | null;
        };
    };
    path?: never;
    query?: never;
    url: '/api/connection-setups';
};

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

export type CreateConnectionSetupError = CreateConnectionSetupErrors[keyof CreateConnectionSetupErrors];

export type CreateConnectionSetupResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        command: string;
        expiresAt: string;
        tokenStart: string;
    };
};

export type CreateConnectionSetupResponse = CreateConnectionSetupResponses[keyof CreateConnectionSetupResponses];

export type CreateConnectionVirtualKeyData = {
    body: {
        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
    };
    path?: never;
    query?: never;
    url: '/api/connection-setups/virtual-key';
};

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

export type CreateConnectionVirtualKeyError = CreateConnectionVirtualKeyErrors[keyof CreateConnectionVirtualKeyErrors];

export type CreateConnectionVirtualKeyResponses = {
    /**
     * Default Response
     */
    200: {
        value: string;
        name: string;
    };
};

export type CreateConnectionVirtualKeyResponse = CreateConnectionVirtualKeyResponses[keyof CreateConnectionVirtualKeyResponses];

export type CreateConnectionPassthroughKeyData = {
    body: {
        llmProxyId: string;
    };
    path?: never;
    query?: never;
    url: '/api/connection-setups/passthrough-key';
};

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

export type CreateConnectionPassthroughKeyError = CreateConnectionPassthroughKeyErrors[keyof CreateConnectionPassthroughKeyErrors];

export type CreateConnectionPassthroughKeyResponses = {
    /**
     * Default Response
     */
    200: {
        value: string;
        name: string;
    };
};

export type CreateConnectionPassthroughKeyResponse = CreateConnectionPassthroughKeyResponses[keyof CreateConnectionPassthroughKeyResponses];

export type GetConnectionSetupScriptData = {
    body?: never;
    path: {
        token: string;
    };
    query?: never;
    url: '/api/connection-setups/script/{token}';
};

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

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 ListDefaultUserLimitsData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/default-user-limits';
};

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

export type ListDefaultUserLimitsError = ListDefaultUserLimitsErrors[keyof ListDefaultUserLimitsErrors];

export type ListDefaultUserLimitsResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        organizationId: string;
        environmentId: string | null;
        limitValue: number;
        model?: Array<string> | null;
        cleanupInterval: '1h' | '12h' | '24h' | '1w' | '1m' | 'calendar_day' | 'calendar_week_sunday' | 'calendar_week_monday' | 'calendar_month';
        createdAt: string;
        updatedAt: string;
    }>;
};

export type ListDefaultUserLimitsResponse = ListDefaultUserLimitsResponses[keyof ListDefaultUserLimitsResponses];

export type CreateDefaultUserLimitData = {
    body: {
        environmentId?: string | null;
        limitValue: number;
        model?: Array<string> | null;
        cleanupInterval?: '1h' | '12h' | '24h' | '1w' | '1m' | 'calendar_day' | 'calendar_week_sunday' | 'calendar_week_monday' | 'calendar_month';
    };
    path?: never;
    query?: never;
    url: '/api/default-user-limits';
};

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

export type CreateDefaultUserLimitError = CreateDefaultUserLimitErrors[keyof CreateDefaultUserLimitErrors];

export type CreateDefaultUserLimitResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        environmentId: string | null;
        limitValue: number;
        model?: Array<string> | null;
        cleanupInterval: '1h' | '12h' | '24h' | '1w' | '1m' | 'calendar_day' | 'calendar_week_sunday' | 'calendar_week_monday' | 'calendar_month';
        createdAt: string;
        updatedAt: string;
    };
};

export type CreateDefaultUserLimitResponse = CreateDefaultUserLimitResponses[keyof CreateDefaultUserLimitResponses];

export type DeleteDefaultUserLimitData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/default-user-limits/{id}';
};

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

export type DeleteDefaultUserLimitError = DeleteDefaultUserLimitErrors[keyof DeleteDefaultUserLimitErrors];

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

export type DeleteDefaultUserLimitResponse = DeleteDefaultUserLimitResponses[keyof DeleteDefaultUserLimitResponses];

export type UpdateDefaultUserLimitData = {
    body: {
        limitValue?: number;
        model?: Array<string> | null;
        cleanupInterval?: '1h' | '12h' | '24h' | '1w' | '1m' | 'calendar_day' | 'calendar_week_sunday' | 'calendar_week_monday' | 'calendar_month';
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/default-user-limits/{id}';
};

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

export type UpdateDefaultUserLimitError = UpdateDefaultUserLimitErrors[keyof UpdateDefaultUserLimitErrors];

export type UpdateDefaultUserLimitResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        environmentId: string | null;
        limitValue: number;
        model?: Array<string> | null;
        cleanupInterval: '1h' | '12h' | '24h' | '1w' | '1m' | 'calendar_day' | 'calendar_week_sunday' | 'calendar_week_monday' | 'calendar_month';
        createdAt: string;
        updatedAt: string;
    };
};

export type UpdateDefaultUserLimitResponse = UpdateDefaultUserLimitResponses[keyof UpdateDefaultUserLimitResponses];

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

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

export type ListEnvironmentsError = ListEnvironmentsErrors[keyof ListEnvironmentsErrors];

export type ListEnvironmentsResponses = {
    /**
     * Default Response
     */
    200: {
        environments: Array<{
            id: string;
            organizationId: string;
            name: string;
            description: string | null;
            namespace: string | null;
            networkPolicy: {
                egressMode: 'off' | 'restricted' | 'unrestricted';
                domainPreset: 'none' | 'common_dependencies' | 'package_managers';
                allowedDomains: Array<string>;
                allowedCidrs: Array<string>;
            } | null;
            validationRegex: string | null;
            trustedImageRegistries: Array<string> | null;
            restricted: boolean;
            sortOrder: number;
            createdAt: string;
            updatedAt: string;
            assignedCatalogCount: number;
        }>;
        defaultAssignedCatalogCount: number;
    };
};

export type ListEnvironmentsResponse = ListEnvironmentsResponses[keyof ListEnvironmentsResponses];

export type CreateEnvironmentData = {
    body: {
        name: string;
        description?: string | null;
        namespace?: string | null;
        networkPolicy?: {
            egressMode?: 'off' | 'restricted' | 'unrestricted';
            domainPreset?: 'none' | 'common_dependencies' | 'package_managers';
            allowedDomains?: Array<string>;
            allowedCidrs?: Array<string>;
        } | null;
        restricted?: boolean;
        validationRegex?: string | null;
        trustedImageRegistries?: Array<string> | null;
    };
    path?: never;
    query?: never;
    url: '/api/environments';
};

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

export type CreateEnvironmentError = CreateEnvironmentErrors[keyof CreateEnvironmentErrors];

export type CreateEnvironmentResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        name: string;
        description: string | null;
        namespace: string | null;
        networkPolicy: {
            egressMode: 'off' | 'restricted' | 'unrestricted';
            domainPreset: 'none' | 'common_dependencies' | 'package_managers';
            allowedDomains: Array<string>;
            allowedCidrs: Array<string>;
        } | null;
        validationRegex: string | null;
        trustedImageRegistries: Array<string> | null;
        restricted: boolean;
        sortOrder: number;
        createdAt: string;
        updatedAt: string;
    };
};

export type CreateEnvironmentResponse = CreateEnvironmentResponses[keyof CreateEnvironmentResponses];

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

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

export type DeleteEnvironmentError = DeleteEnvironmentErrors[keyof DeleteEnvironmentErrors];

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

export type DeleteEnvironmentResponse = DeleteEnvironmentResponses[keyof DeleteEnvironmentResponses];

export type UpdateEnvironmentData = {
    body: {
        name?: string;
        description?: string | null;
        namespace?: string | null;
        networkPolicy?: {
            egressMode?: 'off' | 'restricted' | 'unrestricted';
            domainPreset?: 'none' | 'common_dependencies' | 'package_managers';
            allowedDomains?: Array<string>;
            allowedCidrs?: Array<string>;
        } | null;
        restricted?: boolean;
        validationRegex?: string | null;
        trustedImageRegistries?: Array<string> | null;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/environments/{id}';
};

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

export type UpdateEnvironmentError = UpdateEnvironmentErrors[keyof UpdateEnvironmentErrors];

export type UpdateEnvironmentResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        name: string;
        description: string | null;
        namespace: string | null;
        networkPolicy: {
            egressMode: 'off' | 'restricted' | 'unrestricted';
            domainPreset: 'none' | 'common_dependencies' | 'package_managers';
            allowedDomains: Array<string>;
            allowedCidrs: Array<string>;
        } | null;
        validationRegex: string | null;
        trustedImageRegistries: Array<string> | null;
        restricted: boolean;
        sortOrder: number;
        createdAt: string;
        updatedAt: string;
    };
};

export type UpdateEnvironmentResponse = UpdateEnvironmentResponses[keyof UpdateEnvironmentResponses];

export type GeminiEmbeddingsWithDefaultAgentData = {
    body: {
        model: string;
        input: string | Array<string>;
        dimensions?: number;
        encoding_format?: 'float' | 'base64';
    };
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path?: never;
    query?: never;
    url: '/v1/gemini/embeddings';
};

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

export type GeminiEmbeddingsWithDefaultAgentError = GeminiEmbeddingsWithDefaultAgentErrors[keyof GeminiEmbeddingsWithDefaultAgentErrors];

export type GeminiEmbeddingsWithDefaultAgentResponses = {
    /**
     * Default Response
     */
    200: {
        object: 'list';
        data: Array<{
            object: 'embedding';
            embedding: Array<number>;
            index: number;
        }>;
        model: string;
        usage: {
            prompt_tokens: number;
            total_tokens: number;
        };
    };
};

export type GeminiEmbeddingsWithDefaultAgentResponse = GeminiEmbeddingsWithDefaultAgentResponses[keyof GeminiEmbeddingsWithDefaultAgentResponses];

export type GeminiEmbeddingsWithAgentData = {
    body: {
        model: string;
        input: string | Array<string>;
        dimensions?: number;
        encoding_format?: 'float' | 'base64';
    };
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/gemini/{agentId}/embeddings';
};

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

export type GeminiEmbeddingsWithAgentError = GeminiEmbeddingsWithAgentErrors[keyof GeminiEmbeddingsWithAgentErrors];

export type GeminiEmbeddingsWithAgentResponses = {
    /**
     * Default Response
     */
    200: {
        object: 'list';
        data: Array<{
            object: 'embedding';
            embedding: Array<number>;
            index: number;
        }>;
        model: string;
        usage: {
            prompt_tokens: number;
            total_tokens: number;
        };
    };
};

export type GeminiEmbeddingsWithAgentResponse = GeminiEmbeddingsWithAgentResponses[keyof GeminiEmbeddingsWithAgentResponses];

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 ListGithubAppConfigsData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/github-app-configs';
};

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

export type ListGithubAppConfigsError = ListGithubAppConfigsErrors[keyof ListGithubAppConfigsErrors];

export type ListGithubAppConfigsResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        organizationId: string;
        name: string;
        githubUrl: string;
        appId: string;
        installationId: string;
        createdAt: string;
        updatedAt: string;
    }>;
};

export type ListGithubAppConfigsResponse = ListGithubAppConfigsResponses[keyof ListGithubAppConfigsResponses];

export type CreateGithubAppConfigData = {
    body: {
        name: string;
        githubUrl?: string;
        appId: string;
        installationId: string;
        /**
         * GitHub App private key PEM
         */
        privateKey: string;
    };
    path?: never;
    query?: never;
    url: '/api/github-app-configs';
};

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

export type CreateGithubAppConfigError = CreateGithubAppConfigErrors[keyof CreateGithubAppConfigErrors];

export type CreateGithubAppConfigResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        name: string;
        githubUrl: string;
        appId: string;
        installationId: string;
        createdAt: string;
        updatedAt: string;
    };
};

export type CreateGithubAppConfigResponse = CreateGithubAppConfigResponses[keyof CreateGithubAppConfigResponses];

export type DeleteGithubAppConfigData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/github-app-configs/{id}';
};

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

export type DeleteGithubAppConfigError = DeleteGithubAppConfigErrors[keyof DeleteGithubAppConfigErrors];

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

export type DeleteGithubAppConfigResponse = DeleteGithubAppConfigResponses[keyof DeleteGithubAppConfigResponses];

export type GetGithubAppConfigData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/github-app-configs/{id}';
};

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

export type GetGithubAppConfigError = GetGithubAppConfigErrors[keyof GetGithubAppConfigErrors];

export type GetGithubAppConfigResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        name: string;
        githubUrl: string;
        appId: string;
        installationId: string;
        createdAt: string;
        updatedAt: string;
    };
};

export type GetGithubAppConfigResponse = GetGithubAppConfigResponses[keyof GetGithubAppConfigResponses];

export type UpdateGithubAppConfigData = {
    body: {
        name?: string;
        githubUrl?: string;
        appId?: string;
        installationId?: string;
        /**
         * GitHub App private key PEM
         */
        privateKey?: string;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/github-app-configs/{id}';
};

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

export type UpdateGithubAppConfigError = UpdateGithubAppConfigErrors[keyof UpdateGithubAppConfigErrors];

export type UpdateGithubAppConfigResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        name: string;
        githubUrl: string;
        appId: string;
        installationId: string;
        createdAt: string;
        updatedAt: string;
    };
};

export type UpdateGithubAppConfigResponse = UpdateGithubAppConfigResponses[keyof UpdateGithubAppConfigResponses];

export type GithubCopilotDeviceAuthStartData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/github-copilot-auth/device/start';
};

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

export type GithubCopilotDeviceAuthStartError = GithubCopilotDeviceAuthStartErrors[keyof GithubCopilotDeviceAuthStartErrors];

export type GithubCopilotDeviceAuthStartResponses = {
    /**
     * Default Response
     */
    200: {
        deviceCode: string;
        userCode: string;
        verificationUri: string;
        interval: number;
        expiresIn: number;
    };
};

export type GithubCopilotDeviceAuthStartResponse = GithubCopilotDeviceAuthStartResponses[keyof GithubCopilotDeviceAuthStartResponses];

export type GithubCopilotDeviceAuthPollData = {
    body: {
        deviceCode: string;
    };
    path?: never;
    query?: never;
    url: '/api/github-copilot-auth/device/poll';
};

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

export type GithubCopilotDeviceAuthPollError = GithubCopilotDeviceAuthPollErrors[keyof GithubCopilotDeviceAuthPollErrors];

export type GithubCopilotDeviceAuthPollResponses = {
    /**
     * Default Response
     */
    200: {
        status: 'pending';
    } | {
        status: 'slow_down';
    } | {
        status: 'complete';
        accessToken: string;
    };
};

export type GithubCopilotDeviceAuthPollResponse = GithubCopilotDeviceAuthPollResponses[keyof GithubCopilotDeviceAuthPollResponses];

export type GithubCopilotChatCompletionsWithDefaultAgentData = {
    body: {
        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;
    };
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path?: never;
    query?: never;
    url: '/v1/github-copilot/chat/completions';
};

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

export type GithubCopilotChatCompletionsWithDefaultAgentError = GithubCopilotChatCompletionsWithDefaultAgentErrors[keyof GithubCopilotChatCompletionsWithDefaultAgentErrors];

export type GithubCopilotChatCompletionsWithDefaultAgentResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        choices: Array<{
            finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call' | string;
            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> | null;
                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?: string;
        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 GithubCopilotChatCompletionsWithDefaultAgentResponse = GithubCopilotChatCompletionsWithDefaultAgentResponses[keyof GithubCopilotChatCompletionsWithDefaultAgentResponses];

export type GithubCopilotChatCompletionsWithAgentData = {
    body: {
        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;
    };
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/github-copilot/{agentId}/chat/completions';
};

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

export type GithubCopilotChatCompletionsWithAgentError = GithubCopilotChatCompletionsWithAgentErrors[keyof GithubCopilotChatCompletionsWithAgentErrors];

export type GithubCopilotChatCompletionsWithAgentResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        choices: Array<{
            finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call' | string;
            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> | null;
                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?: string;
        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 GithubCopilotChatCompletionsWithAgentResponse = GithubCopilotChatCompletionsWithAgentResponses[keyof GithubCopilotChatCompletionsWithAgentResponses];

export type GithubCopilotListModelsWithDefaultAgentData = {
    body?: never;
    headers?: {
        authorization?: string;
    };
    path?: never;
    query?: never;
    url: '/v1/github-copilot/models';
};

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

export type GithubCopilotListModelsWithDefaultAgentError = GithubCopilotListModelsWithDefaultAgentErrors[keyof GithubCopilotListModelsWithDefaultAgentErrors];

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

export type GithubCopilotListModelsWithDefaultAgentResponse = GithubCopilotListModelsWithDefaultAgentResponses[keyof GithubCopilotListModelsWithDefaultAgentResponses];

export type GithubCopilotListModelsWithAgentData = {
    body?: never;
    headers?: {
        authorization?: string;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/github-copilot/{agentId}/models';
};

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

export type GithubCopilotListModelsWithAgentError = GithubCopilotListModelsWithAgentErrors[keyof GithubCopilotListModelsWithAgentErrors];

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

export type GithubCopilotListModelsWithAgentResponse = GithubCopilotListModelsWithAgentResponses[keyof GithubCopilotListModelsWithAgentResponses];

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: 'ok';
        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: 'degraded';
        version: string;
        database: 'disconnected';
    };
};

export type GetReadyError = GetReadyErrors[keyof GetReadyErrors];

export type GetReadyResponses = {
    /**
     * Default Response
     */
    200: {
        name: string;
        status: 'ok' | 'maintenance';
        version: string;
        database: 'connected' | 'not_checked';
        sandbox: 'ready' | 'initializing' | 'disabled' | 'unreachable';
        sandboxReason?: string;
    };
};

export type GetReadyResponse = GetReadyResponses[keyof GetReadyResponses];

export type GetHooksData = {
    body?: never;
    path?: never;
    query: {
        agentId: string;
    };
    url: '/api/hooks';
};

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

export type GetHooksError = GetHooksErrors[keyof GetHooksErrors];

export type GetHooksResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        organizationId: string;
        agentId: string;
        event: 'session_start' | 'pre_tool_use' | 'post_tool_use';
        fileName: string;
        content: string;
        requirements: Array<string>;
        enabled: boolean;
        createdAt: string;
        updatedAt: string;
    }>;
};

export type GetHooksResponse = GetHooksResponses[keyof GetHooksResponses];

export type CreateHookData = {
    body: {
        agentId: string;
        event: 'session_start' | 'pre_tool_use' | 'post_tool_use';
        fileName: string;
        content: string;
        requirements?: Array<string>;
        enabled?: boolean;
    };
    path?: never;
    query?: never;
    url: '/api/hooks';
};

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

export type CreateHookError = CreateHookErrors[keyof CreateHookErrors];

export type CreateHookResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        agentId: string;
        event: 'session_start' | 'pre_tool_use' | 'post_tool_use';
        fileName: string;
        content: string;
        requirements: Array<string>;
        enabled: boolean;
        createdAt: string;
        updatedAt: string;
    };
};

export type CreateHookResponse = CreateHookResponses[keyof CreateHookResponses];

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

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

export type DeleteHookError = DeleteHookErrors[keyof DeleteHookErrors];

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

export type DeleteHookResponse = DeleteHookResponses[keyof DeleteHookResponses];

export type UpdateHookData = {
    body: {
        event?: 'session_start' | 'pre_tool_use' | 'post_tool_use';
        fileName?: string;
        content?: string;
        requirements?: Array<string>;
        enabled?: boolean;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/hooks/{id}';
};

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

export type UpdateHookError = UpdateHookErrors[keyof UpdateHookErrors];

export type UpdateHookResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        agentId: string;
        event: 'session_start' | 'pre_tool_use' | 'post_tool_use';
        fileName: string;
        content: string;
        requirements: Array<string>;
        enabled: boolean;
        createdAt: string;
        updatedAt: string;
    };
};

export type UpdateHookResponse = UpdateHookResponses[keyof UpdateHookResponses];

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;
            passthroughVirtualKeyId: string | null;
            environmentId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
            authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: XaiChatCompletionRequest | {
                [key: string]: unknown;
            };
            processedRequest?: XaiChatCompletionRequest | {
                [key: string]: unknown;
            } | null;
            response: OpenAiChatCompletionResponse | {
                error: string;
            };
            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;
            inputTokensEstimated: boolean;
            outputTokens: number | null;
            cacheReadTokens: number | null;
            cacheWriteTokens: number | null;
            cacheWrite1hTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            cacheCost: string | null;
            cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    usageLimitExceeded?: boolean;
                    usageLimitEntityType?: string;
                    authAction?: {
                        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        providerLabel: string;
                    };
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        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;
            passthroughVirtualKeyId: string | null;
            environmentId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
            authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            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;
            } | {
                [key: string]: unknown;
            };
            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;
            } | {
                [key: string]: unknown;
            } | null;
            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;
            } | {
                error: string;
            };
            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;
            inputTokensEstimated: boolean;
            outputTokens: number | null;
            cacheReadTokens: number | null;
            cacheWriteTokens: number | null;
            cacheWrite1hTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            cacheCost: string | null;
            cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    usageLimitExceeded?: boolean;
                    usageLimitEntityType?: string;
                    authAction?: {
                        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        providerLabel: string;
                    };
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        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;
            passthroughVirtualKeyId: string | null;
            environmentId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
            authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_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';
            } | {
                [key: string]: unknown;
            };
            processedRequest?: {
                model: string;
                input: string | Array<string>;
                dimensions?: number;
                encoding_format?: 'float' | 'base64';
            } | {
                [key: string]: unknown;
            } | null;
            response: {
                object: 'list';
                data: Array<{
                    object: 'embedding';
                    embedding: Array<number>;
                    index: number;
                }>;
                model: string;
                usage: {
                    prompt_tokens: number;
                    total_tokens: number;
                };
            } | {
                error: string;
            };
            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;
            inputTokensEstimated: boolean;
            outputTokens: number | null;
            cacheReadTokens: number | null;
            cacheWriteTokens: number | null;
            cacheWrite1hTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            cacheCost: string | null;
            cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    usageLimitExceeded?: boolean;
                    usageLimitEntityType?: string;
                    authAction?: {
                        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        providerLabel: string;
                    };
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        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;
            passthroughVirtualKeyId: string | null;
            environmentId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
            authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_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';
            } | {
                [key: string]: unknown;
            };
            processedRequest?: {
                model: string;
                input: string | Array<string>;
                dimensions?: number;
                encoding_format?: 'float' | 'base64';
            } | {
                [key: string]: unknown;
            } | null;
            response: {
                object: 'list';
                data: Array<{
                    object: 'embedding';
                    embedding: Array<number>;
                    index: number;
                }>;
                model: string;
                usage: {
                    prompt_tokens: number;
                    total_tokens: number;
                };
            } | {
                error: string;
            };
            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:embeddings';
            model: string | null;
            baselineModel: string | null;
            inputTokens: number | null;
            inputTokensEstimated: boolean;
            outputTokens: number | null;
            cacheReadTokens: number | null;
            cacheWriteTokens: number | null;
            cacheWrite1hTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            cacheCost: string | null;
            cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    usageLimitExceeded?: boolean;
                    usageLimitEntityType?: string;
                    authAction?: {
                        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        providerLabel: string;
                    };
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        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;
            passthroughVirtualKeyId: string | null;
            environmentId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
            authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: GeminiGenerateContentRequest | {
                [key: string]: unknown;
            };
            processedRequest?: GeminiGenerateContentRequest | {
                [key: string]: unknown;
            } | null;
            response: GeminiGenerateContentResponse | {
                error: string;
            };
            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;
            inputTokensEstimated: boolean;
            outputTokens: number | null;
            cacheReadTokens: number | null;
            cacheWriteTokens: number | null;
            cacheWrite1hTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            cacheCost: string | null;
            cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    usageLimitExceeded?: boolean;
                    usageLimitEntityType?: string;
                    authAction?: {
                        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        providerLabel: string;
                    };
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        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;
            passthroughVirtualKeyId: string | null;
            environmentId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
            authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: AnthropicMessagesRequest | {
                [key: string]: unknown;
            };
            processedRequest?: AnthropicMessagesRequest | {
                [key: string]: unknown;
            } | null;
            response: AnthropicMessagesResponse | {
                error: string;
            };
            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;
            inputTokensEstimated: boolean;
            outputTokens: number | null;
            cacheReadTokens: number | null;
            cacheWriteTokens: number | null;
            cacheWrite1hTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            cacheCost: string | null;
            cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    usageLimitExceeded?: boolean;
                    usageLimitEntityType?: string;
                    authAction?: {
                        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        providerLabel: string;
                    };
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        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;
            passthroughVirtualKeyId: string | null;
            environmentId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
            authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_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';
                        };
                    } | {
                        cachePoint: {
                            type: string;
                            ttl?: string;
                        };
                    } | {
                        reasoningContent: {
                            reasoningText: {
                                text: string;
                                signature?: string;
                            };
                        } | {
                            redactedReasoning: {
                                data: string;
                            };
                        };
                    }>;
                }>;
                system?: Array<{
                    text: string;
                } | {
                    guardContent: {
                        text: {
                            text: string;
                            qualifiers?: Array<'grounding_source' | 'query' | 'guard_content'>;
                        };
                    };
                } | {
                    cachePoint: {
                        type: string;
                        ttl?: string;
                    };
                } | {
                    [key: string]: unknown;
                }>;
                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;
            } | {
                [key: string]: unknown;
            };
            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';
                        };
                    } | {
                        cachePoint: {
                            type: string;
                            ttl?: string;
                        };
                    } | {
                        reasoningContent: {
                            reasoningText: {
                                text: string;
                                signature?: string;
                            };
                        } | {
                            redactedReasoning: {
                                data: string;
                            };
                        };
                    }>;
                }>;
                system?: Array<{
                    text: string;
                } | {
                    guardContent: {
                        text: {
                            text: string;
                            qualifiers?: Array<'grounding_source' | 'query' | 'guard_content'>;
                        };
                    };
                } | {
                    cachePoint: {
                        type: string;
                        ttl?: string;
                    };
                } | {
                    [key: string]: unknown;
                }>;
                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;
            } | {
                [key: string]: unknown;
            } | 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;
                    cacheDetails?: Array<{
                        ttl?: string;
                        inputTokens?: 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';
                };
            } | {
                error: string;
            };
            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;
            inputTokensEstimated: boolean;
            outputTokens: number | null;
            cacheReadTokens: number | null;
            cacheWriteTokens: number | null;
            cacheWrite1hTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            cacheCost: string | null;
            cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    usageLimitExceeded?: boolean;
                    usageLimitEntityType?: string;
                    authAction?: {
                        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        providerLabel: string;
                    };
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        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;
            passthroughVirtualKeyId: string | null;
            environmentId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
            authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: XaiChatCompletionRequest | {
                [key: string]: unknown;
            };
            processedRequest?: XaiChatCompletionRequest | {
                [key: string]: unknown;
            } | null;
            response: CerebrasChatCompletionResponse | {
                error: string;
            };
            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;
            inputTokensEstimated: boolean;
            outputTokens: number | null;
            cacheReadTokens: number | null;
            cacheWriteTokens: number | null;
            cacheWrite1hTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            cacheCost: string | null;
            cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    usageLimitExceeded?: boolean;
                    usageLimitEntityType?: string;
                    authAction?: {
                        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        providerLabel: string;
                    };
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        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;
            passthroughVirtualKeyId: string | null;
            environmentId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
            authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: XaiChatCompletionRequest | {
                [key: string]: unknown;
            };
            processedRequest?: XaiChatCompletionRequest | {
                [key: string]: unknown;
            } | null;
            response: MistralChatCompletionResponse | {
                error: string;
            };
            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;
            inputTokensEstimated: boolean;
            outputTokens: number | null;
            cacheReadTokens: number | null;
            cacheWriteTokens: number | null;
            cacheWrite1hTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            cacheCost: string | null;
            cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    usageLimitExceeded?: boolean;
                    usageLimitEntityType?: string;
                    authAction?: {
                        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        providerLabel: string;
                    };
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        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;
            passthroughVirtualKeyId: string | null;
            environmentId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
            authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: XaiChatCompletionRequest | {
                [key: string]: unknown;
            };
            processedRequest?: XaiChatCompletionRequest | {
                [key: string]: unknown;
            } | null;
            response: PerplexityChatCompletionResponse | {
                error: string;
            };
            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;
            inputTokensEstimated: boolean;
            outputTokens: number | null;
            cacheReadTokens: number | null;
            cacheWriteTokens: number | null;
            cacheWrite1hTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            cacheCost: string | null;
            cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    usageLimitExceeded?: boolean;
                    usageLimitEntityType?: string;
                    authAction?: {
                        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        providerLabel: string;
                    };
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        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;
            passthroughVirtualKeyId: string | null;
            environmentId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
            authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: XaiChatCompletionRequest | {
                [key: string]: unknown;
            };
            processedRequest?: XaiChatCompletionRequest | {
                [key: string]: unknown;
            } | null;
            response: GroqChatCompletionResponse | {
                error: string;
            };
            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;
            inputTokensEstimated: boolean;
            outputTokens: number | null;
            cacheReadTokens: number | null;
            cacheWriteTokens: number | null;
            cacheWrite1hTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            cacheCost: string | null;
            cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    usageLimitExceeded?: boolean;
                    usageLimitEntityType?: string;
                    authAction?: {
                        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        providerLabel: string;
                    };
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        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;
            passthroughVirtualKeyId: string | null;
            environmentId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
            authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: XaiChatCompletionRequest | {
                [key: string]: unknown;
            };
            processedRequest?: XaiChatCompletionRequest | {
                [key: string]: unknown;
            } | null;
            response: XaiChatCompletionResponse | {
                error: string;
            };
            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;
            inputTokensEstimated: boolean;
            outputTokens: number | null;
            cacheReadTokens: number | null;
            cacheWriteTokens: number | null;
            cacheWrite1hTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            cacheCost: string | null;
            cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    usageLimitExceeded?: boolean;
                    usageLimitEntityType?: string;
                    authAction?: {
                        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        providerLabel: string;
                    };
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        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;
            passthroughVirtualKeyId: string | null;
            environmentId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
            authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: OpenrouterChatCompletionRequest | {
                [key: string]: unknown;
            };
            processedRequest?: OpenrouterChatCompletionRequest | {
                [key: string]: unknown;
            } | null;
            response: OpenrouterChatCompletionResponse | {
                error: string;
            };
            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;
            inputTokensEstimated: boolean;
            outputTokens: number | null;
            cacheReadTokens: number | null;
            cacheWriteTokens: number | null;
            cacheWrite1hTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            cacheCost: string | null;
            cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    usageLimitExceeded?: boolean;
                    usageLimitEntityType?: string;
                    authAction?: {
                        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        providerLabel: string;
                    };
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        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;
            passthroughVirtualKeyId: string | null;
            environmentId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
            authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: VllmChatCompletionRequest | {
                [key: string]: unknown;
            };
            processedRequest?: VllmChatCompletionRequest | {
                [key: string]: unknown;
            } | null;
            response: VllmChatCompletionResponse | {
                error: string;
            };
            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;
            inputTokensEstimated: boolean;
            outputTokens: number | null;
            cacheReadTokens: number | null;
            cacheWriteTokens: number | null;
            cacheWrite1hTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            cacheCost: string | null;
            cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    usageLimitExceeded?: boolean;
                    usageLimitEntityType?: string;
                    authAction?: {
                        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        providerLabel: string;
                    };
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        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;
            passthroughVirtualKeyId: string | null;
            environmentId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
            authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: OllamaChatCompletionRequest | {
                [key: string]: unknown;
            };
            processedRequest?: OllamaChatCompletionRequest | {
                [key: string]: unknown;
            } | null;
            response: OllamaChatCompletionResponse | {
                error: string;
            };
            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;
            inputTokensEstimated: boolean;
            outputTokens: number | null;
            cacheReadTokens: number | null;
            cacheWriteTokens: number | null;
            cacheWrite1hTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            cacheCost: string | null;
            cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    usageLimitExceeded?: boolean;
                    usageLimitEntityType?: string;
                    authAction?: {
                        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        providerLabel: string;
                    };
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        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;
            passthroughVirtualKeyId: string | null;
            environmentId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
            authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: CohereChatRequest | {
                [key: string]: unknown;
            };
            processedRequest?: CohereChatRequest | {
                [key: string]: unknown;
            } | null;
            response: CohereChatResponse | {
                error: string;
            };
            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;
            inputTokensEstimated: boolean;
            outputTokens: number | null;
            cacheReadTokens: number | null;
            cacheWriteTokens: number | null;
            cacheWrite1hTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            cacheCost: string | null;
            cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    usageLimitExceeded?: boolean;
                    usageLimitEntityType?: string;
                    authAction?: {
                        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        providerLabel: string;
                    };
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        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;
            passthroughVirtualKeyId: string | null;
            environmentId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
            authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: ZhipuaiChatCompletionRequest | {
                [key: string]: unknown;
            };
            processedRequest?: ZhipuaiChatCompletionRequest | {
                [key: string]: unknown;
            } | null;
            response: ZhipuaiChatCompletionResponse | {
                error: string;
            };
            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;
            inputTokensEstimated: boolean;
            outputTokens: number | null;
            cacheReadTokens: number | null;
            cacheWriteTokens: number | null;
            cacheWrite1hTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            cacheCost: string | null;
            cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    usageLimitExceeded?: boolean;
                    usageLimitEntityType?: string;
                    authAction?: {
                        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        providerLabel: string;
                    };
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        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;
            passthroughVirtualKeyId: string | null;
            environmentId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
            authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: DeepSeekChatCompletionRequest | {
                [key: string]: unknown;
            };
            processedRequest?: DeepSeekChatCompletionRequest | {
                [key: string]: unknown;
            } | null;
            response: DeepSeekChatCompletionResponse | {
                error: string;
            };
            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;
            inputTokensEstimated: boolean;
            outputTokens: number | null;
            cacheReadTokens: number | null;
            cacheWriteTokens: number | null;
            cacheWrite1hTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            cacheCost: string | null;
            cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    usageLimitExceeded?: boolean;
                    usageLimitEntityType?: string;
                    authAction?: {
                        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        providerLabel: string;
                    };
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        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;
            passthroughVirtualKeyId: string | null;
            environmentId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
            authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: {
                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;
            } | {
                [key: string]: unknown;
            };
            processedRequest?: {
                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;
            } | {
                [key: string]: unknown;
            } | null;
            response: {
                id: string;
                choices: Array<{
                    finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call' | string;
                    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> | null;
                        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?: string;
                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;
            } | {
                error: string;
            };
            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: 'github-copilot:chatCompletions';
            model: string | null;
            baselineModel: string | null;
            inputTokens: number | null;
            inputTokensEstimated: boolean;
            outputTokens: number | null;
            cacheReadTokens: number | null;
            cacheWriteTokens: number | null;
            cacheWrite1hTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            cacheCost: string | null;
            cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    usageLimitExceeded?: boolean;
                    usageLimitEntityType?: string;
                    authAction?: {
                        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        providerLabel: string;
                    };
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        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;
            passthroughVirtualKeyId: string | null;
            environmentId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
            authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: MinimaxChatCompletionRequest | {
                [key: string]: unknown;
            };
            processedRequest?: MinimaxChatCompletionRequest | {
                [key: string]: unknown;
            } | null;
            response: MinimaxChatCompletionResponse | {
                error: string;
            };
            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;
            inputTokensEstimated: boolean;
            outputTokens: number | null;
            cacheReadTokens: number | null;
            cacheWriteTokens: number | null;
            cacheWrite1hTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            cacheCost: string | null;
            cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    usageLimitExceeded?: boolean;
                    usageLimitEntityType?: string;
                    authAction?: {
                        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        providerLabel: string;
                    };
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        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;
            passthroughVirtualKeyId: string | null;
            environmentId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
            authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            request: XaiChatCompletionRequest | {
                [key: string]: unknown;
            };
            processedRequest?: XaiChatCompletionRequest | {
                [key: string]: unknown;
            } | null;
            response: {
                id: string;
                choices: Array<{
                    finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call' | string;
                    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> | null;
                        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;
            } | {
                error: string;
            };
            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;
            inputTokensEstimated: boolean;
            outputTokens: number | null;
            cacheReadTokens: number | null;
            cacheWriteTokens: number | null;
            cacheWrite1hTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            cacheCost: string | null;
            cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    usageLimitExceeded?: boolean;
                    usageLimitEntityType?: string;
                    authAction?: {
                        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        providerLabel: string;
                    };
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        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;
            passthroughVirtualKeyId: string | null;
            environmentId: string | null;
            sessionId: string | null;
            sessionSource: string | null;
            source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
            authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
            authenticatedAppId: string | null;
            authenticatedAppName: string | null;
            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;
            } | {
                [key: string]: unknown;
            };
            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;
            } | {
                [key: string]: unknown;
            } | null;
            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;
            } | {
                error: string;
            };
            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;
            inputTokensEstimated: boolean;
            outputTokens: number | null;
            cacheReadTokens: number | null;
            cacheWriteTokens: number | null;
            cacheWrite1hTokens: number | null;
            baselineCost: string | null;
            cost: string | null;
            cacheCost: string | null;
            cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                    message: string;
                    isRetryable: boolean;
                    sessionId?: string;
                    traceId?: string;
                    spanId?: string;
                    usageLimitExceeded?: boolean;
                    usageLimitEntityType?: string;
                    authAction?: {
                        provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        providerLabel: string;
                    };
                    originalError?: {
                        provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                        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' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
        /**
         * Filter by client app (queries external_agent_id; e.g. claude)
         */
        client?: 'claude';
        /**
         * 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;
    };
    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' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
            sources: Array<'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete'>;
            interactionId: string | null;
            requestCount: number;
            totalInputTokens: number;
            totalOutputTokens: number;
            totalCacheReadTokens: number;
            totalCacheWriteTokens: number;
            totalCost: string | null;
            totalBaselineCost: string | null;
            totalToonCostSavings: string | null;
            totalCacheSavings: 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' | 'passthrough_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;
        passthroughVirtualKeyId: string | null;
        environmentId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
        authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: XaiChatCompletionRequest | {
            [key: string]: unknown;
        };
        processedRequest?: XaiChatCompletionRequest | {
            [key: string]: unknown;
        } | null;
        response: OpenAiChatCompletionResponse | {
            error: string;
        };
        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;
        inputTokensEstimated: boolean;
        outputTokens: number | null;
        cacheReadTokens: number | null;
        cacheWriteTokens: number | null;
        cacheWrite1hTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        cacheCost: string | null;
        cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                usageLimitExceeded?: boolean;
                usageLimitEntityType?: string;
                authAction?: {
                    provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    providerLabel: string;
                };
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    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;
        passthroughVirtualKeyId: string | null;
        environmentId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
        authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        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;
        } | {
            [key: string]: unknown;
        };
        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;
        } | {
            [key: string]: unknown;
        } | null;
        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;
        } | {
            error: string;
        };
        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;
        inputTokensEstimated: boolean;
        outputTokens: number | null;
        cacheReadTokens: number | null;
        cacheWriteTokens: number | null;
        cacheWrite1hTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        cacheCost: string | null;
        cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                usageLimitExceeded?: boolean;
                usageLimitEntityType?: string;
                authAction?: {
                    provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    providerLabel: string;
                };
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    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;
        passthroughVirtualKeyId: string | null;
        environmentId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
        authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_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';
        } | {
            [key: string]: unknown;
        };
        processedRequest?: {
            model: string;
            input: string | Array<string>;
            dimensions?: number;
            encoding_format?: 'float' | 'base64';
        } | {
            [key: string]: unknown;
        } | null;
        response: {
            object: 'list';
            data: Array<{
                object: 'embedding';
                embedding: Array<number>;
                index: number;
            }>;
            model: string;
            usage: {
                prompt_tokens: number;
                total_tokens: number;
            };
        } | {
            error: string;
        };
        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;
        inputTokensEstimated: boolean;
        outputTokens: number | null;
        cacheReadTokens: number | null;
        cacheWriteTokens: number | null;
        cacheWrite1hTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        cacheCost: string | null;
        cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                usageLimitExceeded?: boolean;
                usageLimitEntityType?: string;
                authAction?: {
                    provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    providerLabel: string;
                };
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    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;
        passthroughVirtualKeyId: string | null;
        environmentId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
        authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_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';
        } | {
            [key: string]: unknown;
        };
        processedRequest?: {
            model: string;
            input: string | Array<string>;
            dimensions?: number;
            encoding_format?: 'float' | 'base64';
        } | {
            [key: string]: unknown;
        } | null;
        response: {
            object: 'list';
            data: Array<{
                object: 'embedding';
                embedding: Array<number>;
                index: number;
            }>;
            model: string;
            usage: {
                prompt_tokens: number;
                total_tokens: number;
            };
        } | {
            error: string;
        };
        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:embeddings';
        model: string | null;
        baselineModel: string | null;
        inputTokens: number | null;
        inputTokensEstimated: boolean;
        outputTokens: number | null;
        cacheReadTokens: number | null;
        cacheWriteTokens: number | null;
        cacheWrite1hTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        cacheCost: string | null;
        cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                usageLimitExceeded?: boolean;
                usageLimitEntityType?: string;
                authAction?: {
                    provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    providerLabel: string;
                };
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    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;
        passthroughVirtualKeyId: string | null;
        environmentId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
        authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: GeminiGenerateContentRequest | {
            [key: string]: unknown;
        };
        processedRequest?: GeminiGenerateContentRequest | {
            [key: string]: unknown;
        } | null;
        response: GeminiGenerateContentResponse | {
            error: string;
        };
        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;
        inputTokensEstimated: boolean;
        outputTokens: number | null;
        cacheReadTokens: number | null;
        cacheWriteTokens: number | null;
        cacheWrite1hTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        cacheCost: string | null;
        cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                usageLimitExceeded?: boolean;
                usageLimitEntityType?: string;
                authAction?: {
                    provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    providerLabel: string;
                };
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    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;
        passthroughVirtualKeyId: string | null;
        environmentId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
        authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: AnthropicMessagesRequest | {
            [key: string]: unknown;
        };
        processedRequest?: AnthropicMessagesRequest | {
            [key: string]: unknown;
        } | null;
        response: AnthropicMessagesResponse | {
            error: string;
        };
        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;
        inputTokensEstimated: boolean;
        outputTokens: number | null;
        cacheReadTokens: number | null;
        cacheWriteTokens: number | null;
        cacheWrite1hTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        cacheCost: string | null;
        cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                usageLimitExceeded?: boolean;
                usageLimitEntityType?: string;
                authAction?: {
                    provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    providerLabel: string;
                };
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    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;
        passthroughVirtualKeyId: string | null;
        environmentId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
        authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_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';
                    };
                } | {
                    cachePoint: {
                        type: string;
                        ttl?: string;
                    };
                } | {
                    reasoningContent: {
                        reasoningText: {
                            text: string;
                            signature?: string;
                        };
                    } | {
                        redactedReasoning: {
                            data: string;
                        };
                    };
                }>;
            }>;
            system?: Array<{
                text: string;
            } | {
                guardContent: {
                    text: {
                        text: string;
                        qualifiers?: Array<'grounding_source' | 'query' | 'guard_content'>;
                    };
                };
            } | {
                cachePoint: {
                    type: string;
                    ttl?: string;
                };
            } | {
                [key: string]: unknown;
            }>;
            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;
        } | {
            [key: string]: unknown;
        };
        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';
                    };
                } | {
                    cachePoint: {
                        type: string;
                        ttl?: string;
                    };
                } | {
                    reasoningContent: {
                        reasoningText: {
                            text: string;
                            signature?: string;
                        };
                    } | {
                        redactedReasoning: {
                            data: string;
                        };
                    };
                }>;
            }>;
            system?: Array<{
                text: string;
            } | {
                guardContent: {
                    text: {
                        text: string;
                        qualifiers?: Array<'grounding_source' | 'query' | 'guard_content'>;
                    };
                };
            } | {
                cachePoint: {
                    type: string;
                    ttl?: string;
                };
            } | {
                [key: string]: unknown;
            }>;
            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;
        } | {
            [key: string]: unknown;
        } | 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;
                cacheDetails?: Array<{
                    ttl?: string;
                    inputTokens?: 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';
            };
        } | {
            error: string;
        };
        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;
        inputTokensEstimated: boolean;
        outputTokens: number | null;
        cacheReadTokens: number | null;
        cacheWriteTokens: number | null;
        cacheWrite1hTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        cacheCost: string | null;
        cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                usageLimitExceeded?: boolean;
                usageLimitEntityType?: string;
                authAction?: {
                    provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    providerLabel: string;
                };
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    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;
        passthroughVirtualKeyId: string | null;
        environmentId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
        authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: XaiChatCompletionRequest | {
            [key: string]: unknown;
        };
        processedRequest?: XaiChatCompletionRequest | {
            [key: string]: unknown;
        } | null;
        response: CerebrasChatCompletionResponse | {
            error: string;
        };
        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;
        inputTokensEstimated: boolean;
        outputTokens: number | null;
        cacheReadTokens: number | null;
        cacheWriteTokens: number | null;
        cacheWrite1hTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        cacheCost: string | null;
        cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                usageLimitExceeded?: boolean;
                usageLimitEntityType?: string;
                authAction?: {
                    provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    providerLabel: string;
                };
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    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;
        passthroughVirtualKeyId: string | null;
        environmentId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
        authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: XaiChatCompletionRequest | {
            [key: string]: unknown;
        };
        processedRequest?: XaiChatCompletionRequest | {
            [key: string]: unknown;
        } | null;
        response: MistralChatCompletionResponse | {
            error: string;
        };
        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;
        inputTokensEstimated: boolean;
        outputTokens: number | null;
        cacheReadTokens: number | null;
        cacheWriteTokens: number | null;
        cacheWrite1hTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        cacheCost: string | null;
        cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                usageLimitExceeded?: boolean;
                usageLimitEntityType?: string;
                authAction?: {
                    provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    providerLabel: string;
                };
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    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;
        passthroughVirtualKeyId: string | null;
        environmentId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
        authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: XaiChatCompletionRequest | {
            [key: string]: unknown;
        };
        processedRequest?: XaiChatCompletionRequest | {
            [key: string]: unknown;
        } | null;
        response: PerplexityChatCompletionResponse | {
            error: string;
        };
        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;
        inputTokensEstimated: boolean;
        outputTokens: number | null;
        cacheReadTokens: number | null;
        cacheWriteTokens: number | null;
        cacheWrite1hTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        cacheCost: string | null;
        cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                usageLimitExceeded?: boolean;
                usageLimitEntityType?: string;
                authAction?: {
                    provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    providerLabel: string;
                };
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    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;
        passthroughVirtualKeyId: string | null;
        environmentId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
        authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: XaiChatCompletionRequest | {
            [key: string]: unknown;
        };
        processedRequest?: XaiChatCompletionRequest | {
            [key: string]: unknown;
        } | null;
        response: GroqChatCompletionResponse | {
            error: string;
        };
        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;
        inputTokensEstimated: boolean;
        outputTokens: number | null;
        cacheReadTokens: number | null;
        cacheWriteTokens: number | null;
        cacheWrite1hTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        cacheCost: string | null;
        cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                usageLimitExceeded?: boolean;
                usageLimitEntityType?: string;
                authAction?: {
                    provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    providerLabel: string;
                };
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    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;
        passthroughVirtualKeyId: string | null;
        environmentId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
        authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: XaiChatCompletionRequest | {
            [key: string]: unknown;
        };
        processedRequest?: XaiChatCompletionRequest | {
            [key: string]: unknown;
        } | null;
        response: XaiChatCompletionResponse | {
            error: string;
        };
        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;
        inputTokensEstimated: boolean;
        outputTokens: number | null;
        cacheReadTokens: number | null;
        cacheWriteTokens: number | null;
        cacheWrite1hTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        cacheCost: string | null;
        cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                usageLimitExceeded?: boolean;
                usageLimitEntityType?: string;
                authAction?: {
                    provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    providerLabel: string;
                };
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    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;
        passthroughVirtualKeyId: string | null;
        environmentId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
        authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: OpenrouterChatCompletionRequest | {
            [key: string]: unknown;
        };
        processedRequest?: OpenrouterChatCompletionRequest | {
            [key: string]: unknown;
        } | null;
        response: OpenrouterChatCompletionResponse | {
            error: string;
        };
        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;
        inputTokensEstimated: boolean;
        outputTokens: number | null;
        cacheReadTokens: number | null;
        cacheWriteTokens: number | null;
        cacheWrite1hTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        cacheCost: string | null;
        cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                usageLimitExceeded?: boolean;
                usageLimitEntityType?: string;
                authAction?: {
                    provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    providerLabel: string;
                };
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    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;
        passthroughVirtualKeyId: string | null;
        environmentId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
        authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: VllmChatCompletionRequest | {
            [key: string]: unknown;
        };
        processedRequest?: VllmChatCompletionRequest | {
            [key: string]: unknown;
        } | null;
        response: VllmChatCompletionResponse | {
            error: string;
        };
        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;
        inputTokensEstimated: boolean;
        outputTokens: number | null;
        cacheReadTokens: number | null;
        cacheWriteTokens: number | null;
        cacheWrite1hTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        cacheCost: string | null;
        cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                usageLimitExceeded?: boolean;
                usageLimitEntityType?: string;
                authAction?: {
                    provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    providerLabel: string;
                };
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    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;
        passthroughVirtualKeyId: string | null;
        environmentId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
        authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: OllamaChatCompletionRequest | {
            [key: string]: unknown;
        };
        processedRequest?: OllamaChatCompletionRequest | {
            [key: string]: unknown;
        } | null;
        response: OllamaChatCompletionResponse | {
            error: string;
        };
        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;
        inputTokensEstimated: boolean;
        outputTokens: number | null;
        cacheReadTokens: number | null;
        cacheWriteTokens: number | null;
        cacheWrite1hTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        cacheCost: string | null;
        cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                usageLimitExceeded?: boolean;
                usageLimitEntityType?: string;
                authAction?: {
                    provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    providerLabel: string;
                };
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    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;
        passthroughVirtualKeyId: string | null;
        environmentId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
        authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: CohereChatRequest | {
            [key: string]: unknown;
        };
        processedRequest?: CohereChatRequest | {
            [key: string]: unknown;
        } | null;
        response: CohereChatResponse | {
            error: string;
        };
        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;
        inputTokensEstimated: boolean;
        outputTokens: number | null;
        cacheReadTokens: number | null;
        cacheWriteTokens: number | null;
        cacheWrite1hTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        cacheCost: string | null;
        cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                usageLimitExceeded?: boolean;
                usageLimitEntityType?: string;
                authAction?: {
                    provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    providerLabel: string;
                };
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    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;
        passthroughVirtualKeyId: string | null;
        environmentId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
        authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: ZhipuaiChatCompletionRequest | {
            [key: string]: unknown;
        };
        processedRequest?: ZhipuaiChatCompletionRequest | {
            [key: string]: unknown;
        } | null;
        response: ZhipuaiChatCompletionResponse | {
            error: string;
        };
        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;
        inputTokensEstimated: boolean;
        outputTokens: number | null;
        cacheReadTokens: number | null;
        cacheWriteTokens: number | null;
        cacheWrite1hTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        cacheCost: string | null;
        cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                usageLimitExceeded?: boolean;
                usageLimitEntityType?: string;
                authAction?: {
                    provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    providerLabel: string;
                };
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    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;
        passthroughVirtualKeyId: string | null;
        environmentId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
        authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: DeepSeekChatCompletionRequest | {
            [key: string]: unknown;
        };
        processedRequest?: DeepSeekChatCompletionRequest | {
            [key: string]: unknown;
        } | null;
        response: DeepSeekChatCompletionResponse | {
            error: string;
        };
        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;
        inputTokensEstimated: boolean;
        outputTokens: number | null;
        cacheReadTokens: number | null;
        cacheWriteTokens: number | null;
        cacheWrite1hTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        cacheCost: string | null;
        cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                usageLimitExceeded?: boolean;
                usageLimitEntityType?: string;
                authAction?: {
                    provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    providerLabel: string;
                };
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    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;
        passthroughVirtualKeyId: string | null;
        environmentId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
        authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: {
            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;
        } | {
            [key: string]: unknown;
        };
        processedRequest?: {
            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;
        } | {
            [key: string]: unknown;
        } | null;
        response: {
            id: string;
            choices: Array<{
                finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call' | string;
                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> | null;
                    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?: string;
            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;
        } | {
            error: string;
        };
        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: 'github-copilot:chatCompletions';
        model: string | null;
        baselineModel: string | null;
        inputTokens: number | null;
        inputTokensEstimated: boolean;
        outputTokens: number | null;
        cacheReadTokens: number | null;
        cacheWriteTokens: number | null;
        cacheWrite1hTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        cacheCost: string | null;
        cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                usageLimitExceeded?: boolean;
                usageLimitEntityType?: string;
                authAction?: {
                    provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    providerLabel: string;
                };
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    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;
        passthroughVirtualKeyId: string | null;
        environmentId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
        authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: MinimaxChatCompletionRequest | {
            [key: string]: unknown;
        };
        processedRequest?: MinimaxChatCompletionRequest | {
            [key: string]: unknown;
        } | null;
        response: MinimaxChatCompletionResponse | {
            error: string;
        };
        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;
        inputTokensEstimated: boolean;
        outputTokens: number | null;
        cacheReadTokens: number | null;
        cacheWriteTokens: number | null;
        cacheWrite1hTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        cacheCost: string | null;
        cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                usageLimitExceeded?: boolean;
                usageLimitEntityType?: string;
                authAction?: {
                    provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    providerLabel: string;
                };
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    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;
        passthroughVirtualKeyId: string | null;
        environmentId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
        authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        request: XaiChatCompletionRequest | {
            [key: string]: unknown;
        };
        processedRequest?: XaiChatCompletionRequest | {
            [key: string]: unknown;
        } | null;
        response: {
            id: string;
            choices: Array<{
                finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call' | string;
                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> | null;
                    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;
        } | {
            error: string;
        };
        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;
        inputTokensEstimated: boolean;
        outputTokens: number | null;
        cacheReadTokens: number | null;
        cacheWriteTokens: number | null;
        cacheWrite1hTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        cacheCost: string | null;
        cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                usageLimitExceeded?: boolean;
                usageLimitEntityType?: string;
                authAction?: {
                    provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    providerLabel: string;
                };
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    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;
        passthroughVirtualKeyId: string | null;
        environmentId: string | null;
        sessionId: string | null;
        sessionSource: string | null;
        source?: 'api' | 'model_router' | 'chat' | 'chat:compaction' | 'chat:title_generation' | 'chat:tool_call_repair' | 'skill:description_generation' | 'chatops:slack' | 'chatops:ms-teams' | 'email' | 'schedule-trigger' | 'knowledge:embedding' | 'knowledge:reranker' | 'knowledge:query-expansion' | 'app:llm_complete';
        authMethod?: 'provider_key' | 'virtual_key' | 'passthrough_virtual_key' | 'jwks' | 'oauth_client_credentials' | 'oauth_user' | 'internal' | 'unknown';
        authenticatedAppId: string | null;
        authenticatedAppName: string | null;
        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;
        } | {
            [key: string]: unknown;
        };
        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;
        } | {
            [key: string]: unknown;
        } | null;
        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;
        } | {
            error: string;
        };
        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;
        inputTokensEstimated: boolean;
        outputTokens: number | null;
        cacheReadTokens: number | null;
        cacheWriteTokens: number | null;
        cacheWrite1hTokens: number | null;
        baselineCost: string | null;
        cost: string | null;
        cacheCost: string | null;
        cacheSavings: 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' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                usageLimitExceeded?: boolean;
                usageLimitEntityType?: string;
                authAction?: {
                    provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    providerLabel: string;
                };
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    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?: {
        includeApps?: boolean;
    };
    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' | 'app';
        multitenant: boolean;
        dynamicConnectionMcpServerId: string | null;
        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;
                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;
            resource?: string;
            redirect_uris: Array<string>;
            scopes: Array<string>;
            description?: string;
            well_known_url?: string;
            default_scopes: Array<string>;
            supports_resource_metadata: boolean;
            additional_scopes?: Array<string>;
            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';
        clonedFrom: string | null;
        environmentId: string | null;
        catalogReinstallRequired: boolean;
        catalogItemApprovalStatus: string | null;
        catalogItemApprovalReason: string | null;
        catalogItemApprovalReviewedBy: string | null;
        catalogItemApprovalReviewedAt: string | null;
        createdAt: string;
        updatedAt: string;
        labels: Array<{
            key: string;
            value: string;
        }>;
        teams: Array<{
            id: string;
            name: string;
        }>;
        authorName?: string | null;
        toolCount: number;
        providesUi?: boolean;
        appId?: string | null;
        imageApprovalRequired?: boolean;
    }>;
};

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' | 'app';
        multitenant?: boolean;
        dynamicConnectionMcpServerId?: string | null;
        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;
                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;
            resource?: string;
            redirect_uris: Array<string>;
            scopes: Array<string>;
            description?: string;
            well_known_url?: string;
            default_scopes: Array<string>;
            supports_resource_metadata: boolean;
            additional_scopes?: Array<string>;
            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';
        clonedFrom?: string | null;
        environmentId?: 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' | 'app';
        multitenant: boolean;
        dynamicConnectionMcpServerId: string | null;
        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;
                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;
            resource?: string;
            redirect_uris: Array<string>;
            scopes: Array<string>;
            description?: string;
            well_known_url?: string;
            default_scopes: Array<string>;
            supports_resource_metadata: boolean;
            additional_scopes?: Array<string>;
            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';
        clonedFrom: string | null;
        environmentId: string | null;
        catalogReinstallRequired: boolean;
        catalogItemApprovalStatus: string | null;
        catalogItemApprovalReason: string | null;
        catalogItemApprovalReviewedBy: string | null;
        catalogItemApprovalReviewedAt: string | null;
        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' | 'app';
        multitenant: boolean;
        dynamicConnectionMcpServerId: string | null;
        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;
                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;
            resource?: string;
            redirect_uris: Array<string>;
            scopes: Array<string>;
            description?: string;
            well_known_url?: string;
            default_scopes: Array<string>;
            supports_resource_metadata: boolean;
            additional_scopes?: Array<string>;
            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';
        clonedFrom: string | null;
        environmentId: string | null;
        catalogReinstallRequired: boolean;
        catalogItemApprovalStatus: string | null;
        catalogItemApprovalReason: string | null;
        catalogItemApprovalReviewedBy: string | null;
        catalogItemApprovalReviewedAt: string | null;
        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' | 'app';
        dynamicConnectionMcpServerId?: string | null;
        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;
                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;
            resource?: string;
            redirect_uris: Array<string>;
            scopes: Array<string>;
            description?: string;
            well_known_url?: string;
            default_scopes: Array<string>;
            supports_resource_metadata: boolean;
            additional_scopes?: Array<string>;
            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';
        environmentId?: 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' | 'app';
        multitenant: boolean;
        dynamicConnectionMcpServerId: string | null;
        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;
                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;
            resource?: string;
            redirect_uris: Array<string>;
            scopes: Array<string>;
            description?: string;
            well_known_url?: string;
            default_scopes: Array<string>;
            supports_resource_metadata: boolean;
            additional_scopes?: Array<string>;
            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';
        clonedFrom: string | null;
        environmentId: string | null;
        catalogReinstallRequired: boolean;
        catalogItemApprovalStatus: string | null;
        catalogItemApprovalReason: string | null;
        catalogItemApprovalReviewedBy: string | null;
        catalogItemApprovalReviewedAt: string | null;
        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 RefreshInternalMcpCatalogImageData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/internal_mcp_catalog/{id}/refresh-image';
};

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

export type RefreshInternalMcpCatalogImageError = RefreshInternalMcpCatalogImageErrors[keyof RefreshInternalMcpCatalogImageErrors];

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

export type RefreshInternalMcpCatalogImageResponse = RefreshInternalMcpCatalogImageResponses[keyof RefreshInternalMcpCatalogImageResponses];

export type ListPendingImageApprovalCatalogItemsData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/internal_mcp_catalog/pending-image-approval';
};

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

export type ListPendingImageApprovalCatalogItemsError = ListPendingImageApprovalCatalogItemsErrors[keyof ListPendingImageApprovalCatalogItemsErrors];

export type ListPendingImageApprovalCatalogItemsResponses = {
    /**
     * 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' | 'app';
        multitenant: boolean;
        dynamicConnectionMcpServerId: string | null;
        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;
                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;
            resource?: string;
            redirect_uris: Array<string>;
            scopes: Array<string>;
            description?: string;
            well_known_url?: string;
            default_scopes: Array<string>;
            supports_resource_metadata: boolean;
            additional_scopes?: Array<string>;
            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';
        clonedFrom: string | null;
        environmentId: string | null;
        catalogReinstallRequired: boolean;
        catalogItemApprovalStatus: string | null;
        catalogItemApprovalReason: string | null;
        catalogItemApprovalReviewedBy: string | null;
        catalogItemApprovalReviewedAt: string | null;
        createdAt: string;
        updatedAt: string;
        labels: Array<{
            key: string;
            value: string;
        }>;
        teams: Array<{
            id: string;
            name: string;
        }>;
        authorName?: string | null;
    }>;
};

export type ListPendingImageApprovalCatalogItemsResponse = ListPendingImageApprovalCatalogItemsResponses[keyof ListPendingImageApprovalCatalogItemsResponses];

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

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

export type ApproveCatalogItemImageError = ApproveCatalogItemImageErrors[keyof ApproveCatalogItemImageErrors];

export type ApproveCatalogItemImageResponses = {
    /**
     * 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' | 'app';
        multitenant: boolean;
        dynamicConnectionMcpServerId: string | null;
        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;
                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;
            resource?: string;
            redirect_uris: Array<string>;
            scopes: Array<string>;
            description?: string;
            well_known_url?: string;
            default_scopes: Array<string>;
            supports_resource_metadata: boolean;
            additional_scopes?: Array<string>;
            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';
        clonedFrom: string | null;
        environmentId: string | null;
        catalogReinstallRequired: boolean;
        catalogItemApprovalStatus: string | null;
        catalogItemApprovalReason: string | null;
        catalogItemApprovalReviewedBy: string | null;
        catalogItemApprovalReviewedAt: string | null;
        createdAt: string;
        updatedAt: string;
        labels: Array<{
            key: string;
            value: string;
        }>;
        teams: Array<{
            id: string;
            name: string;
        }>;
        authorName?: string | null;
    };
};

export type ApproveCatalogItemImageResponse = ApproveCatalogItemImageResponses[keyof ApproveCatalogItemImageResponses];

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;
        registryServers: Array<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 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 GetK8sCapabilitiesData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/k8s/capabilities';
};

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

export type GetK8sCapabilitiesError = GetK8sCapabilitiesErrors[keyof GetK8sCapabilitiesErrors];

export type GetK8sCapabilitiesResponses = {
    /**
     * Default Response
     */
    200: {
        networkPolicy: {
            kubernetesNetworkPolicy: boolean;
            ciliumNetworkPolicy: boolean;
            gkeFqdnNetworkPolicy: boolean;
            awsApplicationNetworkPolicy: boolean;
            provider: 'cilium' | 'gke-fqdn' | 'aws-application-network-policy' | 'kubernetes' | 'none';
            supportsFqdn: boolean;
            supportsHttpMethods: boolean;
            message: string | null;
        };
    };
};

export type GetK8sCapabilitiesResponse = GetK8sCapabilitiesResponses[keyof GetK8sCapabilitiesResponses];

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' | 'dropbox' | 'onedrive' | 'asana' | 'linear' | 'outline' | 'salesforce' | 'web_crawler' | 'perforce';
            }>;
            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' | 'dropbox' | 'onedrive' | 'asana' | 'linear' | 'outline' | 'salesforce' | 'web_crawler' | 'perforce';
    };
    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' | 'dropbox' | 'onedrive' | 'asana' | 'linear' | 'outline' | 'salesforce' | 'web_crawler' | 'perforce';
            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;
                authMethod?: 'pat' | 'github_app';
                githubAppConfigId?: string;
                repos?: Array<string>;
                includeIssues?: boolean;
                includePullRequests?: boolean;
                includeRepositoryFiles?: boolean;
                fileTypes?: Array<string>;
                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: '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;
            } | {
                type: 'web_crawler';
                startUrl: unknown;
                includePathPrefixes?: Array<string>;
                excludePathPatterns?: Array<string>;
                contentSelector?: string;
                excludeSelectors?: Array<string>;
                maxPages?: number;
                maxDepth?: number;
                batchSize?: number;
                requestDelayMs?: number;
                userAgent?: string;
                allowPrivateNetwork?: boolean;
            } | {
                type: 'perforce';
                serverUrl: unknown;
                depotPaths: Array<string>;
                excludePaths?: Array<string>;
                fileTypes?: Array<string>;
            };
            secretId: string | null;
            environmentId: 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' | 'dropbox' | 'onedrive' | 'asana' | 'linear' | 'outline' | 'salesforce' | 'web_crawler' | 'perforce';
        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;
            authMethod?: 'pat' | 'github_app';
            githubAppConfigId?: string;
            repos?: Array<string>;
            includeIssues?: boolean;
            includePullRequests?: boolean;
            includeRepositoryFiles?: boolean;
            fileTypes?: Array<string>;
            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: '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;
        } | {
            type: 'web_crawler';
            startUrl: string;
            includePathPrefixes?: Array<string>;
            excludePathPatterns?: Array<string>;
            contentSelector?: string;
            excludeSelectors?: Array<string>;
            maxPages?: number;
            maxDepth?: number;
            batchSize?: number;
            requestDelayMs?: number;
            userAgent?: string;
            allowPrivateNetwork?: boolean;
        } | {
            type: 'perforce';
            serverUrl: string;
            depotPaths: Array<string>;
            excludePaths?: Array<string>;
            fileTypes?: Array<string>;
        };
        credentials?: {
            email?: string;
            apiToken: string;
            githubApp?: {
                githubUrl: string;
                appId: string;
                installationId: string;
            };
        };
        schedule?: string;
        enabled?: boolean;
        knowledgeBaseIds?: Array<string>;
        environmentId?: string | null;
    };
    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' | 'dropbox' | 'onedrive' | 'asana' | 'linear' | 'outline' | 'salesforce' | 'web_crawler' | 'perforce';
        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;
            authMethod?: 'pat' | 'github_app';
            githubAppConfigId?: string;
            repos?: Array<string>;
            includeIssues?: boolean;
            includePullRequests?: boolean;
            includeRepositoryFiles?: boolean;
            fileTypes?: Array<string>;
            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: '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;
        } | {
            type: 'web_crawler';
            startUrl: unknown;
            includePathPrefixes?: Array<string>;
            excludePathPatterns?: Array<string>;
            contentSelector?: string;
            excludeSelectors?: Array<string>;
            maxPages?: number;
            maxDepth?: number;
            batchSize?: number;
            requestDelayMs?: number;
            userAgent?: string;
            allowPrivateNetwork?: boolean;
        } | {
            type: 'perforce';
            serverUrl: unknown;
            depotPaths: Array<string>;
            excludePaths?: Array<string>;
            fileTypes?: Array<string>;
        };
        secretId: string | null;
        environmentId: 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' | 'dropbox' | 'onedrive' | 'asana' | 'linear' | 'outline' | 'salesforce' | 'web_crawler' | 'perforce';
        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;
            authMethod?: 'pat' | 'github_app';
            githubAppConfigId?: string;
            repos?: Array<string>;
            includeIssues?: boolean;
            includePullRequests?: boolean;
            includeRepositoryFiles?: boolean;
            fileTypes?: Array<string>;
            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: '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;
        } | {
            type: 'web_crawler';
            startUrl: unknown;
            includePathPrefixes?: Array<string>;
            excludePathPatterns?: Array<string>;
            contentSelector?: string;
            excludeSelectors?: Array<string>;
            maxPages?: number;
            maxDepth?: number;
            batchSize?: number;
            requestDelayMs?: number;
            userAgent?: string;
            allowPrivateNetwork?: boolean;
        } | {
            type: 'perforce';
            serverUrl: unknown;
            depotPaths: Array<string>;
            excludePaths?: Array<string>;
            fileTypes?: Array<string>;
        };
        secretId: string | null;
        environmentId: 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;
            authMethod?: 'pat' | 'github_app';
            githubAppConfigId?: string;
            repos?: Array<string>;
            includeIssues?: boolean;
            includePullRequests?: boolean;
            includeRepositoryFiles?: boolean;
            fileTypes?: Array<string>;
            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: '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;
        } | {
            type: 'web_crawler';
            startUrl: string;
            includePathPrefixes?: Array<string>;
            excludePathPatterns?: Array<string>;
            contentSelector?: string;
            excludeSelectors?: Array<string>;
            maxPages?: number;
            maxDepth?: number;
            batchSize?: number;
            requestDelayMs?: number;
            userAgent?: string;
            allowPrivateNetwork?: boolean;
        } | {
            type: 'perforce';
            serverUrl: string;
            depotPaths: Array<string>;
            excludePaths?: Array<string>;
            fileTypes?: Array<string>;
        };
        credentials?: {
            email?: string;
            apiToken: string;
            githubApp?: {
                githubUrl: string;
                appId: string;
                installationId: string;
            };
        };
        schedule?: string;
        enabled?: boolean;
        environmentId?: string | null;
    };
    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' | 'dropbox' | 'onedrive' | 'asana' | 'linear' | 'outline' | 'salesforce' | 'web_crawler' | 'perforce';
        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;
            authMethod?: 'pat' | 'github_app';
            githubAppConfigId?: string;
            repos?: Array<string>;
            includeIssues?: boolean;
            includePullRequests?: boolean;
            includeRepositoryFiles?: boolean;
            fileTypes?: Array<string>;
            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: '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;
        } | {
            type: 'web_crawler';
            startUrl: unknown;
            includePathPrefixes?: Array<string>;
            excludePathPatterns?: Array<string>;
            contentSelector?: string;
            excludeSelectors?: Array<string>;
            maxPages?: number;
            maxDepth?: number;
            batchSize?: number;
            requestDelayMs?: number;
            userAgent?: string;
            allowPrivateNetwork?: boolean;
        } | {
            type: 'perforce';
            serverUrl: unknown;
            depotPaths: Array<string>;
            excludePaths?: Array<string>;
            fileTypes?: Array<string>;
        };
        secretId: string | null;
        environmentId: 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 GetConnectorDocumentsData = {
    body?: never;
    path: {
        id: string;
    };
    query?: {
        limit?: number;
        offset?: number;
        search?: string;
    };
    url: '/api/connectors/{id}/documents';
};

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

export type GetConnectorDocumentsError = GetConnectorDocumentsErrors[keyof GetConnectorDocumentsErrors];

export type GetConnectorDocumentsResponses = {
    /**
     * Default Response
     */
    200: {
        data: Array<{
            id: string;
            organizationId: string;
            sourceId: string | null;
            connectorId: string;
            title: string;
            contentHash: string;
            sourceUrl: string | null;
            acl: Array<string>;
            metadata: {
                [key: string]: unknown;
            } | null;
            embeddingStatus: 'pending' | 'processing' | 'completed' | 'failed';
            chunkCount: number;
            createdAt: string;
            updatedAt: string;
            connectorType: 'jira' | 'confluence' | 'github' | 'gitlab' | 'servicenow' | 'notion' | 'sharepoint' | 'gdrive' | 'dropbox' | 'onedrive' | 'asana' | 'linear' | 'outline' | 'salesforce' | 'web_crawler' | 'perforce';
        }>;
        pagination: {
            currentPage: number;
            limit: number;
            total: number;
            totalPages: number;
            hasNext: boolean;
            hasPrev: boolean;
        };
    };
};

export type GetConnectorDocumentsResponse = GetConnectorDocumentsResponses[keyof GetConnectorDocumentsResponses];

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

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

export type DeleteConnectorDocumentError = DeleteConnectorDocumentErrors[keyof DeleteConnectorDocumentErrors];

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

export type DeleteConnectorDocumentResponse = DeleteConnectorDocumentResponses[keyof DeleteConnectorDocumentResponses];

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

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

export type GetConnectorDocumentError = GetConnectorDocumentErrors[keyof GetConnectorDocumentErrors];

export type GetConnectorDocumentResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        sourceId: string | null;
        connectorId: string;
        title: string;
        content: string;
        contentHash: string;
        sourceUrl: string | null;
        acl: Array<string>;
        metadata: {
            [key: string]: unknown;
        } | null;
        embeddingStatus: 'pending' | 'processing' | 'completed' | 'failed';
        chunkCount: number;
        createdAt: string;
        updatedAt: string;
        connectorType: 'jira' | 'confluence' | 'github' | 'gitlab' | 'servicenow' | 'notion' | 'sharepoint' | 'gdrive' | 'dropbox' | 'onedrive' | 'asana' | 'linear' | 'outline' | 'salesforce' | 'web_crawler' | 'perforce';
    };
};

export type GetConnectorDocumentResponse = GetConnectorDocumentResponses[keyof GetConnectorDocumentResponses];

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 GetLimitsData = {
    body?: never;
    path?: never;
    query?: {
        entityType?: 'organization' | 'team' | 'agent' | 'user' | 'virtual_key' | 'environment';
        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' | 'environment';
        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' | 'calendar_day' | 'calendar_week_sunday' | 'calendar_week_monday' | 'calendar_month';
        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' | 'environment';
        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' | 'calendar_day' | 'calendar_week_sunday' | 'calendar_week_monday' | 'calendar_month';
        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' | 'environment';
        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' | 'calendar_day' | 'calendar_week_sunday' | 'calendar_week_monday' | 'calendar_month';
        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' | 'environment';
        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' | 'calendar_day' | 'calendar_week_sunday' | 'calendar_week_monday' | 'calendar_month';
        lastCleanup: string | null;
        createdAt: string;
        updatedAt: string;
    };
};

export type GetLimitResponse = GetLimitResponses[keyof GetLimitResponses];

export type UpdateLimitData = {
    body: {
        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' | 'calendar_day' | 'calendar_week_sunday' | 'calendar_week_monday' | 'calendar_month';
        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' | 'environment';
        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' | 'calendar_day' | 'calendar_week_sunday' | 'calendar_week_monday' | 'calendar_month';
        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' | 'github-copilot';
        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' | 'github-copilot';
        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' | 'derived_multiplier' | 'default';
            pricePerMillionCacheRead: string | null;
            pricePerMillionCacheWrite: string | null;
            cachePriceSource: 'custom' | 'models_dev' | 'derived_multiplier' | 'default';
        };
        isBest?: boolean;
        isFree: boolean;
        embeddingDimensions?: EmbeddingDimensions | null;
        requiresUserConnection?: boolean;
        isConnected?: boolean;
    }>;
};

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' | 'github-copilot';
        modelId: string;
        description: string | null;
        contextLength: number | null;
        outputLength: 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;
        cacheReadPricePerToken: string | null;
        cacheWritePricePerToken: string | null;
        customPricePerMillionInput: string | null;
        customPricePerMillionOutput: string | null;
        customPricePerMillionCacheRead: string | null;
        customPricePerMillionCacheWrite: string | null;
        ignored: boolean;
        embeddingDimensions: EmbeddingDimensions | null;
        defaultParameters: {
            [key: string]: string | number | Array<string>;
        } | null;
        discoveredViaLlmProxy: boolean;
        lastSyncedAt: string;
        createdAt: string;
        updatedAt: string;
        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' | 'derived_multiplier' | 'default';
        pricePerMillionCacheRead: string | null;
        pricePerMillionCacheWrite: string | null;
        cachePriceSource: 'custom' | 'models_dev' | 'derived_multiplier' | 'default';
        isFree: boolean;
    }>;
};

export type GetModelsWithApiKeysResponse = GetModelsWithApiKeysResponses[keyof GetModelsWithApiKeysResponses];

export type UpdateModelData = {
    body: {
        customPricePerMillionInput?: string | null;
        customPricePerMillionOutput?: string | null;
        customPricePerMillionCacheRead?: string | null;
        customPricePerMillionCacheWrite?: 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' | 'github-copilot';
        modelId: string;
        description: string | null;
        contextLength: number | null;
        outputLength: 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;
        cacheReadPricePerToken: string | null;
        cacheWritePricePerToken: string | null;
        customPricePerMillionInput: string | null;
        customPricePerMillionOutput: string | null;
        customPricePerMillionCacheRead: string | null;
        customPricePerMillionCacheWrite: string | null;
        ignored: boolean;
        embeddingDimensions: EmbeddingDimensions | null;
        defaultParameters: {
            [key: string]: string | number | Array<string>;
        } | 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;
        grantType: 'client_credentials' | 'authorization_code';
        allowedLlmProxyIds: Array<string>;
        providerApiKeys: Array<{
            provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
            providerApiKeyId: string;
            providerApiKeyName: string;
        }>;
        redirectUris: Array<string>;
        disabled: boolean;
        scope: 'personal' | 'team' | 'org';
        authorId: string | null;
        authorName: string | null;
        teams: Array<{
            id: string;
            name: string;
        }>;
        createdAt: string;
        updatedAt: string;
    }>;
};

export type GetLlmOauthClientsResponse = GetLlmOauthClientsResponses[keyof GetLlmOauthClientsResponses];

export type CreateLlmOauthClientData = {
    body: {
        name: string;
        grantType?: 'client_credentials' | 'authorization_code';
        allowedLlmProxyIds?: Array<string>;
        providerApiKeys?: Array<{
            provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
            providerApiKeyId: string;
        }>;
        redirectUris?: Array<string>;
        scope?: 'personal' | 'team' | 'org';
        teams?: Array<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;
        grantType: 'client_credentials' | 'authorization_code';
        allowedLlmProxyIds: Array<string>;
        providerApiKeys: Array<{
            provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
            providerApiKeyId: string;
            providerApiKeyName: string;
        }>;
        redirectUris: Array<string>;
        disabled: boolean;
        scope: 'personal' | 'team' | 'org';
        authorId: string | null;
        authorName: string | null;
        teams: Array<{
            id: string;
            name: string;
        }>;
        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;
        grantType?: 'client_credentials' | 'authorization_code';
        allowedLlmProxyIds?: Array<string>;
        providerApiKeys?: Array<{
            provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
            providerApiKeyId: string;
        }>;
        redirectUris?: Array<string>;
        scope?: 'personal' | 'team' | 'org';
        teams?: Array<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;
        grantType: 'client_credentials' | 'authorization_code';
        allowedLlmProxyIds: Array<string>;
        providerApiKeys: Array<{
            provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
            providerApiKeyId: string;
            providerApiKeyName: string;
        }>;
        redirectUris: Array<string>;
        disabled: boolean;
        scope: 'personal' | 'team' | 'org';
        authorId: string | null;
        authorName: string | null;
        teams: Array<{
            id: string;
            name: string;
        }>;
        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;
        grantType: 'client_credentials' | 'authorization_code';
        allowedLlmProxyIds: Array<string>;
        providerApiKeys: Array<{
            provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
            providerApiKeyId: string;
            providerApiKeyName: string;
        }>;
        redirectUris: Array<string>;
        disabled: boolean;
        scope: 'personal' | 'team' | 'org';
        authorId: string | null;
        authorName: string | null;
        teams: Array<{
            id: string;
            name: string;
        }>;
        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' | 'github-copilot';
    };
    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' | 'github-copilot';
        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' | 'github-copilot';
        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' | 'github-copilot';
        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' | 'github-copilot';
        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' | 'github-copilot';
        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' | 'github-copilot';
        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' | 'github-copilot';
        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 McpAppProxyPostData = {
    body: {
        [key: string]: unknown;
    };
    path: {
        appId: string;
    };
    query?: never;
    url: '/api/mcp/app/{appId}';
};

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

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 GetMcpOauthClientsData = {
    body?: never;
    path?: never;
    query?: {
        search?: string;
    };
    url: '/api/mcp-oauth-clients';
};

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

export type GetMcpOauthClientsError = GetMcpOauthClientsErrors[keyof GetMcpOauthClientsErrors];

export type GetMcpOauthClientsResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        clientId: string;
        name: string;
        organizationId: string;
        grantType: 'client_credentials' | 'authorization_code';
        allowedGatewayIds: Array<string>;
        redirectUris: Array<string>;
        disabled: boolean;
        scope: 'personal' | 'team' | 'org';
        authorId: string | null;
        authorName: string | null;
        teams: Array<{
            id: string;
            name: string;
        }>;
        createdAt: string;
        updatedAt: string;
    }>;
};

export type GetMcpOauthClientsResponse = GetMcpOauthClientsResponses[keyof GetMcpOauthClientsResponses];

export type CreateMcpOauthClientData = {
    body: {
        name: string;
        grantType?: 'client_credentials' | 'authorization_code';
        allowedGatewayIds?: Array<string>;
        redirectUris?: Array<string>;
        scope?: 'personal' | 'team' | 'org';
        teams?: Array<string>;
    };
    path?: never;
    query?: never;
    url: '/api/mcp-oauth-clients';
};

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

export type CreateMcpOauthClientError = CreateMcpOauthClientErrors[keyof CreateMcpOauthClientErrors];

export type CreateMcpOauthClientResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        clientId: string;
        name: string;
        organizationId: string;
        grantType: 'client_credentials' | 'authorization_code';
        allowedGatewayIds: Array<string>;
        redirectUris: Array<string>;
        disabled: boolean;
        scope: 'personal' | 'team' | 'org';
        authorId: string | null;
        authorName: string | null;
        teams: Array<{
            id: string;
            name: string;
        }>;
        createdAt: string;
        updatedAt: string;
        clientSecret: string;
    };
};

export type CreateMcpOauthClientResponse = CreateMcpOauthClientResponses[keyof CreateMcpOauthClientResponses];

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

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

export type DeleteMcpOauthClientError = DeleteMcpOauthClientErrors[keyof DeleteMcpOauthClientErrors];

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

export type DeleteMcpOauthClientResponse = DeleteMcpOauthClientResponses[keyof DeleteMcpOauthClientResponses];

export type UpdateMcpOauthClientData = {
    body: {
        name: string;
        grantType?: 'client_credentials' | 'authorization_code';
        allowedGatewayIds?: Array<string>;
        redirectUris?: Array<string>;
        scope?: 'personal' | 'team' | 'org';
        teams?: Array<string>;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/mcp-oauth-clients/{id}';
};

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

export type UpdateMcpOauthClientError = UpdateMcpOauthClientErrors[keyof UpdateMcpOauthClientErrors];

export type UpdateMcpOauthClientResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        clientId: string;
        name: string;
        organizationId: string;
        grantType: 'client_credentials' | 'authorization_code';
        allowedGatewayIds: Array<string>;
        redirectUris: Array<string>;
        disabled: boolean;
        scope: 'personal' | 'team' | 'org';
        authorId: string | null;
        authorName: string | null;
        teams: Array<{
            id: string;
            name: string;
        }>;
        createdAt: string;
        updatedAt: string;
    };
};

export type UpdateMcpOauthClientResponse = UpdateMcpOauthClientResponses[keyof UpdateMcpOauthClientResponses];

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

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

export type RotateMcpOauthClientSecretError = RotateMcpOauthClientSecretErrors[keyof RotateMcpOauthClientSecretErrors];

export type RotateMcpOauthClientSecretResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        clientId: string;
        name: string;
        organizationId: string;
        grantType: 'client_credentials' | 'authorization_code';
        allowedGatewayIds: Array<string>;
        redirectUris: Array<string>;
        disabled: boolean;
        scope: 'personal' | 'team' | 'org';
        authorId: string | null;
        authorName: string | null;
        teams: Array<{
            id: string;
            name: string;
        }>;
        createdAt: string;
        updatedAt: string;
        clientSecret: string;
    };
};

export type RotateMcpOauthClientSecretResponse = RotateMcpOauthClientSecretResponses[keyof RotateMcpOauthClientSecretResponses];

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;
                resource?: string;
                redirect_uris: Array<string>;
                scopes: Array<string>;
                description?: string;
                well_known_url?: string;
                default_scopes: Array<string>;
                supports_resource_metadata: boolean;
                additional_scopes?: Array<string>;
                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;
                    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;
                resource?: string;
                redirect_uris: Array<string>;
                scopes: Array<string>;
                description?: string;
                well_known_url?: string;
                default_scopes: Array<string>;
                supports_resource_metadata: boolean;
                additional_scopes?: Array<string>;
                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;
                    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;
                resource?: string;
                redirect_uris: Array<string>;
                scopes: Array<string>;
                description?: string;
                well_known_url?: string;
                default_scopes: Array<string>;
                supports_resource_metadata: boolean;
                additional_scopes?: Array<string>;
                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;
                    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;
                resource?: string;
                redirect_uris: Array<string>;
                scopes: Array<string>;
                description?: string;
                well_known_url?: string;
                default_scopes: Array<string>;
                supports_resource_metadata: boolean;
                additional_scopes?: Array<string>;
                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;
                    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;
                resource?: string;
                redirect_uris: Array<string>;
                scopes: Array<string>;
                description?: string;
                well_known_url?: string;
                default_scopes: Array<string>;
                supports_resource_metadata: boolean;
                additional_scopes?: Array<string>;
                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;
                    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;
                resource?: string;
                redirect_uris: Array<string>;
                scopes: Array<string>;
                description?: string;
                well_known_url?: string;
                default_scopes: Array<string>;
                supports_resource_metadata: boolean;
                additional_scopes?: Array<string>;
                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;
                    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;
                resource?: string;
                redirect_uris: Array<string>;
                scopes: Array<string>;
                description?: string;
                well_known_url?: string;
                default_scopes: Array<string>;
                supports_resource_metadata: boolean;
                additional_scopes?: Array<string>;
                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;
                    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;
                resource?: string;
                redirect_uris: Array<string>;
                scopes: Array<string>;
                description?: string;
                well_known_url?: string;
                default_scopes: Array<string>;
                supports_resource_metadata: boolean;
                additional_scopes?: Array<string>;
                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;
                    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;
                resource?: string;
                redirect_uris: Array<string>;
                scopes: Array<string>;
                description?: string;
                well_known_url?: string;
                default_scopes: Array<string>;
                supports_resource_metadata: boolean;
                additional_scopes?: Array<string>;
                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;
                    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 McpServerProxyPostData = {
    body: {
        [key: string]: unknown;
    };
    path: {
        mcpServerId: string;
    };
    query?: never;
    url: '/api/mcp/server/{mcpServerId}';
};

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

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' | 'app';
        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';
        oauthRefreshErrorMessage: string | null;
        oauthRefreshErrorDescription: string | null;
        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;
        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' | 'app';
        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';
        oauthRefreshErrorMessage: string | null;
        oauthRefreshErrorDescription: string | null;
        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' | 'app';
        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';
        oauthRefreshErrorMessage: string | null;
        oauthRefreshErrorDescription: string | null;
        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' | 'app';
        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';
        oauthRefreshErrorMessage: string | null;
        oauthRefreshErrorDescription: string | null;
        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' | 'app';
        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';
        oauthRefreshErrorMessage: string | null;
        oauthRefreshErrorDescription: string | null;
        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;
            ownerType: string;
            agentId: string | null;
            appId: 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;
        ownerType: string;
        agentId: string | null;
        appId: 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 MistralEmbeddingsWithDefaultAgentData = {
    body: {
        model: string;
        input: string | Array<string>;
        dimensions?: number;
        encoding_format?: 'float' | 'base64';
    };
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path?: never;
    query?: never;
    url: '/v1/mistral/embeddings';
};

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

export type MistralEmbeddingsWithDefaultAgentError = MistralEmbeddingsWithDefaultAgentErrors[keyof MistralEmbeddingsWithDefaultAgentErrors];

export type MistralEmbeddingsWithDefaultAgentResponses = {
    /**
     * Default Response
     */
    200: {
        object: 'list';
        data: Array<{
            object: 'embedding';
            embedding: Array<number>;
            index: number;
        }>;
        model: string;
        usage: {
            prompt_tokens: number;
            total_tokens: number;
        };
    };
};

export type MistralEmbeddingsWithDefaultAgentResponse = MistralEmbeddingsWithDefaultAgentResponses[keyof MistralEmbeddingsWithDefaultAgentResponses];

export type MistralEmbeddingsWithAgentData = {
    body: {
        model: string;
        input: string | Array<string>;
        dimensions?: number;
        encoding_format?: 'float' | 'base64';
    };
    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}/embeddings';
};

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

export type MistralEmbeddingsWithAgentError = MistralEmbeddingsWithAgentErrors[keyof MistralEmbeddingsWithAgentErrors];

export type MistralEmbeddingsWithAgentResponses = {
    /**
     * Default Response
     */
    200: {
        object: 'list';
        data: Array<{
            object: 'embedding';
            embedding: Array<number>;
            index: number;
        }>;
        model: string;
        usage: {
            prompt_tokens: number;
            total_tokens: number;
        };
    };
};

export type MistralEmbeddingsWithAgentResponse = MistralEmbeddingsWithAgentResponses[keyof MistralEmbeddingsWithAgentResponses];

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 ModelRouterEmbeddingsWithDefaultAgentData = {
    body: {
        model: string;
        input: string | Array<string>;
        dimensions?: number;
        encoding_format?: 'float' | 'base64';
    };
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path?: never;
    query?: never;
    url: '/v1/model-router/embeddings';
};

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

export type ModelRouterEmbeddingsWithDefaultAgentError = ModelRouterEmbeddingsWithDefaultAgentErrors[keyof ModelRouterEmbeddingsWithDefaultAgentErrors];

export type ModelRouterEmbeddingsWithDefaultAgentResponses = {
    /**
     * Default Response
     */
    200: {
        object: 'list';
        data: Array<{
            object: 'embedding';
            embedding: Array<number>;
            index: number;
        }>;
        model: string;
        usage: {
            prompt_tokens: number;
            total_tokens: number;
        };
    };
};

export type ModelRouterEmbeddingsWithDefaultAgentResponse = ModelRouterEmbeddingsWithDefaultAgentResponses[keyof ModelRouterEmbeddingsWithDefaultAgentResponses];

export type ModelRouterEmbeddingsWithAgentData = {
    body: {
        model: string;
        input: string | Array<string>;
        dimensions?: number;
        encoding_format?: 'float' | 'base64';
    };
    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}/embeddings';
};

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

export type ModelRouterEmbeddingsWithAgentError = ModelRouterEmbeddingsWithAgentErrors[keyof ModelRouterEmbeddingsWithAgentErrors];

export type ModelRouterEmbeddingsWithAgentResponses = {
    /**
     * Default Response
     */
    200: {
        object: 'list';
        data: Array<{
            object: 'embedding';
            embedding: Array<number>;
            index: number;
        }>;
        model: string;
        usage: {
            prompt_tokens: number;
            total_tokens: number;
        };
    };
};

export type ModelRouterEmbeddingsWithAgentResponse = ModelRouterEmbeddingsWithAgentResponses[keyof ModelRouterEmbeddingsWithAgentResponses];

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 OllamaEmbeddingsWithDefaultAgentData = {
    body: {
        model: string;
        input: string | Array<string>;
        dimensions?: number;
        encoding_format?: 'float' | 'base64';
    };
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path?: never;
    query?: never;
    url: '/v1/ollama/embeddings';
};

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

export type OllamaEmbeddingsWithDefaultAgentError = OllamaEmbeddingsWithDefaultAgentErrors[keyof OllamaEmbeddingsWithDefaultAgentErrors];

export type OllamaEmbeddingsWithDefaultAgentResponses = {
    /**
     * Default Response
     */
    200: {
        object: 'list';
        data: Array<{
            object: 'embedding';
            embedding: Array<number>;
            index: number;
        }>;
        model: string;
        usage: {
            prompt_tokens: number;
            total_tokens: number;
        };
    };
};

export type OllamaEmbeddingsWithDefaultAgentResponse = OllamaEmbeddingsWithDefaultAgentResponses[keyof OllamaEmbeddingsWithDefaultAgentResponses];

export type OllamaEmbeddingsWithAgentData = {
    body: {
        model: string;
        input: string | Array<string>;
        dimensions?: number;
        encoding_format?: 'float' | 'base64';
    };
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/ollama/{agentId}/embeddings';
};

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

export type OllamaEmbeddingsWithAgentError = OllamaEmbeddingsWithAgentErrors[keyof OllamaEmbeddingsWithAgentErrors];

export type OllamaEmbeddingsWithAgentResponses = {
    /**
     * Default Response
     */
    200: {
        object: 'list';
        data: Array<{
            object: 'embedding';
            embedding: Array<number>;
            index: number;
        }>;
        model: string;
        usage: {
            prompt_tokens: number;
            total_tokens: number;
        };
    };
};

export type OllamaEmbeddingsWithAgentResponse = OllamaEmbeddingsWithAgentResponses[keyof OllamaEmbeddingsWithAgentResponses];

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 GetOnboardingSeenNavItemsData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/onboarding/seen-nav-items';
};

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

export type GetOnboardingSeenNavItemsError = GetOnboardingSeenNavItemsErrors[keyof GetOnboardingSeenNavItemsErrors];

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

export type GetOnboardingSeenNavItemsResponse = GetOnboardingSeenNavItemsResponses[keyof GetOnboardingSeenNavItemsResponses];

export type MarkOnboardingNavItemsSeenData = {
    body: {
        items: Array<string>;
    };
    path?: never;
    query?: never;
    url: '/api/onboarding/seen-nav-items';
};

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

export type MarkOnboardingNavItemsSeenError = MarkOnboardingNavItemsSeenErrors[keyof MarkOnboardingNavItemsSeenErrors];

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

export type MarkOnboardingNavItemsSeenResponse = MarkOnboardingNavItemsSeenResponses[keyof MarkOnboardingNavItemsSeenResponses];

export type GetOnboardingSurveyEligibilityData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/onboarding/survey-eligibility';
};

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

export type GetOnboardingSurveyEligibilityError = GetOnboardingSurveyEligibilityErrors[keyof GetOnboardingSurveyEligibilityErrors];

export type GetOnboardingSurveyEligibilityResponses = {
    /**
     * Default Response
     */
    200: {
        eligible: boolean;
    };
};

export type GetOnboardingSurveyEligibilityResponse = GetOnboardingSurveyEligibilityResponses[keyof GetOnboardingSurveyEligibilityResponses];

export type SubmitOnboardingSurveyData = {
    body: {
        role: string;
        workEnvironment: string;
        referralSource: string;
        workEmail?: string;
    };
    path?: never;
    query?: never;
    url: '/api/onboarding/survey';
};

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

export type SubmitOnboardingSurveyError = SubmitOnboardingSurveyErrors[keyof SubmitOnboardingSurveyErrors];

export type SubmitOnboardingSurveyResponses = {
    /**
     * Default Response
     */
    200: {
        ok: true;
    };
};

export type SubmitOnboardingSurveyResponse = SubmitOnboardingSurveyResponses[keyof SubmitOnboardingSurveyResponses];

export type GetFeedbackPopupActivationData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/onboarding/feedback-popup-activation';
};

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

export type GetFeedbackPopupActivationError = GetFeedbackPopupActivationErrors[keyof GetFeedbackPopupActivationErrors];

export type GetFeedbackPopupActivationResponses = {
    /**
     * Default Response
     */
    200: {
        activatedAt: string | null;
    };
};

export type GetFeedbackPopupActivationResponse = GetFeedbackPopupActivationResponses[keyof GetFeedbackPopupActivationResponses];

export type OpenAiEmbeddingsWithDefaultAgentData = {
    body: {
        model: string;
        input: string | Array<string>;
        dimensions?: number;
        encoding_format?: 'float' | 'base64';
    };
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path?: never;
    query?: never;
    url: '/v1/openai/embeddings';
};

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

export type OpenAiEmbeddingsWithDefaultAgentError = OpenAiEmbeddingsWithDefaultAgentErrors[keyof OpenAiEmbeddingsWithDefaultAgentErrors];

export type OpenAiEmbeddingsWithDefaultAgentResponses = {
    /**
     * Default Response
     */
    200: {
        object: 'list';
        data: Array<{
            object: 'embedding';
            embedding: Array<number>;
            index: number;
        }>;
        model: string;
        usage: {
            prompt_tokens: number;
            total_tokens: number;
        };
    };
};

export type OpenAiEmbeddingsWithDefaultAgentResponse = OpenAiEmbeddingsWithDefaultAgentResponses[keyof OpenAiEmbeddingsWithDefaultAgentResponses];

export type OpenAiEmbeddingsWithAgentData = {
    body: {
        model: string;
        input: string | Array<string>;
        dimensions?: number;
        encoding_format?: 'float' | 'base64';
    };
    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}/embeddings';
};

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

export type OpenAiEmbeddingsWithAgentError = OpenAiEmbeddingsWithAgentErrors[keyof OpenAiEmbeddingsWithAgentErrors];

export type OpenAiEmbeddingsWithAgentResponses = {
    /**
     * Default Response
     */
    200: {
        object: 'list';
        data: Array<{
            object: 'embedding';
            embedding: Array<number>;
            index: number;
        }>;
        model: string;
        usage: {
            prompt_tokens: number;
            total_tokens: number;
        };
    };
};

export type OpenAiEmbeddingsWithAgentResponse = OpenAiEmbeddingsWithAgentResponses[keyof OpenAiEmbeddingsWithAgentResponses];

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 OpenAiListModelsWithDefaultAgentData = {
    body?: never;
    headers?: {
        authorization?: string;
    };
    path?: never;
    query?: never;
    url: '/v1/openai/models';
};

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

export type OpenAiListModelsWithDefaultAgentError = OpenAiListModelsWithDefaultAgentErrors[keyof OpenAiListModelsWithDefaultAgentErrors];

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

export type OpenAiListModelsWithDefaultAgentResponse = OpenAiListModelsWithDefaultAgentResponses[keyof OpenAiListModelsWithDefaultAgentResponses];

export type OpenAiListModelsWithAgentData = {
    body?: never;
    headers?: {
        authorization?: string;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/openai/{agentId}/models';
};

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

export type OpenAiListModelsWithAgentError = OpenAiListModelsWithAgentErrors[keyof OpenAiListModelsWithAgentErrors];

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

export type OpenAiListModelsWithAgentResponse = OpenAiListModelsWithAgentResponses[keyof OpenAiListModelsWithAgentResponses];

export type OpenrouterChatCompletionsWithDefaultAgentData = {
    body: OpenrouterChatCompletionRequestInput;
    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: OpenrouterChatCompletionRequestInput;
    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' | 'github-copilot';
        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' | 'github-copilot';
        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' | 'github-copilot';
        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' | 'github-copilot';
        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' | 'github-copilot';
        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' | 'github-copilot';
        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' | 'execute' | 'deploy-to-restricted' | 'manage'>;
            };
            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' | 'execute' | 'deploy-to-restricted' | 'manage'>;
        };
    };
    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' | 'execute' | 'deploy-to-restricted' | 'manage'>;
        };
        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' | 'execute' | 'deploy-to-restricted' | 'manage'>;
        };
        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' | 'execute' | 'deploy-to-restricted' | 'manage'>;
        };
    };
    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' | 'execute' | 'deploy-to-restricted' | 'manage'>;
        };
        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;
        analyticsInstanceId: string;
        logo: string | null;
        logoDark: string | null;
        createdAt: string;
        metadata: string | null;
        onboardingComplete: boolean;
        onboardingSurveyCompletedAt: string | null;
        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';
        defaultDiscoveredToolInvocationPolicy: 'allow_when_context_is_untrusted' | 'block_when_context_is_untrusted' | 'block_always' | 'require_approval';
        defaultDiscoveredToolResultPolicy: 'block_always' | 'mark_as_trusted' | 'mark_as_untrusted' | 'sanitize_with_dual_llm';
        allowChatFileUploads: boolean;
        allowToolAutoAssignment: 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' | 'github-copilot';
        defaultModelId: string | null;
        defaultLlmApiKeyId: string | null;
        defaultUserLimitValue: number | null;
        defaultUserLimitModel: Array<string> | null;
        defaultUserLimitCleanupInterval: '1h' | '12h' | '24h' | '1w' | '1m' | 'calendar_day' | 'calendar_week_sunday' | 'calendar_week_monday' | 'calendar_month';
        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;
        connectionDefaultProviderKeys: {
            [key: string]: string;
        } | null;
        defaultEnvironmentName: string | null;
        defaultEnvironmentNamespace: string | null;
        defaultEnvironmentDescription: string | null;
        defaultNetworkPolicy: {
            egressMode: 'off' | 'restricted' | 'unrestricted';
            domainPreset: 'none' | 'common_dependencies' | 'package_managers';
            allowedDomains: Array<string>;
            allowedCidrs: Array<string>;
        } | null;
        defaultEnvironmentRestricted: boolean;
        defaultEnvironmentValidationRegex: string | null;
        defaultEnvironmentTrustedImageRegistries: Array<string> | null;
        skillToolsEnabled: boolean;
    };
};

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;
        analyticsInstanceId: string;
        logo: string | null;
        logoDark: string | null;
        createdAt: string;
        metadata: string | null;
        onboardingComplete: boolean;
        onboardingSurveyCompletedAt: string | null;
        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';
        defaultDiscoveredToolInvocationPolicy: 'allow_when_context_is_untrusted' | 'block_when_context_is_untrusted' | 'block_always' | 'require_approval';
        defaultDiscoveredToolResultPolicy: 'block_always' | 'mark_as_trusted' | 'mark_as_untrusted' | 'sanitize_with_dual_llm';
        allowChatFileUploads: boolean;
        allowToolAutoAssignment: 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' | 'github-copilot';
        defaultModelId: string | null;
        defaultLlmApiKeyId: string | null;
        defaultUserLimitValue: number | null;
        defaultUserLimitModel: Array<string> | null;
        defaultUserLimitCleanupInterval: '1h' | '12h' | '24h' | '1w' | '1m' | 'calendar_day' | 'calendar_week_sunday' | 'calendar_week_monday' | 'calendar_month';
        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;
        connectionDefaultProviderKeys: {
            [key: string]: string;
        } | null;
        defaultEnvironmentName: string | null;
        defaultEnvironmentNamespace: string | null;
        defaultEnvironmentDescription: string | null;
        defaultNetworkPolicy: {
            egressMode: 'off' | 'restricted' | 'unrestricted';
            domainPreset: 'none' | 'common_dependencies' | 'package_managers';
            allowedDomains: Array<string>;
            allowedCidrs: Array<string>;
        } | null;
        defaultEnvironmentRestricted: boolean;
        defaultEnvironmentValidationRegex: string | null;
        defaultEnvironmentTrustedImageRegistries: Array<string> | null;
        skillToolsEnabled: boolean;
    };
};

export type UpdateAppearanceSettingsResponse = UpdateAppearanceSettingsResponses[keyof UpdateAppearanceSettingsResponses];

export type UpdateSecuritySettingsData = {
    body: {
        defaultDiscoveredToolInvocationPolicy?: 'allow_when_context_is_untrusted' | 'block_when_context_is_untrusted' | 'block_always' | 'require_approval';
        defaultDiscoveredToolResultPolicy?: 'block_always' | 'mark_as_trusted' | 'mark_as_untrusted' | 'sanitize_with_dual_llm';
        allowChatFileUploads?: boolean;
        allowToolAutoAssignment?: 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;
        analyticsInstanceId: string;
        logo: string | null;
        logoDark: string | null;
        createdAt: string;
        metadata: string | null;
        onboardingComplete: boolean;
        onboardingSurveyCompletedAt: string | null;
        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';
        defaultDiscoveredToolInvocationPolicy: 'allow_when_context_is_untrusted' | 'block_when_context_is_untrusted' | 'block_always' | 'require_approval';
        defaultDiscoveredToolResultPolicy: 'block_always' | 'mark_as_trusted' | 'mark_as_untrusted' | 'sanitize_with_dual_llm';
        allowChatFileUploads: boolean;
        allowToolAutoAssignment: 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' | 'github-copilot';
        defaultModelId: string | null;
        defaultLlmApiKeyId: string | null;
        defaultUserLimitValue: number | null;
        defaultUserLimitModel: Array<string> | null;
        defaultUserLimitCleanupInterval: '1h' | '12h' | '24h' | '1w' | '1m' | 'calendar_day' | 'calendar_week_sunday' | 'calendar_week_monday' | 'calendar_month';
        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;
        connectionDefaultProviderKeys: {
            [key: string]: string;
        } | null;
        defaultEnvironmentName: string | null;
        defaultEnvironmentNamespace: string | null;
        defaultEnvironmentDescription: string | null;
        defaultNetworkPolicy: {
            egressMode: 'off' | 'restricted' | 'unrestricted';
            domainPreset: 'none' | 'common_dependencies' | 'package_managers';
            allowedDomains: Array<string>;
            allowedCidrs: Array<string>;
        } | null;
        defaultEnvironmentRestricted: boolean;
        defaultEnvironmentValidationRegex: string | null;
        defaultEnvironmentTrustedImageRegistries: Array<string> | null;
        skillToolsEnabled: boolean;
    };
};

export type UpdateSecuritySettingsResponse = UpdateSecuritySettingsResponses[keyof UpdateSecuritySettingsResponses];

export type UpdateLlmSettingsData = {
    body: {
        convertToolResultsToToon?: boolean;
        compressionScope?: 'organization' | 'team';
    };
    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;
        analyticsInstanceId: string;
        logo: string | null;
        logoDark: string | null;
        createdAt: string;
        metadata: string | null;
        onboardingComplete: boolean;
        onboardingSurveyCompletedAt: string | null;
        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';
        defaultDiscoveredToolInvocationPolicy: 'allow_when_context_is_untrusted' | 'block_when_context_is_untrusted' | 'block_always' | 'require_approval';
        defaultDiscoveredToolResultPolicy: 'block_always' | 'mark_as_trusted' | 'mark_as_untrusted' | 'sanitize_with_dual_llm';
        allowChatFileUploads: boolean;
        allowToolAutoAssignment: 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' | 'github-copilot';
        defaultModelId: string | null;
        defaultLlmApiKeyId: string | null;
        defaultUserLimitValue: number | null;
        defaultUserLimitModel: Array<string> | null;
        defaultUserLimitCleanupInterval: '1h' | '12h' | '24h' | '1w' | '1m' | 'calendar_day' | 'calendar_week_sunday' | 'calendar_week_monday' | 'calendar_month';
        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;
        connectionDefaultProviderKeys: {
            [key: string]: string;
        } | null;
        defaultEnvironmentName: string | null;
        defaultEnvironmentNamespace: string | null;
        defaultEnvironmentDescription: string | null;
        defaultNetworkPolicy: {
            egressMode: 'off' | 'restricted' | 'unrestricted';
            domainPreset: 'none' | 'common_dependencies' | 'package_managers';
            allowedDomains: Array<string>;
            allowedCidrs: Array<string>;
        } | null;
        defaultEnvironmentRestricted: boolean;
        defaultEnvironmentValidationRegex: string | null;
        defaultEnvironmentTrustedImageRegistries: Array<string> | null;
        skillToolsEnabled: boolean;
    };
};

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;
        analyticsInstanceId: string;
        logo: string | null;
        logoDark: string | null;
        createdAt: string;
        metadata: string | null;
        onboardingComplete: boolean;
        onboardingSurveyCompletedAt: string | null;
        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';
        defaultDiscoveredToolInvocationPolicy: 'allow_when_context_is_untrusted' | 'block_when_context_is_untrusted' | 'block_always' | 'require_approval';
        defaultDiscoveredToolResultPolicy: 'block_always' | 'mark_as_trusted' | 'mark_as_untrusted' | 'sanitize_with_dual_llm';
        allowChatFileUploads: boolean;
        allowToolAutoAssignment: 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' | 'github-copilot';
        defaultModelId: string | null;
        defaultLlmApiKeyId: string | null;
        defaultUserLimitValue: number | null;
        defaultUserLimitModel: Array<string> | null;
        defaultUserLimitCleanupInterval: '1h' | '12h' | '24h' | '1w' | '1m' | 'calendar_day' | 'calendar_week_sunday' | 'calendar_week_monday' | 'calendar_month';
        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;
        connectionDefaultProviderKeys: {
            [key: string]: string;
        } | null;
        defaultEnvironmentName: string | null;
        defaultEnvironmentNamespace: string | null;
        defaultEnvironmentDescription: string | null;
        defaultNetworkPolicy: {
            egressMode: 'off' | 'restricted' | 'unrestricted';
            domainPreset: 'none' | 'common_dependencies' | 'package_managers';
            allowedDomains: Array<string>;
            allowedCidrs: Array<string>;
        } | null;
        defaultEnvironmentRestricted: boolean;
        defaultEnvironmentValidationRegex: string | null;
        defaultEnvironmentTrustedImageRegistries: Array<string> | null;
        skillToolsEnabled: boolean;
    };
};

export type UpdateAgentSettingsResponse = UpdateAgentSettingsResponses[keyof UpdateAgentSettingsResponses];

export type UpdateConnectionSettingsData = {
    body: {
        connectionDefaultMcpGatewayId?: string | null;
        connectionDefaultProviderKeys?: {
            [key: string]: 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' | 'github-copilot'> | 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;
        analyticsInstanceId: string;
        logo: string | null;
        logoDark: string | null;
        createdAt: string;
        metadata: string | null;
        onboardingComplete: boolean;
        onboardingSurveyCompletedAt: string | null;
        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';
        defaultDiscoveredToolInvocationPolicy: 'allow_when_context_is_untrusted' | 'block_when_context_is_untrusted' | 'block_always' | 'require_approval';
        defaultDiscoveredToolResultPolicy: 'block_always' | 'mark_as_trusted' | 'mark_as_untrusted' | 'sanitize_with_dual_llm';
        allowChatFileUploads: boolean;
        allowToolAutoAssignment: 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' | 'github-copilot';
        defaultModelId: string | null;
        defaultLlmApiKeyId: string | null;
        defaultUserLimitValue: number | null;
        defaultUserLimitModel: Array<string> | null;
        defaultUserLimitCleanupInterval: '1h' | '12h' | '24h' | '1w' | '1m' | 'calendar_day' | 'calendar_week_sunday' | 'calendar_week_monday' | 'calendar_month';
        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;
        connectionDefaultProviderKeys: {
            [key: string]: string;
        } | null;
        defaultEnvironmentName: string | null;
        defaultEnvironmentNamespace: string | null;
        defaultEnvironmentDescription: string | null;
        defaultNetworkPolicy: {
            egressMode: 'off' | 'restricted' | 'unrestricted';
            domainPreset: 'none' | 'common_dependencies' | 'package_managers';
            allowedDomains: Array<string>;
            allowedCidrs: Array<string>;
        } | null;
        defaultEnvironmentRestricted: boolean;
        defaultEnvironmentValidationRegex: string | null;
        defaultEnvironmentTrustedImageRegistries: Array<string> | null;
        skillToolsEnabled: boolean;
    };
};

export type UpdateConnectionSettingsResponse = UpdateConnectionSettingsResponses[keyof UpdateConnectionSettingsResponses];

export type UpdateDefaultEnvironmentData = {
    body: {
        name?: string | null;
        description?: string | null;
        namespace?: string | null;
        networkPolicy?: {
            egressMode?: 'off' | 'restricted' | 'unrestricted';
            domainPreset?: 'none' | 'common_dependencies' | 'package_managers';
            allowedDomains?: Array<string>;
            allowedCidrs?: Array<string>;
        } | null;
        restricted?: boolean;
        validationRegex?: string | null;
        trustedImageRegistries?: Array<string> | null;
    };
    path?: never;
    query?: never;
    url: '/api/organization/default-environment';
};

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

export type UpdateDefaultEnvironmentError = UpdateDefaultEnvironmentErrors[keyof UpdateDefaultEnvironmentErrors];

export type UpdateDefaultEnvironmentResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        slug: string;
        analyticsInstanceId: string;
        logo: string | null;
        logoDark: string | null;
        createdAt: string;
        metadata: string | null;
        onboardingComplete: boolean;
        onboardingSurveyCompletedAt: string | null;
        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';
        defaultDiscoveredToolInvocationPolicy: 'allow_when_context_is_untrusted' | 'block_when_context_is_untrusted' | 'block_always' | 'require_approval';
        defaultDiscoveredToolResultPolicy: 'block_always' | 'mark_as_trusted' | 'mark_as_untrusted' | 'sanitize_with_dual_llm';
        allowChatFileUploads: boolean;
        allowToolAutoAssignment: 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' | 'github-copilot';
        defaultModelId: string | null;
        defaultLlmApiKeyId: string | null;
        defaultUserLimitValue: number | null;
        defaultUserLimitModel: Array<string> | null;
        defaultUserLimitCleanupInterval: '1h' | '12h' | '24h' | '1w' | '1m' | 'calendar_day' | 'calendar_week_sunday' | 'calendar_week_monday' | 'calendar_month';
        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;
        connectionDefaultProviderKeys: {
            [key: string]: string;
        } | null;
        defaultEnvironmentName: string | null;
        defaultEnvironmentNamespace: string | null;
        defaultEnvironmentDescription: string | null;
        defaultNetworkPolicy: {
            egressMode: 'off' | 'restricted' | 'unrestricted';
            domainPreset: 'none' | 'common_dependencies' | 'package_managers';
            allowedDomains: Array<string>;
            allowedCidrs: Array<string>;
        } | null;
        defaultEnvironmentRestricted: boolean;
        defaultEnvironmentValidationRegex: string | null;
        defaultEnvironmentTrustedImageRegistries: Array<string> | null;
        skillToolsEnabled: boolean;
    };
};

export type UpdateDefaultEnvironmentResponse = UpdateDefaultEnvironmentResponses[keyof UpdateDefaultEnvironmentResponses];

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;
        analyticsInstanceId: string;
        logo: string | null;
        logoDark: string | null;
        createdAt: string;
        metadata: string | null;
        onboardingComplete: boolean;
        onboardingSurveyCompletedAt: string | null;
        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';
        defaultDiscoveredToolInvocationPolicy: 'allow_when_context_is_untrusted' | 'block_when_context_is_untrusted' | 'block_always' | 'require_approval';
        defaultDiscoveredToolResultPolicy: 'block_always' | 'mark_as_trusted' | 'mark_as_untrusted' | 'sanitize_with_dual_llm';
        allowChatFileUploads: boolean;
        allowToolAutoAssignment: 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' | 'github-copilot';
        defaultModelId: string | null;
        defaultLlmApiKeyId: string | null;
        defaultUserLimitValue: number | null;
        defaultUserLimitModel: Array<string> | null;
        defaultUserLimitCleanupInterval: '1h' | '12h' | '24h' | '1w' | '1m' | 'calendar_day' | 'calendar_week_sunday' | 'calendar_week_monday' | 'calendar_month';
        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;
        connectionDefaultProviderKeys: {
            [key: string]: string;
        } | null;
        defaultEnvironmentName: string | null;
        defaultEnvironmentNamespace: string | null;
        defaultEnvironmentDescription: string | null;
        defaultNetworkPolicy: {
            egressMode: 'off' | 'restricted' | 'unrestricted';
            domainPreset: 'none' | 'common_dependencies' | 'package_managers';
            allowedDomains: Array<string>;
            allowedCidrs: Array<string>;
        } | null;
        defaultEnvironmentRestricted: boolean;
        defaultEnvironmentValidationRegex: string | null;
        defaultEnvironmentTrustedImageRegistries: Array<string> | null;
        skillToolsEnabled: boolean;
    };
};

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;
        analyticsInstanceId: string;
        logo: string | null;
        logoDark: string | null;
        createdAt: string;
        metadata: string | null;
        onboardingComplete: boolean;
        onboardingSurveyCompletedAt: string | null;
        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';
        defaultDiscoveredToolInvocationPolicy: 'allow_when_context_is_untrusted' | 'block_when_context_is_untrusted' | 'block_always' | 'require_approval';
        defaultDiscoveredToolResultPolicy: 'block_always' | 'mark_as_trusted' | 'mark_as_untrusted' | 'sanitize_with_dual_llm';
        allowChatFileUploads: boolean;
        allowToolAutoAssignment: 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' | 'github-copilot';
        defaultModelId: string | null;
        defaultLlmApiKeyId: string | null;
        defaultUserLimitValue: number | null;
        defaultUserLimitModel: Array<string> | null;
        defaultUserLimitCleanupInterval: '1h' | '12h' | '24h' | '1w' | '1m' | 'calendar_day' | 'calendar_week_sunday' | 'calendar_week_monday' | 'calendar_month';
        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;
        connectionDefaultProviderKeys: {
            [key: string]: string;
        } | null;
        defaultEnvironmentName: string | null;
        defaultEnvironmentNamespace: string | null;
        defaultEnvironmentDescription: string | null;
        defaultNetworkPolicy: {
            egressMode: 'off' | 'restricted' | 'unrestricted';
            domainPreset: 'none' | 'common_dependencies' | 'package_managers';
            allowedDomains: Array<string>;
            allowedCidrs: Array<string>;
        } | null;
        defaultEnvironmentRestricted: boolean;
        defaultEnvironmentValidationRegex: string | null;
        defaultEnvironmentTrustedImageRegistries: Array<string> | null;
        skillToolsEnabled: boolean;
    };
};

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;
        analyticsInstanceId: string;
        logo: string | null;
        logoDark: string | null;
        createdAt: string;
        metadata: string | null;
        onboardingComplete: boolean;
        onboardingSurveyCompletedAt: string | null;
        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';
        defaultDiscoveredToolInvocationPolicy: 'allow_when_context_is_untrusted' | 'block_when_context_is_untrusted' | 'block_always' | 'require_approval';
        defaultDiscoveredToolResultPolicy: 'block_always' | 'mark_as_trusted' | 'mark_as_untrusted' | 'sanitize_with_dual_llm';
        allowChatFileUploads: boolean;
        allowToolAutoAssignment: 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' | 'github-copilot';
        defaultModelId: string | null;
        defaultLlmApiKeyId: string | null;
        defaultUserLimitValue: number | null;
        defaultUserLimitModel: Array<string> | null;
        defaultUserLimitCleanupInterval: '1h' | '12h' | '24h' | '1w' | '1m' | 'calendar_day' | 'calendar_week_sunday' | 'calendar_week_monday' | 'calendar_month';
        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;
        connectionDefaultProviderKeys: {
            [key: string]: string;
        } | null;
        defaultEnvironmentName: string | null;
        defaultEnvironmentNamespace: string | null;
        defaultEnvironmentDescription: string | null;
        defaultNetworkPolicy: {
            egressMode: 'off' | 'restricted' | 'unrestricted';
            domainPreset: 'none' | 'common_dependencies' | 'package_managers';
            allowedDomains: Array<string>;
            allowedCidrs: Array<string>;
        } | null;
        defaultEnvironmentRestricted: boolean;
        defaultEnvironmentValidationRegex: string | null;
        defaultEnvironmentTrustedImageRegistries: Array<string> | null;
        skillToolsEnabled: boolean;
    };
};

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;
        analyticsInstanceId: string;
        logo: string | null;
        logoDark: string | null;
        createdAt: string;
        metadata: string | null;
        onboardingComplete: boolean;
        onboardingSurveyCompletedAt: string | null;
        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';
        defaultDiscoveredToolInvocationPolicy: 'allow_when_context_is_untrusted' | 'block_when_context_is_untrusted' | 'block_always' | 'require_approval';
        defaultDiscoveredToolResultPolicy: 'block_always' | 'mark_as_trusted' | 'mark_as_untrusted' | 'sanitize_with_dual_llm';
        allowChatFileUploads: boolean;
        allowToolAutoAssignment: 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' | 'github-copilot';
        defaultModelId: string | null;
        defaultLlmApiKeyId: string | null;
        defaultUserLimitValue: number | null;
        defaultUserLimitModel: Array<string> | null;
        defaultUserLimitCleanupInterval: '1h' | '12h' | '24h' | '1w' | '1m' | 'calendar_day' | 'calendar_week_sunday' | 'calendar_week_monday' | 'calendar_month';
        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;
        connectionDefaultProviderKeys: {
            [key: string]: string;
        } | null;
        defaultEnvironmentName: string | null;
        defaultEnvironmentNamespace: string | null;
        defaultEnvironmentDescription: string | null;
        defaultNetworkPolicy: {
            egressMode: 'off' | 'restricted' | 'unrestricted';
            domainPreset: 'none' | 'common_dependencies' | 'package_managers';
            allowedDomains: Array<string>;
            allowedCidrs: Array<string>;
        } | null;
        defaultEnvironmentRestricted: boolean;
        defaultEnvironmentValidationRegex: string | null;
        defaultEnvironmentTrustedImageRegistries: Array<string> | null;
        skillToolsEnabled: boolean;
    };
};

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 GetProjectsData = {
    body?: never;
    path?: never;
    query?: {
        scope?: 'personal' | 'team' | 'org';
        search?: string;
        /**
         * Team IDs (comma-separated); only used when scope=team.
         */
        teamIds?: Array<string>;
        /**
         * Owner user IDs (comma-separated). Admin-only; used with scope=personal.
         */
        authorIds?: Array<string>;
        /**
         * Exclude owner user IDs (comma-separated). Admin-only; used with scope=personal.
         */
        excludeAuthorIds?: Array<string>;
    };
    url: '/api/projects';
};

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

export type GetProjectsError = GetProjectsErrors[keyof GetProjectsErrors];

export type GetProjectsResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        name: string;
        description: string | null;
        icon: string | null;
        viewerRole: 'owner' | 'shared' | 'admin';
        ownerName: string | null;
        conversationCount: number;
        visibility: 'organization' | 'team';
        shareTeamNames: Array<string> | null;
        pinnedAt: string | null;
        createdAt: string;
    }>;
};

export type GetProjectsResponse = GetProjectsResponses[keyof GetProjectsResponses];

export type CreateProjectData = {
    body: {
        name: string;
        description?: string | null;
        icon?: string | null;
    };
    path?: never;
    query?: never;
    url: '/api/projects';
};

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

export type CreateProjectError = CreateProjectErrors[keyof CreateProjectErrors];

export type CreateProjectResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        description: string | null;
        icon: string | null;
        viewerRole: 'owner' | 'shared' | 'admin';
        ownerName: string | null;
        conversationCount: number;
        visibility: 'organization' | 'team';
        shareTeamNames: Array<string> | null;
        pinnedAt: string | null;
        createdAt: string;
    };
};

export type CreateProjectResponse = CreateProjectResponses[keyof CreateProjectResponses];

export type CreateProjectFromConversationData = {
    body: {
        conversationId: string;
        name?: string;
        description?: string | null;
        icon?: string | null;
    };
    path?: never;
    query?: never;
    url: '/api/projects/from-conversation';
};

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

export type CreateProjectFromConversationError = CreateProjectFromConversationErrors[keyof CreateProjectFromConversationErrors];

export type CreateProjectFromConversationResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        description: string | null;
        icon: string | null;
        viewerRole: 'owner' | 'shared' | 'admin';
        ownerName: string | null;
        conversationCount: number;
        visibility: 'organization' | 'team';
        shareTeamNames: Array<string> | null;
        pinnedAt: string | null;
        createdAt: string;
    };
};

export type CreateProjectFromConversationResponse = CreateProjectFromConversationResponses[keyof CreateProjectFromConversationResponses];

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

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

export type DeleteProjectError = DeleteProjectErrors[keyof DeleteProjectErrors];

export type DeleteProjectResponses = {
    /**
     * Default Response
     */
    200: {
        ok: true;
    };
};

export type DeleteProjectResponse = DeleteProjectResponses[keyof DeleteProjectResponses];

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

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

export type GetProjectError = GetProjectErrors[keyof GetProjectErrors];

export type GetProjectResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        description: string | null;
        icon: string | null;
        viewerRole: 'owner' | 'shared' | 'admin';
        ownerName: string | null;
        conversationCount: number;
        visibility: 'organization' | 'team';
        shareTeamNames: Array<string> | null;
        pinnedAt: string | null;
        createdAt: string;
        shareTeamIds: Array<string> | null;
    };
};

export type GetProjectResponse = GetProjectResponses[keyof GetProjectResponses];

export type UpdateProjectData = {
    body: {
        name?: string;
        description?: string | null;
        icon?: string | null;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/projects/{id}';
};

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

export type UpdateProjectError = UpdateProjectErrors[keyof UpdateProjectErrors];

export type UpdateProjectResponses = {
    /**
     * Default Response
     */
    200: {
        ok: true;
    };
};

export type UpdateProjectResponse = UpdateProjectResponses[keyof UpdateProjectResponses];

export type SetProjectShareData = {
    body: {
        visibility: 'organization' | 'team' | 'none';
        teamIds?: Array<string>;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/projects/{id}/share';
};

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

export type SetProjectShareError = SetProjectShareErrors[keyof SetProjectShareErrors];

export type SetProjectShareResponses = {
    /**
     * Default Response
     */
    200: {
        ok: true;
    };
};

export type SetProjectShareResponse = SetProjectShareResponses[keyof SetProjectShareResponses];

export type GetProjectFilesData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/projects/{id}/files';
};

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

export type GetProjectFilesError = GetProjectFilesErrors[keyof GetProjectFilesErrors];

export type GetProjectFilesResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string | null;
        downloadRef: string;
        filename: string;
        mimeType: string;
        sizeBytes: number;
        createdAt: string;
        downloadable: boolean;
        projectId: string | null;
        projectName: string | null;
    }>;
};

export type GetProjectFilesResponse = GetProjectFilesResponses[keyof GetProjectFilesResponses];

export type UploadProjectFilesData = {
    body: {
        name: string;
        mimeType: string;
        dataBase64: string;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/projects/{id}/files';
};

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

export type UploadProjectFilesError = UploadProjectFilesErrors[keyof UploadProjectFilesErrors];

export type UploadProjectFilesResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        filename: string;
        mimeType: string;
    };
};

export type UploadProjectFilesResponse = UploadProjectFilesResponses[keyof UploadProjectFilesResponses];

export type GetProjectInstructionsData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/projects/{id}/instructions';
};

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

export type GetProjectInstructionsError = GetProjectInstructionsErrors[keyof GetProjectInstructionsErrors];

export type GetProjectInstructionsResponses = {
    /**
     * Default Response
     */
    200: {
        content: string;
    };
};

export type GetProjectInstructionsResponse = GetProjectInstructionsResponses[keyof GetProjectInstructionsResponses];

export type SetProjectInstructionsData = {
    body: {
        content: string;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/projects/{id}/instructions';
};

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

export type SetProjectInstructionsError = SetProjectInstructionsErrors[keyof SetProjectInstructionsErrors];

export type SetProjectInstructionsResponses = {
    /**
     * Default Response
     */
    200: {
        ok: true;
    };
};

export type SetProjectInstructionsResponse = SetProjectInstructionsResponses[keyof SetProjectInstructionsResponses];

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

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

export type GetProjectConversationsError = GetProjectConversationsErrors[keyof GetProjectConversationsErrors];

export type GetProjectConversationsResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        title: string | null;
        authorUserId: string;
        authorName: string | null;
        origin: 'user' | 'schedule_trigger';
        lastMessageAt: string;
        createdAt: string;
        readOnly: boolean;
        scheduleTriggerId: string | null;
        scheduleRunId: string | null;
        scheduleName: string | null;
    }>;
};

export type GetProjectConversationsResponse = GetProjectConversationsResponses[keyof GetProjectConversationsResponses];

export type UnpinProjectData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/projects/{id}/pin';
};

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

export type UnpinProjectError = UnpinProjectErrors[keyof UnpinProjectErrors];

export type UnpinProjectResponses = {
    /**
     * Default Response
     */
    200: {
        ok: true;
    };
};

export type UnpinProjectResponse = UnpinProjectResponses[keyof UnpinProjectResponses];

export type PinProjectData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/projects/{id}/pin';
};

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

export type PinProjectError = PinProjectErrors[keyof PinProjectErrors];

export type PinProjectResponses = {
    /**
     * Default Response
     */
    200: {
        ok: true;
    };
};

export type PinProjectResponse = PinProjectResponses[keyof PinProjectResponses];

export type GetScheduleTriggersData = {
    body?: never;
    path?: never;
    query?: {
        limit?: number;
        offset?: number;
        enabled?: boolean;
        name?: string;
        actorUserIds?: string;
        agentIds?: string;
        projectId?: 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;
            projectId: string | null;
            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;
        projectId: 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;
        projectId: string | null;
        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;
        projectId: string | null;
        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;
        projectId?: 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;
        projectId: string | null;
        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;
        projectId: string | null;
        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;
        projectId: string | null;
        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' | 'github-copilot';
        modelId: string | null;
        hasCustomToolSelection: boolean;
        hooksDebugEnabled: boolean;
        todoList: string | number | boolean | null | {
            [key: string]: unknown;
        } | Array<unknown> | null;
        artifact: string | null;
        projectId: string | null;
        origin: 'user' | 'schedule_trigger';
        pinnedAt: string | null;
        lastMessageAt: string;
        createdAt: string;
        updatedAt: string;
        agent: {
            id: string;
            name: string;
            systemPrompt: string | null;
            agentType: 'profile' | 'mcp_gateway' | 'llm_proxy' | 'agent';
            toolExposureMode: 'full' | 'search_and_run_only';
            llmApiKeyId: string | null;
        } | null;
        share: {
            id: string;
            visibility: 'organization' | 'team' | 'user';
        } | null;
        projectName?: string | null;
        projectIcon?: string | null;
        unread?: boolean;
        messages: Array<unknown>;
        chatErrors: Array<{
            id: string;
            conversationId: string;
            error: {
                code: 'rate_limit' | 'usage_limit_exceeded' | 'authentication' | 'permission_denied' | 'invalid_request' | 'not_found' | 'context_too_long' | 'request_too_large' | 'content_filtered' | 'server_error' | 'network_error' | 'empty_response' | 'incomplete_tool_call' | 'provider_auth_required' | 'unknown';
                message: string;
                isRetryable: boolean;
                sessionId?: string;
                traceId?: string;
                spanId?: string;
                usageLimitExceeded?: boolean;
                usageLimitEntityType?: string;
                authAction?: {
                    provider: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    providerLabel: string;
                };
                originalError?: {
                    provider?: 'openai' | 'gemini' | 'anthropic' | 'bedrock' | 'cohere' | 'cerebras' | 'mistral' | 'perplexity' | 'groq' | 'xai' | 'openrouter' | 'vllm' | 'ollama' | 'zhipuai' | 'deepseek' | 'minimax' | 'azure' | 'github-copilot';
                    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 GetServiceAccountsData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/service-accounts';
};

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

export type GetServiceAccountsError = GetServiceAccountsErrors[keyof GetServiceAccountsErrors];

export type GetServiceAccountsResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string;
        organizationId: string;
        name: string;
        role: string;
        disabled: boolean;
        createdAt: string;
        updatedAt: string;
        tokenCount: number;
    }>;
};

export type GetServiceAccountsResponse = GetServiceAccountsResponses[keyof GetServiceAccountsResponses];

export type CreateServiceAccountData = {
    body: {
        name: string;
        role: string;
    };
    path?: never;
    query?: never;
    url: '/api/service-accounts';
};

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

export type CreateServiceAccountError = CreateServiceAccountErrors[keyof CreateServiceAccountErrors];

export type CreateServiceAccountResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        name: string;
        role: string;
        disabled: boolean;
        createdAt: string;
        updatedAt: string;
        tokenCount: number;
        tokens: Array<{
            id: string;
            name: string;
            tokenStart: string;
            disabled: boolean;
            lastUsedAt: string | null;
            expiresAt: string | null;
            createdAt: string;
        }>;
    };
};

export type CreateServiceAccountResponse = CreateServiceAccountResponses[keyof CreateServiceAccountResponses];

export type DeleteServiceAccountData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/service-accounts/{id}';
};

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

export type DeleteServiceAccountError = DeleteServiceAccountErrors[keyof DeleteServiceAccountErrors];

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

export type DeleteServiceAccountResponse = DeleteServiceAccountResponses[keyof DeleteServiceAccountResponses];

export type GetServiceAccountData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/service-accounts/{id}';
};

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

export type GetServiceAccountError = GetServiceAccountErrors[keyof GetServiceAccountErrors];

export type GetServiceAccountResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        name: string;
        role: string;
        disabled: boolean;
        createdAt: string;
        updatedAt: string;
        tokenCount: number;
        tokens: Array<{
            id: string;
            name: string;
            tokenStart: string;
            disabled: boolean;
            lastUsedAt: string | null;
            expiresAt: string | null;
            createdAt: string;
        }>;
    };
};

export type GetServiceAccountResponse = GetServiceAccountResponses[keyof GetServiceAccountResponses];

export type UpdateServiceAccountData = {
    body: {
        name?: string;
        role?: string;
        disabled?: boolean;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/service-accounts/{id}';
};

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

export type UpdateServiceAccountError = UpdateServiceAccountErrors[keyof UpdateServiceAccountErrors];

export type UpdateServiceAccountResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        name: string;
        role: string;
        disabled: boolean;
        createdAt: string;
        updatedAt: string;
        tokenCount: number;
        tokens: Array<{
            id: string;
            name: string;
            tokenStart: string;
            disabled: boolean;
            lastUsedAt: string | null;
            expiresAt: string | null;
            createdAt: string;
        }>;
    };
};

export type UpdateServiceAccountResponse = UpdateServiceAccountResponses[keyof UpdateServiceAccountResponses];

export type CreateServiceAccountTokenData = {
    body: {
        name: string;
        expiresIn?: number | null;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/service-accounts/{id}/tokens';
};

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

export type CreateServiceAccountTokenError = CreateServiceAccountTokenErrors[keyof CreateServiceAccountTokenErrors];

export type CreateServiceAccountTokenResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        tokenStart: string;
        disabled: boolean;
        lastUsedAt: string | null;
        expiresAt: string | null;
        createdAt: string;
        token: string;
    };
};

export type CreateServiceAccountTokenResponse = CreateServiceAccountTokenResponses[keyof CreateServiceAccountTokenResponses];

export type DeleteServiceAccountTokenData = {
    body?: never;
    path: {
        id: string;
        tokenId: string;
    };
    query?: never;
    url: '/api/service-accounts/{id}/tokens/{tokenId}';
};

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

export type DeleteServiceAccountTokenError = DeleteServiceAccountTokenErrors[keyof DeleteServiceAccountTokenErrors];

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

export type DeleteServiceAccountTokenResponse = DeleteServiceAccountTokenResponses[keyof DeleteServiceAccountTokenResponses];

export type UpdateServiceAccountTokenData = {
    body: {
        name?: string;
        expiresAt?: unknown;
        disabled?: boolean;
    };
    path: {
        id: string;
        tokenId: string;
    };
    query?: never;
    url: '/api/service-accounts/{id}/tokens/{tokenId}';
};

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

export type UpdateServiceAccountTokenError = UpdateServiceAccountTokenErrors[keyof UpdateServiceAccountTokenErrors];

export type UpdateServiceAccountTokenResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        name: string;
        tokenStart: string;
        disabled: boolean;
        lastUsedAt: string | null;
        expiresAt: string | null;
        createdAt: string;
    };
};

export type UpdateServiceAccountTokenResponse = UpdateServiceAccountTokenResponses[keyof UpdateServiceAccountTokenResponses];

export type GetSiteNotificationData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/site-notification';
};

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

export type GetSiteNotificationError = GetSiteNotificationErrors[keyof GetSiteNotificationErrors];

export type GetSiteNotificationResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        content: string;
        expiresAt: string | null;
        createdAt: string;
        isActive: boolean;
    } | null;
};

export type GetSiteNotificationResponse = GetSiteNotificationResponses[keyof GetSiteNotificationResponses];

export type CreateSiteNotificationData = {
    body: {
        content: string;
        expiresAt?: string;
    };
    path?: never;
    query?: never;
    url: '/api/site-notification';
};

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

export type CreateSiteNotificationError = CreateSiteNotificationErrors[keyof CreateSiteNotificationErrors];

export type CreateSiteNotificationResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        content: string;
        expiresAt: string | null;
        createdAt: string;
        isActive: boolean;
    };
};

export type CreateSiteNotificationResponse = CreateSiteNotificationResponses[keyof CreateSiteNotificationResponses];

export type GetSiteNotificationSettingsData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/site-notification/settings';
};

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

export type GetSiteNotificationSettingsError = GetSiteNotificationSettingsErrors[keyof GetSiteNotificationSettingsErrors];

export type GetSiteNotificationSettingsResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        content: string;
        expiresAt: string | null;
        createdAt: string;
        isActive: boolean;
    } | null;
};

export type GetSiteNotificationSettingsResponse = GetSiteNotificationSettingsResponses[keyof GetSiteNotificationSettingsResponses];

export type DeleteSiteNotificationData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/site-notification/{id}';
};

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

export type DeleteSiteNotificationError = DeleteSiteNotificationErrors[keyof DeleteSiteNotificationErrors];

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

export type DeleteSiteNotificationResponse = DeleteSiteNotificationResponses[keyof DeleteSiteNotificationResponses];

export type UpdateSiteNotificationData = {
    body: {
        content?: string;
        expiresAt?: string | null;
        isActive?: boolean;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/site-notification/{id}';
};

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

export type UpdateSiteNotificationError = UpdateSiteNotificationErrors[keyof UpdateSiteNotificationErrors];

export type UpdateSiteNotificationResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        content: string;
        expiresAt: string | null;
        createdAt: string;
        isActive: boolean;
    };
};

export type UpdateSiteNotificationResponse = UpdateSiteNotificationResponses[keyof UpdateSiteNotificationResponses];

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;
            scope: 'personal' | 'team' | 'org';
            name: string;
            description: string;
            content: string;
            latestVersion: number;
            license: string | null;
            compatibility: string | null;
            allowedTools: string | null;
            templated: boolean;
            metadata: {
                [key: string]: string;
            };
            sourceType: 'manual' | 'github' | 'built_in';
            sourceRef: string | null;
            sourceCommit: string | null;
            createdAt: string;
            updatedAt: string;
            fileCount: number;
            teams: Array<{
                id: string;
                name: string;
            }>;
            authorName: string | null;
        }>;
        pagination: {
            currentPage: number;
            limit: number;
            total: number;
            totalPages: number;
            hasNext: boolean;
            hasPrev: boolean;
        };
    };
};

export type GetSkillsResponse = GetSkillsResponses[keyof GetSkillsResponses];

export type CreateSkillData = {
    body: {
        /**
         * A complete SKILL.md manifest: a YAML frontmatter block with `name` and `description` (and optional `license`, `compatibility`, `allowed-tools`, `templated`, `metadata`), followed by the Markdown instruction body. Set `templated: true` to render the body through Handlebars (e.g. `{{user.name}}`) at activation. `allowed-tools` is a space-separated list of tools the skill is pre-approved to use.
         */
        content: string;
        files?: Array<{
            /**
             * Resource path, e.g. references/API.md or scripts/run.py
             */
            path: string;
            /**
             * Text content of the file
             */
            content: string;
            encoding?: 'utf8' | 'base64';
        }>;
        scope?: 'personal' | 'team' | 'org';
        teamIds?: Array<string>;
        /**
         * Tools the skill expects, overriding the SKILL.md `allowed-tools` frontmatter. Omit to use the frontmatter; pass [] to clear.
         */
        allowedTools?: Array<string>;
    };
    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;
        scope: 'personal' | 'team' | 'org';
        name: string;
        description: string;
        content: string;
        latestVersion: number;
        license: string | null;
        compatibility: string | null;
        allowedTools: string | null;
        templated: boolean;
        metadata: {
            [key: string]: string;
        };
        sourceType: 'manual' | 'github' | 'built_in';
        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;
        }>;
        teams: Array<{
            id: string;
            name: string;
        }>;
    };
};

export type CreateSkillResponse = CreateSkillResponses[keyof CreateSkillResponses];

export type ConvertAgentToSkillData = {
    body: {
        description?: string;
        deleteAgent?: boolean;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/agents/{id}/convert-to-skill';
};

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

export type ConvertAgentToSkillError = ConvertAgentToSkillErrors[keyof ConvertAgentToSkillErrors];

export type ConvertAgentToSkillResponses = {
    /**
     * Default Response
     */
    200: {
        skill: {
            id: string;
            organizationId: string;
            authorId: string | null;
            scope: 'personal' | 'team' | 'org';
            name: string;
            description: string;
            content: string;
            latestVersion: number;
            license: string | null;
            compatibility: string | null;
            allowedTools: string | null;
            templated: boolean;
            metadata: {
                [key: string]: string;
            };
            sourceType: 'manual' | 'github' | 'built_in';
            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;
            }>;
            teams: Array<{
                id: string;
                name: string;
            }>;
        };
        report: {
            carried: Array<{
                field: string;
                detail: string;
            }>;
            annotated: Array<{
                field: string;
                detail: string;
            }>;
        };
        deletedAgent: boolean;
    };
};

export type ConvertAgentToSkillResponse = ConvertAgentToSkillResponses[keyof ConvertAgentToSkillResponses];

export type SuggestSkillDescriptionData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/agents/{id}/suggest-skill-description';
};

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

export type SuggestSkillDescriptionError = SuggestSkillDescriptionErrors[keyof SuggestSkillDescriptionErrors];

export type SuggestSkillDescriptionResponses = {
    /**
     * Default Response
     */
    200: {
        description: string;
    };
};

export type SuggestSkillDescriptionResponse = SuggestSkillDescriptionResponses[keyof SuggestSkillDescriptionResponses];

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;
        scope: 'personal' | 'team' | 'org';
        name: string;
        description: string;
        content: string;
        latestVersion: number;
        license: string | null;
        compatibility: string | null;
        allowedTools: string | null;
        templated: boolean;
        metadata: {
            [key: string]: string;
        };
        sourceType: 'manual' | 'github' | 'built_in';
        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;
        }>;
        teams: Array<{
            id: string;
            name: string;
        }>;
    };
};

export type GetSkillResponse = GetSkillResponses[keyof GetSkillResponses];

export type UpdateSkillData = {
    body: {
        /**
         * A complete SKILL.md manifest: a YAML frontmatter block with `name` and `description` (and optional `license`, `compatibility`, `allowed-tools`, `templated`, `metadata`), followed by the Markdown instruction body. Set `templated: true` to render the body through Handlebars (e.g. `{{user.name}}`) at activation. `allowed-tools` is a space-separated list of tools the skill is pre-approved to use.
         */
        content: string;
        files?: Array<{
            /**
             * Resource path, e.g. references/API.md or scripts/run.py
             */
            path: string;
            /**
             * Text content of the file
             */
            content: string;
            encoding?: 'utf8' | 'base64';
        }>;
        scope?: 'personal' | 'team' | 'org';
        teamIds?: Array<string>;
        /**
         * Tools the skill expects, overriding the SKILL.md `allowed-tools` frontmatter. Omit to use the frontmatter; pass [] to clear.
         */
        allowedTools?: Array<string>;
    };
    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;
        scope: 'personal' | 'team' | 'org';
        name: string;
        description: string;
        content: string;
        latestVersion: number;
        license: string | null;
        compatibility: string | null;
        allowedTools: string | null;
        templated: boolean;
        metadata: {
            [key: string]: string;
        };
        sourceType: 'manual' | 'github' | 'built_in';
        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;
        }>;
        teams: Array<{
            id: string;
            name: 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 ResetSkillData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/skills/{id}/reset';
};

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

export type ResetSkillError = ResetSkillErrors[keyof ResetSkillErrors];

export type ResetSkillResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        organizationId: string;
        authorId: string | null;
        scope: 'personal' | 'team' | 'org';
        name: string;
        description: string;
        content: string;
        latestVersion: number;
        license: string | null;
        compatibility: string | null;
        allowedTools: string | null;
        templated: boolean;
        metadata: {
            [key: string]: string;
        };
        sourceType: 'manual' | 'github' | 'built_in';
        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;
        }>;
        teams: Array<{
            id: string;
            name: string;
        }>;
    };
};

export type ResetSkillResponse = ResetSkillResponses[keyof ResetSkillResponses];

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 SearchSkillCatalogData = {
    body?: never;
    path?: never;
    query?: {
        q?: string;
        limit?: number;
    };
    url: '/api/skills/catalog/search';
};

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

export type SearchSkillCatalogError = SearchSkillCatalogErrors[keyof SearchSkillCatalogErrors];

export type SearchSkillCatalogResponses = {
    /**
     * Default Response
     */
    200: {
        results: Array<{
            repo: string;
            skillPath: string;
            name: string;
            description: string;
            compatibility: string | null;
            fileCount: number;
        }>;
        totalCount: number;
    };
};

export type SearchSkillCatalogResponse = SearchSkillCatalogResponses[keyof SearchSkillCatalogResponses];

export type DiscoverGithubSkillsData = {
    body: {
        repoUrl: string;
        path?: string;
        githubToken?: string;
        githubAppConfigId?: 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;
            allowedTools: string | null;
            templated: boolean;
            fileCount: number;
            exists: boolean;
        }>;
    };
};

export type DiscoverGithubSkillsResponse = DiscoverGithubSkillsResponses[keyof DiscoverGithubSkillsResponses];

export type PreviewGithubSkillData = {
    body: {
        repoUrl: string;
        path?: string;
        githubToken?: string;
        githubAppConfigId?: 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;
        allowedTools: string | null;
        templated: boolean;
        metadata: {
            [key: string]: string;
        };
        files: Array<{
            path: string;
            content: string;
            encoding: 'utf8' | 'base64';
            kind: 'reference' | 'script' | 'asset';
        }>;
        /**
         * Resource paths not imported: oversized, beyond the per-skill file cap, or unfetchable
         */
        skippedFiles: Array<string>;
        sourceRef: string;
        sourceCommit: string;
    };
};

export type PreviewGithubSkillResponse = PreviewGithubSkillResponses[keyof PreviewGithubSkillResponses];

export type ImportGithubSkillsData = {
    body: {
        repoUrl: string;
        path?: string;
        githubToken?: string;
        githubAppConfigId?: string;
        skillPaths: Array<string>;
        scope?: 'personal' | 'team' | 'org';
        teamIds?: 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;
            scope: 'personal' | 'team' | 'org';
            name: string;
            description: string;
            content: string;
            latestVersion: number;
            license: string | null;
            compatibility: string | null;
            allowedTools: string | null;
            templated: boolean;
            metadata: {
                [key: string]: string;
            };
            sourceType: 'manual' | 'github' | 'built_in';
            sourceRef: string | null;
            sourceCommit: string | null;
            createdAt: string;
            updatedAt: string;
        }>;
        skipped: Array<string>;
        /**
         * Per created skill, resource paths not imported: oversized, beyond the per-skill file cap, or unfetchable
         */
        skippedFiles: Array<{
            skillPath: string;
            files: Array<string>;
        }>;
    };
};

export type ImportGithubSkillsResponse = ImportGithubSkillsResponses[keyof ImportGithubSkillsResponses];

export type DeleteSkillSandboxArtifactData = {
    body?: never;
    path: {
        artifactId: string;
    };
    query?: never;
    url: '/api/skill-sandbox/artifacts/{artifactId}';
};

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

export type DeleteSkillSandboxArtifactError = DeleteSkillSandboxArtifactErrors[keyof DeleteSkillSandboxArtifactErrors];

export type DeleteSkillSandboxArtifactResponses = {
    /**
     * Default Response
     */
    200: {
        ok: true;
    };
};

export type DeleteSkillSandboxArtifactResponse = DeleteSkillSandboxArtifactResponses[keyof DeleteSkillSandboxArtifactResponses];

export type GetSkillSandboxArtifactData = {
    body?: never;
    path: {
        artifactId: string;
    };
    query?: never;
    url: '/api/skill-sandbox/artifacts/{artifactId}';
};

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

export type UpdateSkillSandboxArtifactContentData = {
    body: {
        content: string;
    };
    path: {
        artifactId: string;
    };
    query?: never;
    url: '/api/skill-sandbox/artifacts/{artifactId}/content';
};

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

export type UpdateSkillSandboxArtifactContentError = UpdateSkillSandboxArtifactContentErrors[keyof UpdateSkillSandboxArtifactContentErrors];

export type UpdateSkillSandboxArtifactContentResponses = {
    /**
     * Default Response
     */
    200: {
        ok: true;
        fileId: string;
        filename: string;
        mimeType: string;
        sizeBytes: number;
    };
};

export type UpdateSkillSandboxArtifactContentResponse = UpdateSkillSandboxArtifactContentResponses[keyof UpdateSkillSandboxArtifactContentResponses];

export type GetSkillSandboxConversationArtifactsData = {
    body?: never;
    path: {
        conversationId: string;
    };
    query?: never;
    url: '/api/skill-sandbox/conversations/{conversationId}/artifacts';
};

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

export type GetSkillSandboxConversationArtifactsError = GetSkillSandboxConversationArtifactsErrors[keyof GetSkillSandboxConversationArtifactsErrors];

export type GetSkillSandboxConversationArtifactsResponses = {
    /**
     * Default Response
     */
    200: Array<{
        id: string | null;
        downloadRef: string;
        filename: string;
        mimeType: string;
        sizeBytes: number;
        createdAt: string;
        downloadable: boolean;
        projectId: string | null;
        projectName: string | null;
    }>;
};

export type GetSkillSandboxConversationArtifactsResponse = GetSkillSandboxConversationArtifactsResponses[keyof GetSkillSandboxConversationArtifactsResponses];

export type GetSkillShareLinksData = {
    body?: never;
    path?: never;
    query?: {
        skillId?: string;
    };
    url: '/api/skill-share-links';
};

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

export type GetSkillShareLinksError = GetSkillShareLinksErrors[keyof GetSkillShareLinksErrors];

export type GetSkillShareLinksResponses = {
    /**
     * Default Response
     */
    200: {
        links: Array<{
            id: string;
            organizationId: string;
            createdByUserId: string;
            tokenStart: string;
            name: string | null;
            marketplaceName: string;
            expiresAt: string | null;
            revokedAt: string | null;
            lastUsedAt: string | null;
            createdAt: string;
            updatedAt: string;
            status: 'active' | 'expired' | 'revoked';
            skills: Array<{
                id: string;
                name: string;
                description: string;
            }>;
        }>;
    };
};

export type GetSkillShareLinksResponse = GetSkillShareLinksResponses[keyof GetSkillShareLinksResponses];

export type CreateSkillShareLinkData = {
    body: {
        skillIds: Array<string>;
        name?: string;
        expiresAt?: string | null;
    };
    path?: never;
    query?: never;
    url: '/api/skill-share-links';
};

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

export type CreateSkillShareLinkError = CreateSkillShareLinkErrors[keyof CreateSkillShareLinkErrors];

export type CreateSkillShareLinkResponses = {
    /**
     * Default Response
     */
    200: {
        link: {
            id: string;
            organizationId: string;
            createdByUserId: string;
            tokenStart: string;
            name: string | null;
            marketplaceName: string;
            expiresAt: string | null;
            revokedAt: string | null;
            lastUsedAt: string | null;
            createdAt: string;
            updatedAt: string;
            status: 'active' | 'expired' | 'revoked';
            skills: Array<{
                id: string;
                name: string;
                description: string;
            }>;
        };
        rawToken: string;
        cloneUrl: string;
        marketplaceName: string;
    };
};

export type CreateSkillShareLinkResponse = CreateSkillShareLinkResponses[keyof CreateSkillShareLinkResponses];

export type RotateSkillShareLinkData = {
    body: {
        skillIds: Array<string>;
        name?: string;
        expiresAt?: string | null;
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/skill-share-links/{id}/rotate';
};

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

export type RotateSkillShareLinkError = RotateSkillShareLinkErrors[keyof RotateSkillShareLinkErrors];

export type RotateSkillShareLinkResponses = {
    /**
     * Default Response
     */
    200: {
        link: {
            id: string;
            organizationId: string;
            createdByUserId: string;
            tokenStart: string;
            name: string | null;
            marketplaceName: string;
            expiresAt: string | null;
            revokedAt: string | null;
            lastUsedAt: string | null;
            createdAt: string;
            updatedAt: string;
            status: 'active' | 'expired' | 'revoked';
            skills: Array<{
                id: string;
                name: string;
                description: string;
            }>;
        };
        rawToken: string;
        cloneUrl: string;
        marketplaceName: string;
    };
};

export type RotateSkillShareLinkResponse = RotateSkillShareLinkResponses[keyof RotateSkillShareLinkResponses];

export type RevokeSkillShareLinkData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/skill-share-links/{id}';
};

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

export type RevokeSkillShareLinkError = RevokeSkillShareLinkErrors[keyof RevokeSkillShareLinkErrors];

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

export type RevokeSkillShareLinkResponse = RevokeSkillShareLinkResponses[keyof RevokeSkillShareLinkResponses];

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;
        cacheReadTokens: 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;
        cacheReadTokens: 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;
        totalCacheSavings: number;
        timeSeries: Array<{
            timestamp: string;
            baselineCost: number;
            actualCost: number;
            optimizationSavings: number;
            toonSavings: number;
            cacheSavings: number;
        }>;
    };
};

export type GetCostSavingsStatisticsResponse = GetCostSavingsStatisticsResponses[keyof GetCostSavingsStatisticsResponses];

export type GetTeamsData = {
    body?: never;
    path?: never;
    query?: {
        limit?: number;
        offset?: number;
        name?: string;
        labels?: string;
        mine?: boolean;
    };
    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;
            }>;
            labels?: Array<{
                key: string;
                value: string;
                keyId?: string;
                valueId?: 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;
        labels?: Array<{
            key: string;
            value: string;
            keyId?: string;
            valueId?: 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;
        }>;
        labels?: Array<{
            key: string;
            value: string;
            keyId?: string;
            valueId?: 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;
        }>;
        labels?: Array<{
            key: string;
            value: string;
            keyId?: string;
            valueId?: string;
        }>;
    };
};

export type GetTeamResponse = GetTeamResponses[keyof GetTeamResponses];

export type UpdateTeamData = {
    body: {
        name?: string;
        description?: string;
        convertToolResultsToToon?: boolean;
        labels?: Array<{
            key: string;
            value: string;
            keyId?: string;
            valueId?: string;
        }>;
    };
    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;
        }>;
        labels?: Array<{
            key: string;
            value: string;
            keyId?: string;
            valueId?: 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?: 'admin' | 'member';
    };
    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 UpdateTeamMemberData = {
    body: {
        role: 'admin' | 'member';
    };
    path: {
        id: string;
        userId: string;
    };
    query?: never;
    url: '/api/teams/{id}/members/{userId}';
};

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

export type UpdateTeamMemberError = UpdateTeamMemberErrors[keyof UpdateTeamMemberErrors];

export type UpdateTeamMemberResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        teamId: string;
        userId: string;
        role: string;
        syncedFromSso: boolean;
        createdAt: string;
    };
};

export type UpdateTeamMemberResponse = UpdateTeamMemberResponses[keyof UpdateTeamMemberResponses];

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

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

export type GetTeamLabelKeysError = GetTeamLabelKeysErrors[keyof GetTeamLabelKeysErrors];

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

export type GetTeamLabelKeysResponse = GetTeamLabelKeysResponses[keyof GetTeamLabelKeysResponses];

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

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

export type GetTeamLabelValuesError = GetTeamLabelValuesErrors[keyof GetTeamLabelValuesErrors];

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

export type GetTeamLabelValuesResponse = GetTeamLabelValuesResponses[keyof GetTeamLabelValuesResponses];

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;
        clonedPendingDiscovery: boolean;
        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;
        /**
         * Include the built-in query_knowledge_sources tool in global listings (default: hidden)
         */
        includeKnowledgeSourcesTool?: 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;
            };
            annotations: {
                [key: string]: unknown;
            } | null;
            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 GetToolData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/tools/{id}';
};

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

export type GetToolError = GetToolErrors[keyof GetToolErrors];

export type GetToolResponses = {
    /**
     * Default Response
     */
    200: {
        id: string;
        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;
        };
    };
};

export type GetToolResponse = GetToolResponses[keyof GetToolResponses];

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' | 'execute' | 'deploy-to-restricted' | 'manage'>;
    };
};

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;
        keyType?: 'standard' | 'passthrough';
    };
    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;
            keyType: 'standard' | 'passthrough';
            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' | 'github-copilot';
                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;
        keyType?: 'standard' | 'passthrough';
        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' | 'github-copilot';
            providerApiKeyId: string;
        }>;
        ownerId?: 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;
        keyType: 'standard' | 'passthrough';
        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' | 'github-copilot';
            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;
        keyType?: 'standard' | 'passthrough';
        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' | 'github-copilot';
            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;
        keyType: 'standard' | 'passthrough';
        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' | 'github-copilot';
            providerApiKeyId: string;
            providerApiKeyName: string;
        }>;
    };
};

export type UpdateVirtualApiKeyResponse = UpdateVirtualApiKeyResponses[keyof UpdateVirtualApiKeyResponses];

export type VllmEmbeddingsWithDefaultAgentData = {
    body: {
        model: string;
        input: string | Array<string>;
        dimensions?: number;
        encoding_format?: 'float' | 'base64';
    };
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path?: never;
    query?: never;
    url: '/v1/vllm/embeddings';
};

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

export type VllmEmbeddingsWithDefaultAgentError = VllmEmbeddingsWithDefaultAgentErrors[keyof VllmEmbeddingsWithDefaultAgentErrors];

export type VllmEmbeddingsWithDefaultAgentResponses = {
    /**
     * Default Response
     */
    200: {
        object: 'list';
        data: Array<{
            object: 'embedding';
            embedding: Array<number>;
            index: number;
        }>;
        model: string;
        usage: {
            prompt_tokens: number;
            total_tokens: number;
        };
    };
};

export type VllmEmbeddingsWithDefaultAgentResponse = VllmEmbeddingsWithDefaultAgentResponses[keyof VllmEmbeddingsWithDefaultAgentResponses];

export type VllmEmbeddingsWithAgentData = {
    body: {
        model: string;
        input: string | Array<string>;
        dimensions?: number;
        encoding_format?: 'float' | 'base64';
    };
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/vllm/{agentId}/embeddings';
};

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

export type VllmEmbeddingsWithAgentError = VllmEmbeddingsWithAgentErrors[keyof VllmEmbeddingsWithAgentErrors];

export type VllmEmbeddingsWithAgentResponses = {
    /**
     * Default Response
     */
    200: {
        object: 'list';
        data: Array<{
            object: 'embedding';
            embedding: Array<number>;
            index: number;
        }>;
        model: string;
        usage: {
            prompt_tokens: number;
            total_tokens: number;
        };
    };
};

export type VllmEmbeddingsWithAgentResponse = VllmEmbeddingsWithAgentResponses[keyof VllmEmbeddingsWithAgentResponses];

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 ZhipuaiEmbeddingsWithDefaultAgentData = {
    body: {
        model: string;
        input: string | Array<string>;
        dimensions?: number;
        encoding_format?: 'float' | 'base64';
    };
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path?: never;
    query?: never;
    url: '/v1/zhipuai/embeddings';
};

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

export type ZhipuaiEmbeddingsWithDefaultAgentError = ZhipuaiEmbeddingsWithDefaultAgentErrors[keyof ZhipuaiEmbeddingsWithDefaultAgentErrors];

export type ZhipuaiEmbeddingsWithDefaultAgentResponses = {
    /**
     * Default Response
     */
    200: {
        object: 'list';
        data: Array<{
            object: 'embedding';
            embedding: Array<number>;
            index: number;
        }>;
        model: string;
        usage: {
            prompt_tokens: number;
            total_tokens: number;
        };
    };
};

export type ZhipuaiEmbeddingsWithDefaultAgentResponse = ZhipuaiEmbeddingsWithDefaultAgentResponses[keyof ZhipuaiEmbeddingsWithDefaultAgentResponses];

export type ZhipuaiEmbeddingsWithAgentData = {
    body: {
        model: string;
        input: string | Array<string>;
        dimensions?: number;
        encoding_format?: 'float' | 'base64';
    };
    headers: {
        /**
         * The user agent of the client
         */
        'user-agent'?: string;
        /**
         * Bearer token for OpenAI
         */
        authorization: string;
    };
    path: {
        agentId: string;
    };
    query?: never;
    url: '/v1/zhipuai/{agentId}/embeddings';
};

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

export type ZhipuaiEmbeddingsWithAgentError = ZhipuaiEmbeddingsWithAgentErrors[keyof ZhipuaiEmbeddingsWithAgentErrors];

export type ZhipuaiEmbeddingsWithAgentResponses = {
    /**
     * Default Response
     */
    200: {
        object: 'list';
        data: Array<{
            object: 'embedding';
            embedding: Array<number>;
            index: number;
        }>;
        model: string;
        usage: {
            prompt_tokens: number;
            total_tokens: number;
        };
    };
};

export type ZhipuaiEmbeddingsWithAgentResponse = ZhipuaiEmbeddingsWithAgentResponses[keyof ZhipuaiEmbeddingsWithAgentResponses];

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 GetIdentityProviderLinkStatusData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/identity-providers/{id}/link-status';
};

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

export type GetIdentityProviderLinkStatusError = GetIdentityProviderLinkStatusErrors[keyof GetIdentityProviderLinkStatusErrors];

export type GetIdentityProviderLinkStatusResponses = {
    /**
     * Default Response
     */
    200: {
        providerId: string;
        connected: boolean;
    };
};

export type GetIdentityProviderLinkStatusResponse = GetIdentityProviderLinkStatusResponses[keyof GetIdentityProviderLinkStatusResponses];

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;
        accessTokenClaims: {
            [key: string]: unknown;
        } | null;
        accessTokenExpiresAt: string | 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];
