"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.SystemMessage$outboundSchema = exports.PrefixMessagesContent$outboundSchema = exports.DeveloperMessage$outboundSchema = exports.DeploymentGetConfigPrefixMessagesContent$outboundSchema = exports.UserMessage$outboundSchema = exports.DeploymentGetConfigPrefixMessagesDeploymentsContent$outboundSchema = exports.Content2$outboundSchema = exports.Four$outboundSchema = exports.CacheControl$outboundSchema = exports.Ttl$outboundSchema = exports.DeploymentGetConfig2DeploymentsType$outboundSchema = exports.AssistantMessage$outboundSchema = exports.PrefixMessagesToolCalls$outboundSchema = exports.PrefixMessagesFunction$outboundSchema = exports.PrefixMessagesType$outboundSchema = exports.Audio$outboundSchema = exports.DeploymentGetConfigPrefixMessagesDeploymentsRequestContent$outboundSchema = exports.DeploymentGetConfigContent2$outboundSchema = exports.ToolMessage$outboundSchema = exports.PrefixMessagesCacheControl$outboundSchema = exports.PrefixMessagesTtl$outboundSchema = exports.DeploymentGetConfigPrefixMessagesType$outboundSchema = exports.DeploymentGetConfigPrefixMessagesDeploymentsRequestRequestBodyContent$outboundSchema = exports.DeploymentGetConfigContentDeployments2$outboundSchema = exports.DeploymentGetConfigDeploymentsType = exports.ThinkingLevel = exports.Verbosity = exports.DeploymentGetConfigReasoningEffort = exports.DeploymentGetConfigEncodingFormat = exports.PhotoRealVersion = exports.DeploymentGetConfigResponseFormatDeploymentsResponseType = exports.DeploymentGetConfigResponseFormatType = exports.DeploymentGetConfigResponseFormatDeploymentsType = exports.ResponseFormat4 = exports.ResponseFormat5 = exports.ResponseFormat6 = exports.DeploymentGetConfigFormat = exports.DeploymentGetConfigDeploymentsResponseType = exports.DeploymentGetConfigRole = exports.DeploymentGetConfigType = exports.TwoTtl = exports.DeploymentGetConfig2DeploymentsRequestRequestBodyType = exports.MessagesType = exports.MessagesTtl = exports.DeploymentGetConfigMessagesType = exports.Ttl = exports.DeploymentGetConfig2DeploymentsType = exports.PrefixMessagesType = exports.PrefixMessagesTtl = exports.DeploymentGetConfigPrefixMessagesType = void 0;
exports.AndIn$outboundSchema = exports.DeploymentGetConfigAndIn$outboundSchema = exports.AndNin$outboundSchema = exports.DeploymentGetConfigAndNin$outboundSchema = exports.AndExists$outboundSchema = exports.Or$outboundSchema = exports.KnowledgeFilterOr$outboundSchema = exports.OrEq$outboundSchema = exports.DeploymentGetConfigOrEq$outboundSchema = exports.OrNe$outboundSchema = exports.DeploymentGetConfigOrNe$outboundSchema = exports.OrGt$outboundSchema = exports.OrGte$outboundSchema = exports.OrLt$outboundSchema = exports.OrLte$outboundSchema = exports.OrIn$outboundSchema = exports.DeploymentGetConfigOrIn$outboundSchema = exports.OrNin$outboundSchema = exports.DeploymentGetConfigOrNin$outboundSchema = exports.OrExists$outboundSchema = exports.Thread$outboundSchema = exports.InvokeOptions$outboundSchema = exports.Documents$outboundSchema = exports.Metadata$outboundSchema = exports.DeploymentGetConfigMessages$outboundSchema = exports.MessagesSystemMessage$outboundSchema = exports.MessagesContent$outboundSchema = exports.MessagesDeveloperMessage$outboundSchema = exports.DeploymentGetConfigMessagesContent$outboundSchema = exports.MessagesUserMessage$outboundSchema = exports.DeploymentGetConfigMessagesDeploymentsContent$outboundSchema = exports.DeploymentGetConfigContentDeploymentsRequest2$outboundSchema = exports.Two4$outboundSchema = exports.TwoCacheControl$outboundSchema = exports.TwoTtl$outboundSchema = exports.DeploymentGetConfig2DeploymentsRequestRequestBodyType$outboundSchema = exports.MessagesAssistantMessage$outboundSchema = exports.MessagesToolCalls$outboundSchema = exports.MessagesFunction$outboundSchema = exports.MessagesType$outboundSchema = exports.MessagesAudio$outboundSchema = exports.DeploymentGetConfigMessagesDeploymentsRequestContent$outboundSchema = exports.DeploymentGetConfigContentDeploymentsRequestRequestBody2$outboundSchema = exports.MessagesToolMessage$outboundSchema = exports.MessagesCacheControl$outboundSchema = exports.MessagesTtl$outboundSchema = exports.DeploymentGetConfigMessagesType$outboundSchema = exports.DeploymentGetConfigMessagesDeploymentsRequestRequestBodyContent$outboundSchema = exports.DeploymentGetConfigContentDeploymentsRequestRequestBodyMessages2$outboundSchema = exports.PrefixMessages$outboundSchema = void 0;
exports.ResponseFormat1$inboundSchema = exports.DeploymentGetConfigResponseFormatJsonSchema$inboundSchema = exports.DeploymentGetConfigResponseFormatDeploymentsResponseType$inboundSchema = exports.ResponseFormat2$inboundSchema = exports.DeploymentGetConfigResponseFormatType$inboundSchema = exports.ResponseFormat3$inboundSchema = exports.DeploymentGetConfigResponseFormatDeploymentsType$inboundSchema = exports.ResponseFormat4$inboundSchema = exports.ResponseFormat5$inboundSchema = exports.ResponseFormat6$inboundSchema = exports.DeploymentGetConfigFormat$inboundSchema = exports.DeploymentGetConfigDeploymentsMessages$inboundSchema = exports.DeploymentGetConfigToolCalls$inboundSchema = exports.DeploymentGetConfigDeploymentsFunction$inboundSchema = exports.DeploymentGetConfigDeploymentsResponseType$inboundSchema = exports.DeploymentGetConfigContent$inboundSchema = exports.DeploymentGetConfigContentDeploymentsResponse2$inboundSchema = exports.DeploymentGetConfig21$inboundSchema = exports.DeploymentGetConfig22$inboundSchema = exports.TwoImageUrl$inboundSchema = exports.DeploymentGetConfig23$inboundSchema = exports.TwoFile$inboundSchema = exports.DeploymentGetConfigRole$inboundSchema = exports.DeploymentGetConfigType$inboundSchema = exports.DeploymentGetConfigRequestBody$outboundSchema = exports.KnowledgeFilter$outboundSchema = exports.KnowledgeFilter1$outboundSchema = exports.Eq$outboundSchema = exports.OneEq$outboundSchema = exports.Ne$outboundSchema = exports.OneNe$outboundSchema = exports.Gt$outboundSchema = exports.Gte$outboundSchema = exports.Lt$outboundSchema = exports.Lte$outboundSchema = exports.In$outboundSchema = exports.OneIn$outboundSchema = exports.Nin$outboundSchema = exports.OneNin$outboundSchema = exports.Exists$outboundSchema = exports.And$outboundSchema = exports.KnowledgeFilterAnd$outboundSchema = exports.AndEq$outboundSchema = exports.DeploymentGetConfigAndEq$outboundSchema = exports.AndNe$outboundSchema = exports.DeploymentGetConfigAndNe$outboundSchema = exports.AndGt$outboundSchema = exports.AndGte$outboundSchema = exports.AndLt$outboundSchema = exports.AndLte$outboundSchema = void 0;
exports.DeploymentGetConfigResponseBody$inboundSchema = exports.DeploymentGetConfigTools$inboundSchema = exports.DeploymentGetConfigFunction$inboundSchema = exports.DeploymentGetConfigDeploymentsType$inboundSchema = exports.DeploymentGetConfigParameters$inboundSchema = exports.ThinkingLevel$inboundSchema = exports.Verbosity$inboundSchema = exports.DeploymentGetConfigReasoningEffort$inboundSchema = exports.DeploymentGetConfigEncodingFormat$inboundSchema = exports.PhotoRealVersion$inboundSchema = exports.DeploymentGetConfigResponseFormat$inboundSchema = void 0;
exports.deploymentGetConfigContentDeployments2ToJSON = deploymentGetConfigContentDeployments2ToJSON;
exports.deploymentGetConfigPrefixMessagesDeploymentsRequestRequestBodyContentToJSON = deploymentGetConfigPrefixMessagesDeploymentsRequestRequestBodyContentToJSON;
exports.prefixMessagesCacheControlToJSON = prefixMessagesCacheControlToJSON;
exports.toolMessageToJSON = toolMessageToJSON;
exports.deploymentGetConfigContent2ToJSON = deploymentGetConfigContent2ToJSON;
exports.deploymentGetConfigPrefixMessagesDeploymentsRequestContentToJSON = deploymentGetConfigPrefixMessagesDeploymentsRequestContentToJSON;
exports.audioToJSON = audioToJSON;
exports.prefixMessagesFunctionToJSON = prefixMessagesFunctionToJSON;
exports.prefixMessagesToolCallsToJSON = prefixMessagesToolCallsToJSON;
exports.assistantMessageToJSON = assistantMessageToJSON;
exports.cacheControlToJSON = cacheControlToJSON;
exports.fourToJSON = fourToJSON;
exports.content2ToJSON = content2ToJSON;
exports.deploymentGetConfigPrefixMessagesDeploymentsContentToJSON = deploymentGetConfigPrefixMessagesDeploymentsContentToJSON;
exports.userMessageToJSON = userMessageToJSON;
exports.deploymentGetConfigPrefixMessagesContentToJSON = deploymentGetConfigPrefixMessagesContentToJSON;
exports.developerMessageToJSON = developerMessageToJSON;
exports.prefixMessagesContentToJSON = prefixMessagesContentToJSON;
exports.systemMessageToJSON = systemMessageToJSON;
exports.prefixMessagesToJSON = prefixMessagesToJSON;
exports.deploymentGetConfigContentDeploymentsRequestRequestBodyMessages2ToJSON = deploymentGetConfigContentDeploymentsRequestRequestBodyMessages2ToJSON;
exports.deploymentGetConfigMessagesDeploymentsRequestRequestBodyContentToJSON = deploymentGetConfigMessagesDeploymentsRequestRequestBodyContentToJSON;
exports.messagesCacheControlToJSON = messagesCacheControlToJSON;
exports.messagesToolMessageToJSON = messagesToolMessageToJSON;
exports.deploymentGetConfigContentDeploymentsRequestRequestBody2ToJSON = deploymentGetConfigContentDeploymentsRequestRequestBody2ToJSON;
exports.deploymentGetConfigMessagesDeploymentsRequestContentToJSON = deploymentGetConfigMessagesDeploymentsRequestContentToJSON;
exports.messagesAudioToJSON = messagesAudioToJSON;
exports.messagesFunctionToJSON = messagesFunctionToJSON;
exports.messagesToolCallsToJSON = messagesToolCallsToJSON;
exports.messagesAssistantMessageToJSON = messagesAssistantMessageToJSON;
exports.twoCacheControlToJSON = twoCacheControlToJSON;
exports.two4ToJSON = two4ToJSON;
exports.deploymentGetConfigContentDeploymentsRequest2ToJSON = deploymentGetConfigContentDeploymentsRequest2ToJSON;
exports.deploymentGetConfigMessagesDeploymentsContentToJSON = deploymentGetConfigMessagesDeploymentsContentToJSON;
exports.messagesUserMessageToJSON = messagesUserMessageToJSON;
exports.deploymentGetConfigMessagesContentToJSON = deploymentGetConfigMessagesContentToJSON;
exports.messagesDeveloperMessageToJSON = messagesDeveloperMessageToJSON;
exports.messagesContentToJSON = messagesContentToJSON;
exports.messagesSystemMessageToJSON = messagesSystemMessageToJSON;
exports.deploymentGetConfigMessagesToJSON = deploymentGetConfigMessagesToJSON;
exports.metadataToJSON = metadataToJSON;
exports.documentsToJSON = documentsToJSON;
exports.invokeOptionsToJSON = invokeOptionsToJSON;
exports.threadToJSON = threadToJSON;
exports.orExistsToJSON = orExistsToJSON;
exports.deploymentGetConfigOrNinToJSON = deploymentGetConfigOrNinToJSON;
exports.orNinToJSON = orNinToJSON;
exports.deploymentGetConfigOrInToJSON = deploymentGetConfigOrInToJSON;
exports.orInToJSON = orInToJSON;
exports.orLteToJSON = orLteToJSON;
exports.orLtToJSON = orLtToJSON;
exports.orGteToJSON = orGteToJSON;
exports.orGtToJSON = orGtToJSON;
exports.deploymentGetConfigOrNeToJSON = deploymentGetConfigOrNeToJSON;
exports.orNeToJSON = orNeToJSON;
exports.deploymentGetConfigOrEqToJSON = deploymentGetConfigOrEqToJSON;
exports.orEqToJSON = orEqToJSON;
exports.knowledgeFilterOrToJSON = knowledgeFilterOrToJSON;
exports.orToJSON = orToJSON;
exports.andExistsToJSON = andExistsToJSON;
exports.deploymentGetConfigAndNinToJSON = deploymentGetConfigAndNinToJSON;
exports.andNinToJSON = andNinToJSON;
exports.deploymentGetConfigAndInToJSON = deploymentGetConfigAndInToJSON;
exports.andInToJSON = andInToJSON;
exports.andLteToJSON = andLteToJSON;
exports.andLtToJSON = andLtToJSON;
exports.andGteToJSON = andGteToJSON;
exports.andGtToJSON = andGtToJSON;
exports.deploymentGetConfigAndNeToJSON = deploymentGetConfigAndNeToJSON;
exports.andNeToJSON = andNeToJSON;
exports.deploymentGetConfigAndEqToJSON = deploymentGetConfigAndEqToJSON;
exports.andEqToJSON = andEqToJSON;
exports.knowledgeFilterAndToJSON = knowledgeFilterAndToJSON;
exports.andToJSON = andToJSON;
exports.existsToJSON = existsToJSON;
exports.oneNinToJSON = oneNinToJSON;
exports.ninToJSON = ninToJSON;
exports.oneInToJSON = oneInToJSON;
exports.inToJSON = inToJSON;
exports.lteToJSON = lteToJSON;
exports.ltToJSON = ltToJSON;
exports.gteToJSON = gteToJSON;
exports.gtToJSON = gtToJSON;
exports.oneNeToJSON = oneNeToJSON;
exports.neToJSON = neToJSON;
exports.oneEqToJSON = oneEqToJSON;
exports.eqToJSON = eqToJSON;
exports.knowledgeFilter1ToJSON = knowledgeFilter1ToJSON;
exports.knowledgeFilterToJSON = knowledgeFilterToJSON;
exports.deploymentGetConfigRequestBodyToJSON = deploymentGetConfigRequestBodyToJSON;
exports.twoFileFromJSON = twoFileFromJSON;
exports.deploymentGetConfig23FromJSON = deploymentGetConfig23FromJSON;
exports.twoImageUrlFromJSON = twoImageUrlFromJSON;
exports.deploymentGetConfig22FromJSON = deploymentGetConfig22FromJSON;
exports.deploymentGetConfig21FromJSON = deploymentGetConfig21FromJSON;
exports.deploymentGetConfigContentDeploymentsResponse2FromJSON = deploymentGetConfigContentDeploymentsResponse2FromJSON;
exports.deploymentGetConfigContentFromJSON = deploymentGetConfigContentFromJSON;
exports.deploymentGetConfigDeploymentsFunctionFromJSON = deploymentGetConfigDeploymentsFunctionFromJSON;
exports.deploymentGetConfigToolCallsFromJSON = deploymentGetConfigToolCallsFromJSON;
exports.deploymentGetConfigDeploymentsMessagesFromJSON = deploymentGetConfigDeploymentsMessagesFromJSON;
exports.responseFormat3FromJSON = responseFormat3FromJSON;
exports.responseFormat2FromJSON = responseFormat2FromJSON;
exports.deploymentGetConfigResponseFormatJsonSchemaFromJSON = deploymentGetConfigResponseFormatJsonSchemaFromJSON;
exports.responseFormat1FromJSON = responseFormat1FromJSON;
exports.deploymentGetConfigResponseFormatFromJSON = deploymentGetConfigResponseFormatFromJSON;
exports.deploymentGetConfigParametersFromJSON = deploymentGetConfigParametersFromJSON;
exports.deploymentGetConfigFunctionFromJSON = deploymentGetConfigFunctionFromJSON;
exports.deploymentGetConfigToolsFromJSON = deploymentGetConfigToolsFromJSON;
exports.deploymentGetConfigResponseBodyFromJSON = deploymentGetConfigResponseBodyFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
const components = __importStar(require("../components/index.js"));
/**
 * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
 */
exports.DeploymentGetConfigPrefixMessagesType = {
    Ephemeral: "ephemeral",
};
/**
 * The time-to-live for the cache control breakpoint. This may be one of the following values:
 *
 * @remarks
 *
 * - `5m`: 5 minutes
 * - `1h`: 1 hour
 *
 * Defaults to `5m`. Only supported by `Anthropic` Claude models.
 */
exports.PrefixMessagesTtl = {
    Fivem: "5m",
    Oneh: "1h",
};
/**
 * The type of the tool. Currently, only `function` is supported.
 */
exports.PrefixMessagesType = {
    Function: "function",
};
/**
 * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
 */
exports.DeploymentGetConfig2DeploymentsType = {
    Ephemeral: "ephemeral",
};
/**
 * The time-to-live for the cache control breakpoint. This may be one of the following values:
 *
 * @remarks
 *
 * - `5m`: 5 minutes
 * - `1h`: 1 hour
 *
 * Defaults to `5m`. Only supported by `Anthropic` Claude models.
 */
exports.Ttl = {
    Fivem: "5m",
    Oneh: "1h",
};
/**
 * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
 */
exports.DeploymentGetConfigMessagesType = {
    Ephemeral: "ephemeral",
};
/**
 * The time-to-live for the cache control breakpoint. This may be one of the following values:
 *
 * @remarks
 *
 * - `5m`: 5 minutes
 * - `1h`: 1 hour
 *
 * Defaults to `5m`. Only supported by `Anthropic` Claude models.
 */
exports.MessagesTtl = {
    Fivem: "5m",
    Oneh: "1h",
};
/**
 * The type of the tool. Currently, only `function` is supported.
 */
exports.MessagesType = {
    Function: "function",
};
/**
 * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
 */
exports.DeploymentGetConfig2DeploymentsRequestRequestBodyType = {
    Ephemeral: "ephemeral",
};
/**
 * The time-to-live for the cache control breakpoint. This may be one of the following values:
 *
 * @remarks
 *
 * - `5m`: 5 minutes
 * - `1h`: 1 hour
 *
 * Defaults to `5m`. Only supported by `Anthropic` Claude models.
 */
exports.TwoTtl = {
    Fivem: "5m",
    Oneh: "1h",
};
/**
 * The type of the model. Current `chat`,`completion` and `image` are supported
 */
exports.DeploymentGetConfigType = {
    Chat: "chat",
    Completion: "completion",
    Embedding: "embedding",
    Image: "image",
    Tts: "tts",
    Stt: "stt",
    Rerank: "rerank",
    Ocr: "ocr",
    Moderation: "moderation",
    Vision: "vision",
};
/**
 * The role of the prompt message
 */
exports.DeploymentGetConfigRole = {
    System: "system",
    Developer: "developer",
    Assistant: "assistant",
    User: "user",
    Exception: "exception",
    Tool: "tool",
    Prompt: "prompt",
    Correction: "correction",
    ExpectedOutput: "expected_output",
};
exports.DeploymentGetConfigDeploymentsResponseType = {
    Function: "function",
};
/**
 * Only supported on `image` models.
 */
exports.DeploymentGetConfigFormat = {
    Url: "url",
    B64Json: "b64_json",
    Text: "text",
    JsonObject: "json_object",
};
exports.ResponseFormat6 = {
    Json: "json",
    Text: "text",
    Srt: "srt",
    VerboseJson: "verbose_json",
    Vtt: "vtt",
};
exports.ResponseFormat5 = {
    Url: "url",
    Base64Json: "base64_json",
};
exports.ResponseFormat4 = {
    Mp3: "mp3",
    Opus: "opus",
    Aac: "aac",
    Flac: "flac",
    Wav: "wav",
    Pcm: "pcm",
};
exports.DeploymentGetConfigResponseFormatDeploymentsType = {
    Text: "text",
};
exports.DeploymentGetConfigResponseFormatType = {
    JsonObject: "json_object",
};
exports.DeploymentGetConfigResponseFormatDeploymentsResponseType = {
    JsonSchema: "json_schema",
};
/**
 * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
 */
exports.PhotoRealVersion = {
    V1: "v1",
    V2: "v2",
};
/**
 * The format to return the embeddings
 */
exports.DeploymentGetConfigEncodingFormat = {
    Float: "float",
    Base64: "base64",
};
/**
 * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
 */
exports.DeploymentGetConfigReasoningEffort = {
    None: "none",
    Disable: "disable",
    Minimal: "minimal",
    Low: "low",
    Medium: "medium",
    High: "high",
};
/**
 * Controls the verbosity of the model output.
 */
exports.Verbosity = {
    Low: "low",
    Medium: "medium",
    High: "high",
};
/**
 * The level of thinking to use for the model. Only supported by `Google AI`
 */
exports.ThinkingLevel = {
    Low: "low",
    High: "high",
};
/**
 * The type of the tool. Currently, only `function` is supported.
 */
exports.DeploymentGetConfigDeploymentsType = {
    Function: "function",
};
/** @internal */
exports.DeploymentGetConfigContentDeployments2$outboundSchema = components.TextContentPartSchema$outboundSchema;
function deploymentGetConfigContentDeployments2ToJSON(deploymentGetConfigContentDeployments2) {
    return JSON.stringify(exports.DeploymentGetConfigContentDeployments2$outboundSchema.parse(deploymentGetConfigContentDeployments2));
}
/** @internal */
exports.DeploymentGetConfigPrefixMessagesDeploymentsRequestRequestBodyContent$outboundSchema = z.union([
    z.string(),
    z.array(components.TextContentPartSchema$outboundSchema),
]);
function deploymentGetConfigPrefixMessagesDeploymentsRequestRequestBodyContentToJSON(deploymentGetConfigPrefixMessagesDeploymentsRequestRequestBodyContent) {
    return JSON.stringify(exports.DeploymentGetConfigPrefixMessagesDeploymentsRequestRequestBodyContent$outboundSchema
        .parse(deploymentGetConfigPrefixMessagesDeploymentsRequestRequestBodyContent));
}
/** @internal */
exports.DeploymentGetConfigPrefixMessagesType$outboundSchema = z.nativeEnum(exports.DeploymentGetConfigPrefixMessagesType);
/** @internal */
exports.PrefixMessagesTtl$outboundSchema = z.nativeEnum(exports.PrefixMessagesTtl);
/** @internal */
exports.PrefixMessagesCacheControl$outboundSchema = z.object({
    type: exports.DeploymentGetConfigPrefixMessagesType$outboundSchema,
    ttl: exports.PrefixMessagesTtl$outboundSchema.default("5m"),
});
function prefixMessagesCacheControlToJSON(prefixMessagesCacheControl) {
    return JSON.stringify(exports.PrefixMessagesCacheControl$outboundSchema.parse(prefixMessagesCacheControl));
}
/** @internal */
exports.ToolMessage$outboundSchema = z.object({
    role: z.literal("tool"),
    content: z.union([
        z.string(),
        z.array(components.TextContentPartSchema$outboundSchema),
    ]),
    toolCallId: z.nullable(z.string()),
    cacheControl: z.lazy(() => exports.PrefixMessagesCacheControl$outboundSchema)
        .optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        toolCallId: "tool_call_id",
        cacheControl: "cache_control",
    });
});
function toolMessageToJSON(toolMessage) {
    return JSON.stringify(exports.ToolMessage$outboundSchema.parse(toolMessage));
}
/** @internal */
exports.DeploymentGetConfigContent2$outboundSchema = z.union([
    components.TextContentPartSchema$outboundSchema.and(z.object({ type: z.literal("text") })),
    components.RefusalPartSchema$outboundSchema,
    components.ReasoningPartSchema$outboundSchema,
    components.RedactedReasoningPartSchema$outboundSchema,
]);
function deploymentGetConfigContent2ToJSON(deploymentGetConfigContent2) {
    return JSON.stringify(exports.DeploymentGetConfigContent2$outboundSchema.parse(deploymentGetConfigContent2));
}
/** @internal */
exports.DeploymentGetConfigPrefixMessagesDeploymentsRequestContent$outboundSchema = z.union([
    z.string(),
    z.array(z.union([
        components.TextContentPartSchema$outboundSchema.and(z.object({ type: z.literal("text") })),
        components.RefusalPartSchema$outboundSchema,
        components.ReasoningPartSchema$outboundSchema,
        components.RedactedReasoningPartSchema$outboundSchema,
    ])),
]);
function deploymentGetConfigPrefixMessagesDeploymentsRequestContentToJSON(deploymentGetConfigPrefixMessagesDeploymentsRequestContent) {
    return JSON.stringify(exports.DeploymentGetConfigPrefixMessagesDeploymentsRequestContent$outboundSchema
        .parse(deploymentGetConfigPrefixMessagesDeploymentsRequestContent));
}
/** @internal */
exports.Audio$outboundSchema = z.object({
    id: z.string(),
});
function audioToJSON(audio) {
    return JSON.stringify(exports.Audio$outboundSchema.parse(audio));
}
/** @internal */
exports.PrefixMessagesType$outboundSchema = z.nativeEnum(exports.PrefixMessagesType);
/** @internal */
exports.PrefixMessagesFunction$outboundSchema = z.object({
    name: z.string().optional(),
    arguments: z.string().optional(),
});
function prefixMessagesFunctionToJSON(prefixMessagesFunction) {
    return JSON.stringify(exports.PrefixMessagesFunction$outboundSchema.parse(prefixMessagesFunction));
}
/** @internal */
exports.PrefixMessagesToolCalls$outboundSchema = z.object({
    id: z.string(),
    type: exports.PrefixMessagesType$outboundSchema,
    function: z.lazy(() => exports.PrefixMessagesFunction$outboundSchema),
    thoughtSignature: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        thoughtSignature: "thought_signature",
    });
});
function prefixMessagesToolCallsToJSON(prefixMessagesToolCalls) {
    return JSON.stringify(exports.PrefixMessagesToolCalls$outboundSchema.parse(prefixMessagesToolCalls));
}
/** @internal */
exports.AssistantMessage$outboundSchema = z.object({
    content: z.nullable(z.union([
        z.string(),
        z.array(z.union([
            components.TextContentPartSchema$outboundSchema.and(z.object({ type: z.literal("text") })),
            components.RefusalPartSchema$outboundSchema,
            components.ReasoningPartSchema$outboundSchema,
            components.RedactedReasoningPartSchema$outboundSchema,
        ])),
    ])).optional(),
    refusal: z.nullable(z.string()).optional(),
    role: z.literal("assistant"),
    name: z.string().optional(),
    audio: z.nullable(z.lazy(() => exports.Audio$outboundSchema)).optional(),
    toolCalls: z.array(z.lazy(() => exports.PrefixMessagesToolCalls$outboundSchema))
        .optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        toolCalls: "tool_calls",
    });
});
function assistantMessageToJSON(assistantMessage) {
    return JSON.stringify(exports.AssistantMessage$outboundSchema.parse(assistantMessage));
}
/** @internal */
exports.DeploymentGetConfig2DeploymentsType$outboundSchema = z.nativeEnum(exports.DeploymentGetConfig2DeploymentsType);
/** @internal */
exports.Ttl$outboundSchema = z.nativeEnum(exports.Ttl);
/** @internal */
exports.CacheControl$outboundSchema = z.object({
    type: exports.DeploymentGetConfig2DeploymentsType$outboundSchema,
    ttl: exports.Ttl$outboundSchema.default("5m"),
});
function cacheControlToJSON(cacheControl) {
    return JSON.stringify(exports.CacheControl$outboundSchema.parse(cacheControl));
}
/** @internal */
exports.Four$outboundSchema = z.object({
    type: z.literal("file"),
    cacheControl: z.lazy(() => exports.CacheControl$outboundSchema).optional(),
    file: components.FileContentPartSchema$outboundSchema,
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        cacheControl: "cache_control",
    });
});
function fourToJSON(four) {
    return JSON.stringify(exports.Four$outboundSchema.parse(four));
}
/** @internal */
exports.Content2$outboundSchema = z.union([
    components.TextContentPartSchema$outboundSchema.and(z.object({ type: z.literal("text") })),
    components.ImageContentPartSchema$outboundSchema,
    components.AudioContentPartSchema$outboundSchema,
    z.lazy(() => exports.Four$outboundSchema),
]);
function content2ToJSON(content2) {
    return JSON.stringify(exports.Content2$outboundSchema.parse(content2));
}
/** @internal */
exports.DeploymentGetConfigPrefixMessagesDeploymentsContent$outboundSchema = z.union([
    z.string(),
    z.array(z.union([
        components.TextContentPartSchema$outboundSchema.and(z.object({ type: z.literal("text") })),
        components.ImageContentPartSchema$outboundSchema,
        components.AudioContentPartSchema$outboundSchema,
        z.lazy(() => exports.Four$outboundSchema),
    ])),
]);
function deploymentGetConfigPrefixMessagesDeploymentsContentToJSON(deploymentGetConfigPrefixMessagesDeploymentsContent) {
    return JSON.stringify(exports.DeploymentGetConfigPrefixMessagesDeploymentsContent$outboundSchema.parse(deploymentGetConfigPrefixMessagesDeploymentsContent));
}
/** @internal */
exports.UserMessage$outboundSchema = z.object({
    role: z.literal("user"),
    name: z.string().optional(),
    content: z.union([
        z.string(),
        z.array(z.union([
            components.TextContentPartSchema$outboundSchema.and(z.object({ type: z.literal("text") })),
            components.ImageContentPartSchema$outboundSchema,
            components.AudioContentPartSchema$outboundSchema,
            z.lazy(() => exports.Four$outboundSchema),
        ])),
    ]),
});
function userMessageToJSON(userMessage) {
    return JSON.stringify(exports.UserMessage$outboundSchema.parse(userMessage));
}
/** @internal */
exports.DeploymentGetConfigPrefixMessagesContent$outboundSchema = z.union([
    z.string(),
    z.array(components.TextContentPartSchema$outboundSchema),
]);
function deploymentGetConfigPrefixMessagesContentToJSON(deploymentGetConfigPrefixMessagesContent) {
    return JSON.stringify(exports.DeploymentGetConfigPrefixMessagesContent$outboundSchema.parse(deploymentGetConfigPrefixMessagesContent));
}
/** @internal */
exports.DeveloperMessage$outboundSchema = z.object({
    role: z.literal("developer"),
    content: z.union([
        z.string(),
        z.array(components.TextContentPartSchema$outboundSchema),
    ]),
    name: z.string().optional(),
});
function developerMessageToJSON(developerMessage) {
    return JSON.stringify(exports.DeveloperMessage$outboundSchema.parse(developerMessage));
}
/** @internal */
exports.PrefixMessagesContent$outboundSchema = z.union([
    z.string(),
    z.array(components.TextContentPartSchema$outboundSchema),
]);
function prefixMessagesContentToJSON(prefixMessagesContent) {
    return JSON.stringify(exports.PrefixMessagesContent$outboundSchema.parse(prefixMessagesContent));
}
/** @internal */
exports.SystemMessage$outboundSchema = z.object({
    role: z.literal("system"),
    content: z.union([
        z.string(),
        z.array(components.TextContentPartSchema$outboundSchema),
    ]),
    name: z.string().optional(),
});
function systemMessageToJSON(systemMessage) {
    return JSON.stringify(exports.SystemMessage$outboundSchema.parse(systemMessage));
}
/** @internal */
exports.PrefixMessages$outboundSchema = z.union([
    z.lazy(() => exports.SystemMessage$outboundSchema),
    z.lazy(() => exports.DeveloperMessage$outboundSchema),
    z.lazy(() => exports.UserMessage$outboundSchema),
    z.lazy(() => exports.AssistantMessage$outboundSchema),
    z.lazy(() => exports.ToolMessage$outboundSchema),
]);
function prefixMessagesToJSON(prefixMessages) {
    return JSON.stringify(exports.PrefixMessages$outboundSchema.parse(prefixMessages));
}
/** @internal */
exports.DeploymentGetConfigContentDeploymentsRequestRequestBodyMessages2$outboundSchema = components.TextContentPartSchema$outboundSchema;
function deploymentGetConfigContentDeploymentsRequestRequestBodyMessages2ToJSON(deploymentGetConfigContentDeploymentsRequestRequestBodyMessages2) {
    return JSON.stringify(exports.DeploymentGetConfigContentDeploymentsRequestRequestBodyMessages2$outboundSchema
        .parse(deploymentGetConfigContentDeploymentsRequestRequestBodyMessages2));
}
/** @internal */
exports.DeploymentGetConfigMessagesDeploymentsRequestRequestBodyContent$outboundSchema = z.union([
    z.string(),
    z.array(components.TextContentPartSchema$outboundSchema),
]);
function deploymentGetConfigMessagesDeploymentsRequestRequestBodyContentToJSON(deploymentGetConfigMessagesDeploymentsRequestRequestBodyContent) {
    return JSON.stringify(exports.DeploymentGetConfigMessagesDeploymentsRequestRequestBodyContent$outboundSchema
        .parse(deploymentGetConfigMessagesDeploymentsRequestRequestBodyContent));
}
/** @internal */
exports.DeploymentGetConfigMessagesType$outboundSchema = z.nativeEnum(exports.DeploymentGetConfigMessagesType);
/** @internal */
exports.MessagesTtl$outboundSchema = z
    .nativeEnum(exports.MessagesTtl);
/** @internal */
exports.MessagesCacheControl$outboundSchema = z.object({
    type: exports.DeploymentGetConfigMessagesType$outboundSchema,
    ttl: exports.MessagesTtl$outboundSchema.default("5m"),
});
function messagesCacheControlToJSON(messagesCacheControl) {
    return JSON.stringify(exports.MessagesCacheControl$outboundSchema.parse(messagesCacheControl));
}
/** @internal */
exports.MessagesToolMessage$outboundSchema = z.object({
    role: z.literal("tool"),
    content: z.union([
        z.string(),
        z.array(components.TextContentPartSchema$outboundSchema),
    ]),
    toolCallId: z.nullable(z.string()),
    cacheControl: z.lazy(() => exports.MessagesCacheControl$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        toolCallId: "tool_call_id",
        cacheControl: "cache_control",
    });
});
function messagesToolMessageToJSON(messagesToolMessage) {
    return JSON.stringify(exports.MessagesToolMessage$outboundSchema.parse(messagesToolMessage));
}
/** @internal */
exports.DeploymentGetConfigContentDeploymentsRequestRequestBody2$outboundSchema = z.union([
    components.TextContentPartSchema$outboundSchema.and(z.object({ type: z.literal("text") })),
    components.RefusalPartSchema$outboundSchema,
    components.ReasoningPartSchema$outboundSchema,
    components.RedactedReasoningPartSchema$outboundSchema,
]);
function deploymentGetConfigContentDeploymentsRequestRequestBody2ToJSON(deploymentGetConfigContentDeploymentsRequestRequestBody2) {
    return JSON.stringify(exports.DeploymentGetConfigContentDeploymentsRequestRequestBody2$outboundSchema
        .parse(deploymentGetConfigContentDeploymentsRequestRequestBody2));
}
/** @internal */
exports.DeploymentGetConfigMessagesDeploymentsRequestContent$outboundSchema = z.union([
    z.string(),
    z.array(z.union([
        components.TextContentPartSchema$outboundSchema.and(z.object({ type: z.literal("text") })),
        components.RefusalPartSchema$outboundSchema,
        components.ReasoningPartSchema$outboundSchema,
        components.RedactedReasoningPartSchema$outboundSchema,
    ])),
]);
function deploymentGetConfigMessagesDeploymentsRequestContentToJSON(deploymentGetConfigMessagesDeploymentsRequestContent) {
    return JSON.stringify(exports.DeploymentGetConfigMessagesDeploymentsRequestContent$outboundSchema.parse(deploymentGetConfigMessagesDeploymentsRequestContent));
}
/** @internal */
exports.MessagesAudio$outboundSchema = z.object({
    id: z.string(),
});
function messagesAudioToJSON(messagesAudio) {
    return JSON.stringify(exports.MessagesAudio$outboundSchema.parse(messagesAudio));
}
/** @internal */
exports.MessagesType$outboundSchema = z.nativeEnum(exports.MessagesType);
/** @internal */
exports.MessagesFunction$outboundSchema = z.object({
    name: z.string().optional(),
    arguments: z.string().optional(),
});
function messagesFunctionToJSON(messagesFunction) {
    return JSON.stringify(exports.MessagesFunction$outboundSchema.parse(messagesFunction));
}
/** @internal */
exports.MessagesToolCalls$outboundSchema = z.object({
    id: z.string(),
    type: exports.MessagesType$outboundSchema,
    function: z.lazy(() => exports.MessagesFunction$outboundSchema),
    thoughtSignature: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        thoughtSignature: "thought_signature",
    });
});
function messagesToolCallsToJSON(messagesToolCalls) {
    return JSON.stringify(exports.MessagesToolCalls$outboundSchema.parse(messagesToolCalls));
}
/** @internal */
exports.MessagesAssistantMessage$outboundSchema = z.object({
    content: z.nullable(z.union([
        z.string(),
        z.array(z.union([
            components.TextContentPartSchema$outboundSchema.and(z.object({ type: z.literal("text") })),
            components.RefusalPartSchema$outboundSchema,
            components.ReasoningPartSchema$outboundSchema,
            components.RedactedReasoningPartSchema$outboundSchema,
        ])),
    ])).optional(),
    refusal: z.nullable(z.string()).optional(),
    role: z.literal("assistant"),
    name: z.string().optional(),
    audio: z.nullable(z.lazy(() => exports.MessagesAudio$outboundSchema)).optional(),
    toolCalls: z.array(z.lazy(() => exports.MessagesToolCalls$outboundSchema)).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        toolCalls: "tool_calls",
    });
});
function messagesAssistantMessageToJSON(messagesAssistantMessage) {
    return JSON.stringify(exports.MessagesAssistantMessage$outboundSchema.parse(messagesAssistantMessage));
}
/** @internal */
exports.DeploymentGetConfig2DeploymentsRequestRequestBodyType$outboundSchema = z.nativeEnum(exports.DeploymentGetConfig2DeploymentsRequestRequestBodyType);
/** @internal */
exports.TwoTtl$outboundSchema = z
    .nativeEnum(exports.TwoTtl);
/** @internal */
exports.TwoCacheControl$outboundSchema = z.object({
    type: exports.DeploymentGetConfig2DeploymentsRequestRequestBodyType$outboundSchema,
    ttl: exports.TwoTtl$outboundSchema.default("5m"),
});
function twoCacheControlToJSON(twoCacheControl) {
    return JSON.stringify(exports.TwoCacheControl$outboundSchema.parse(twoCacheControl));
}
/** @internal */
exports.Two4$outboundSchema = z.object({
    type: z.literal("file"),
    cacheControl: z.lazy(() => exports.TwoCacheControl$outboundSchema).optional(),
    file: components.FileContentPartSchema$outboundSchema,
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        cacheControl: "cache_control",
    });
});
function two4ToJSON(two4) {
    return JSON.stringify(exports.Two4$outboundSchema.parse(two4));
}
/** @internal */
exports.DeploymentGetConfigContentDeploymentsRequest2$outboundSchema = z.union([
    components.TextContentPartSchema$outboundSchema.and(z.object({ type: z.literal("text") })),
    components.ImageContentPartSchema$outboundSchema,
    components.AudioContentPartSchema$outboundSchema,
    z.lazy(() => exports.Two4$outboundSchema),
]);
function deploymentGetConfigContentDeploymentsRequest2ToJSON(deploymentGetConfigContentDeploymentsRequest2) {
    return JSON.stringify(exports.DeploymentGetConfigContentDeploymentsRequest2$outboundSchema.parse(deploymentGetConfigContentDeploymentsRequest2));
}
/** @internal */
exports.DeploymentGetConfigMessagesDeploymentsContent$outboundSchema = z.union([
    z.string(),
    z.array(z.union([
        components.TextContentPartSchema$outboundSchema.and(z.object({ type: z.literal("text") })),
        components.ImageContentPartSchema$outboundSchema,
        components.AudioContentPartSchema$outboundSchema,
        z.lazy(() => exports.Two4$outboundSchema),
    ])),
]);
function deploymentGetConfigMessagesDeploymentsContentToJSON(deploymentGetConfigMessagesDeploymentsContent) {
    return JSON.stringify(exports.DeploymentGetConfigMessagesDeploymentsContent$outboundSchema.parse(deploymentGetConfigMessagesDeploymentsContent));
}
/** @internal */
exports.MessagesUserMessage$outboundSchema = z.object({
    role: z.literal("user"),
    name: z.string().optional(),
    content: z.union([
        z.string(),
        z.array(z.union([
            components.TextContentPartSchema$outboundSchema.and(z.object({ type: z.literal("text") })),
            components.ImageContentPartSchema$outboundSchema,
            components.AudioContentPartSchema$outboundSchema,
            z.lazy(() => exports.Two4$outboundSchema),
        ])),
    ]),
});
function messagesUserMessageToJSON(messagesUserMessage) {
    return JSON.stringify(exports.MessagesUserMessage$outboundSchema.parse(messagesUserMessage));
}
/** @internal */
exports.DeploymentGetConfigMessagesContent$outboundSchema = z.union([
    z.string(),
    z.array(components.TextContentPartSchema$outboundSchema),
]);
function deploymentGetConfigMessagesContentToJSON(deploymentGetConfigMessagesContent) {
    return JSON.stringify(exports.DeploymentGetConfigMessagesContent$outboundSchema.parse(deploymentGetConfigMessagesContent));
}
/** @internal */
exports.MessagesDeveloperMessage$outboundSchema = z.object({
    role: z.literal("developer"),
    content: z.union([
        z.string(),
        z.array(components.TextContentPartSchema$outboundSchema),
    ]),
    name: z.string().optional(),
});
function messagesDeveloperMessageToJSON(messagesDeveloperMessage) {
    return JSON.stringify(exports.MessagesDeveloperMessage$outboundSchema.parse(messagesDeveloperMessage));
}
/** @internal */
exports.MessagesContent$outboundSchema = z.union([
    z.string(),
    z.array(components.TextContentPartSchema$outboundSchema),
]);
function messagesContentToJSON(messagesContent) {
    return JSON.stringify(exports.MessagesContent$outboundSchema.parse(messagesContent));
}
/** @internal */
exports.MessagesSystemMessage$outboundSchema = z.object({
    role: z.literal("system"),
    content: z.union([
        z.string(),
        z.array(components.TextContentPartSchema$outboundSchema),
    ]),
    name: z.string().optional(),
});
function messagesSystemMessageToJSON(messagesSystemMessage) {
    return JSON.stringify(exports.MessagesSystemMessage$outboundSchema.parse(messagesSystemMessage));
}
/** @internal */
exports.DeploymentGetConfigMessages$outboundSchema = z.union([
    z.lazy(() => exports.MessagesSystemMessage$outboundSchema),
    z.lazy(() => exports.MessagesDeveloperMessage$outboundSchema),
    z.lazy(() => exports.MessagesUserMessage$outboundSchema),
    z.lazy(() => exports.MessagesAssistantMessage$outboundSchema),
    z.lazy(() => exports.MessagesToolMessage$outboundSchema),
]);
function deploymentGetConfigMessagesToJSON(deploymentGetConfigMessages) {
    return JSON.stringify(exports.DeploymentGetConfigMessages$outboundSchema.parse(deploymentGetConfigMessages));
}
/** @internal */
exports.Metadata$outboundSchema = z.object({
    fileName: z.string().optional(),
    fileType: z.string().optional(),
    pageNumber: z.number().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        fileName: "file_name",
        fileType: "file_type",
        pageNumber: "page_number",
    });
});
function metadataToJSON(metadata) {
    return JSON.stringify(exports.Metadata$outboundSchema.parse(metadata));
}
/** @internal */
exports.Documents$outboundSchema = z.object({
    text: z.string(),
    metadata: z.lazy(() => exports.Metadata$outboundSchema).optional(),
});
function documentsToJSON(documents) {
    return JSON.stringify(exports.Documents$outboundSchema.parse(documents));
}
/** @internal */
exports.InvokeOptions$outboundSchema = z.object({
    includeRetrievals: z.boolean().default(false),
    includeUsage: z.boolean().default(false),
    mockResponse: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        includeRetrievals: "include_retrievals",
        includeUsage: "include_usage",
        mockResponse: "mock_response",
    });
});
function invokeOptionsToJSON(invokeOptions) {
    return JSON.stringify(exports.InvokeOptions$outboundSchema.parse(invokeOptions));
}
/** @internal */
exports.Thread$outboundSchema = z.object({
    id: z.string(),
    tags: z.array(z.string()).optional(),
});
function threadToJSON(thread) {
    return JSON.stringify(exports.Thread$outboundSchema.parse(thread));
}
/** @internal */
exports.OrExists$outboundSchema = z.object({
    exists: z.boolean(),
});
function orExistsToJSON(orExists) {
    return JSON.stringify(exports.OrExists$outboundSchema.parse(orExists));
}
/** @internal */
exports.DeploymentGetConfigOrNin$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function deploymentGetConfigOrNinToJSON(deploymentGetConfigOrNin) {
    return JSON.stringify(exports.DeploymentGetConfigOrNin$outboundSchema.parse(deploymentGetConfigOrNin));
}
/** @internal */
exports.OrNin$outboundSchema = z.object({
    nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
});
function orNinToJSON(orNin) {
    return JSON.stringify(exports.OrNin$outboundSchema.parse(orNin));
}
/** @internal */
exports.DeploymentGetConfigOrIn$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function deploymentGetConfigOrInToJSON(deploymentGetConfigOrIn) {
    return JSON.stringify(exports.DeploymentGetConfigOrIn$outboundSchema.parse(deploymentGetConfigOrIn));
}
/** @internal */
exports.OrIn$outboundSchema = z.object({
    in: z.array(z.union([z.string(), z.number(), z.boolean()])),
});
function orInToJSON(orIn) {
    return JSON.stringify(exports.OrIn$outboundSchema.parse(orIn));
}
/** @internal */
exports.OrLte$outboundSchema = z.object({
    lte: z.number(),
});
function orLteToJSON(orLte) {
    return JSON.stringify(exports.OrLte$outboundSchema.parse(orLte));
}
/** @internal */
exports.OrLt$outboundSchema = z.object({
    lt: z.number(),
});
function orLtToJSON(orLt) {
    return JSON.stringify(exports.OrLt$outboundSchema.parse(orLt));
}
/** @internal */
exports.OrGte$outboundSchema = z.object({
    gte: z.number(),
});
function orGteToJSON(orGte) {
    return JSON.stringify(exports.OrGte$outboundSchema.parse(orGte));
}
/** @internal */
exports.OrGt$outboundSchema = z.object({
    gt: z.number(),
});
function orGtToJSON(orGt) {
    return JSON.stringify(exports.OrGt$outboundSchema.parse(orGt));
}
/** @internal */
exports.DeploymentGetConfigOrNe$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function deploymentGetConfigOrNeToJSON(deploymentGetConfigOrNe) {
    return JSON.stringify(exports.DeploymentGetConfigOrNe$outboundSchema.parse(deploymentGetConfigOrNe));
}
/** @internal */
exports.OrNe$outboundSchema = z.object({
    ne: z.union([z.string(), z.number(), z.boolean()]),
});
function orNeToJSON(orNe) {
    return JSON.stringify(exports.OrNe$outboundSchema.parse(orNe));
}
/** @internal */
exports.DeploymentGetConfigOrEq$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function deploymentGetConfigOrEqToJSON(deploymentGetConfigOrEq) {
    return JSON.stringify(exports.DeploymentGetConfigOrEq$outboundSchema.parse(deploymentGetConfigOrEq));
}
/** @internal */
exports.OrEq$outboundSchema = z.object({
    eq: z.union([z.string(), z.number(), z.boolean()]),
});
function orEqToJSON(orEq) {
    return JSON.stringify(exports.OrEq$outboundSchema.parse(orEq));
}
/** @internal */
exports.KnowledgeFilterOr$outboundSchema = z.union([
    z.lazy(() => exports.OrEq$outboundSchema),
    z.lazy(() => exports.OrNe$outboundSchema),
    z.lazy(() => exports.OrGt$outboundSchema),
    z.lazy(() => exports.OrGte$outboundSchema),
    z.lazy(() => exports.OrLt$outboundSchema),
    z.lazy(() => exports.OrLte$outboundSchema),
    z.lazy(() => exports.OrIn$outboundSchema),
    z.lazy(() => exports.OrNin$outboundSchema),
    z.lazy(() => exports.OrExists$outboundSchema),
]);
function knowledgeFilterOrToJSON(knowledgeFilterOr) {
    return JSON.stringify(exports.KnowledgeFilterOr$outboundSchema.parse(knowledgeFilterOr));
}
/** @internal */
exports.Or$outboundSchema = z
    .object({
    or: z.array(z.record(z.union([
        z.lazy(() => exports.OrEq$outboundSchema),
        z.lazy(() => exports.OrNe$outboundSchema),
        z.lazy(() => exports.OrGt$outboundSchema),
        z.lazy(() => exports.OrGte$outboundSchema),
        z.lazy(() => exports.OrLt$outboundSchema),
        z.lazy(() => exports.OrLte$outboundSchema),
        z.lazy(() => exports.OrIn$outboundSchema),
        z.lazy(() => exports.OrNin$outboundSchema),
        z.lazy(() => exports.OrExists$outboundSchema),
    ]))),
});
function orToJSON(or) {
    return JSON.stringify(exports.Or$outboundSchema.parse(or));
}
/** @internal */
exports.AndExists$outboundSchema = z.object({
    exists: z.boolean(),
});
function andExistsToJSON(andExists) {
    return JSON.stringify(exports.AndExists$outboundSchema.parse(andExists));
}
/** @internal */
exports.DeploymentGetConfigAndNin$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function deploymentGetConfigAndNinToJSON(deploymentGetConfigAndNin) {
    return JSON.stringify(exports.DeploymentGetConfigAndNin$outboundSchema.parse(deploymentGetConfigAndNin));
}
/** @internal */
exports.AndNin$outboundSchema = z.object({
    nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
});
function andNinToJSON(andNin) {
    return JSON.stringify(exports.AndNin$outboundSchema.parse(andNin));
}
/** @internal */
exports.DeploymentGetConfigAndIn$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function deploymentGetConfigAndInToJSON(deploymentGetConfigAndIn) {
    return JSON.stringify(exports.DeploymentGetConfigAndIn$outboundSchema.parse(deploymentGetConfigAndIn));
}
/** @internal */
exports.AndIn$outboundSchema = z.object({
    in: z.array(z.union([z.string(), z.number(), z.boolean()])),
});
function andInToJSON(andIn) {
    return JSON.stringify(exports.AndIn$outboundSchema.parse(andIn));
}
/** @internal */
exports.AndLte$outboundSchema = z.object({
    lte: z.number(),
});
function andLteToJSON(andLte) {
    return JSON.stringify(exports.AndLte$outboundSchema.parse(andLte));
}
/** @internal */
exports.AndLt$outboundSchema = z.object({
    lt: z.number(),
});
function andLtToJSON(andLt) {
    return JSON.stringify(exports.AndLt$outboundSchema.parse(andLt));
}
/** @internal */
exports.AndGte$outboundSchema = z.object({
    gte: z.number(),
});
function andGteToJSON(andGte) {
    return JSON.stringify(exports.AndGte$outboundSchema.parse(andGte));
}
/** @internal */
exports.AndGt$outboundSchema = z.object({
    gt: z.number(),
});
function andGtToJSON(andGt) {
    return JSON.stringify(exports.AndGt$outboundSchema.parse(andGt));
}
/** @internal */
exports.DeploymentGetConfigAndNe$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function deploymentGetConfigAndNeToJSON(deploymentGetConfigAndNe) {
    return JSON.stringify(exports.DeploymentGetConfigAndNe$outboundSchema.parse(deploymentGetConfigAndNe));
}
/** @internal */
exports.AndNe$outboundSchema = z.object({
    ne: z.union([z.string(), z.number(), z.boolean()]),
});
function andNeToJSON(andNe) {
    return JSON.stringify(exports.AndNe$outboundSchema.parse(andNe));
}
/** @internal */
exports.DeploymentGetConfigAndEq$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function deploymentGetConfigAndEqToJSON(deploymentGetConfigAndEq) {
    return JSON.stringify(exports.DeploymentGetConfigAndEq$outboundSchema.parse(deploymentGetConfigAndEq));
}
/** @internal */
exports.AndEq$outboundSchema = z.object({
    eq: z.union([z.string(), z.number(), z.boolean()]),
});
function andEqToJSON(andEq) {
    return JSON.stringify(exports.AndEq$outboundSchema.parse(andEq));
}
/** @internal */
exports.KnowledgeFilterAnd$outboundSchema = z.union([
    z.lazy(() => exports.AndEq$outboundSchema),
    z.lazy(() => exports.AndNe$outboundSchema),
    z.lazy(() => exports.AndGt$outboundSchema),
    z.lazy(() => exports.AndGte$outboundSchema),
    z.lazy(() => exports.AndLt$outboundSchema),
    z.lazy(() => exports.AndLte$outboundSchema),
    z.lazy(() => exports.AndIn$outboundSchema),
    z.lazy(() => exports.AndNin$outboundSchema),
    z.lazy(() => exports.AndExists$outboundSchema),
]);
function knowledgeFilterAndToJSON(knowledgeFilterAnd) {
    return JSON.stringify(exports.KnowledgeFilterAnd$outboundSchema.parse(knowledgeFilterAnd));
}
/** @internal */
exports.And$outboundSchema = z
    .object({
    and: z.array(z.record(z.union([
        z.lazy(() => exports.AndEq$outboundSchema),
        z.lazy(() => exports.AndNe$outboundSchema),
        z.lazy(() => exports.AndGt$outboundSchema),
        z.lazy(() => exports.AndGte$outboundSchema),
        z.lazy(() => exports.AndLt$outboundSchema),
        z.lazy(() => exports.AndLte$outboundSchema),
        z.lazy(() => exports.AndIn$outboundSchema),
        z.lazy(() => exports.AndNin$outboundSchema),
        z.lazy(() => exports.AndExists$outboundSchema),
    ]))),
});
function andToJSON(and) {
    return JSON.stringify(exports.And$outboundSchema.parse(and));
}
/** @internal */
exports.Exists$outboundSchema = z.object({
    exists: z.boolean(),
});
function existsToJSON(exists) {
    return JSON.stringify(exports.Exists$outboundSchema.parse(exists));
}
/** @internal */
exports.OneNin$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function oneNinToJSON(oneNin) {
    return JSON.stringify(exports.OneNin$outboundSchema.parse(oneNin));
}
/** @internal */
exports.Nin$outboundSchema = z
    .object({
    nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
});
function ninToJSON(nin) {
    return JSON.stringify(exports.Nin$outboundSchema.parse(nin));
}
/** @internal */
exports.OneIn$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function oneInToJSON(oneIn) {
    return JSON.stringify(exports.OneIn$outboundSchema.parse(oneIn));
}
/** @internal */
exports.In$outboundSchema = z
    .object({
    in: z.array(z.union([z.string(), z.number(), z.boolean()])),
});
function inToJSON(value) {
    return JSON.stringify(exports.In$outboundSchema.parse(value));
}
/** @internal */
exports.Lte$outboundSchema = z
    .object({
    lte: z.number(),
});
function lteToJSON(lte) {
    return JSON.stringify(exports.Lte$outboundSchema.parse(lte));
}
/** @internal */
exports.Lt$outboundSchema = z
    .object({
    lt: z.number(),
});
function ltToJSON(lt) {
    return JSON.stringify(exports.Lt$outboundSchema.parse(lt));
}
/** @internal */
exports.Gte$outboundSchema = z
    .object({
    gte: z.number(),
});
function gteToJSON(gte) {
    return JSON.stringify(exports.Gte$outboundSchema.parse(gte));
}
/** @internal */
exports.Gt$outboundSchema = z
    .object({
    gt: z.number(),
});
function gtToJSON(gt) {
    return JSON.stringify(exports.Gt$outboundSchema.parse(gt));
}
/** @internal */
exports.OneNe$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function oneNeToJSON(oneNe) {
    return JSON.stringify(exports.OneNe$outboundSchema.parse(oneNe));
}
/** @internal */
exports.Ne$outboundSchema = z
    .object({
    ne: z.union([z.string(), z.number(), z.boolean()]),
});
function neToJSON(ne) {
    return JSON.stringify(exports.Ne$outboundSchema.parse(ne));
}
/** @internal */
exports.OneEq$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function oneEqToJSON(oneEq) {
    return JSON.stringify(exports.OneEq$outboundSchema.parse(oneEq));
}
/** @internal */
exports.Eq$outboundSchema = z
    .object({
    eq: z.union([z.string(), z.number(), z.boolean()]),
});
function eqToJSON(eq) {
    return JSON.stringify(exports.Eq$outboundSchema.parse(eq));
}
/** @internal */
exports.KnowledgeFilter1$outboundSchema = z.union([
    z.lazy(() => exports.Eq$outboundSchema),
    z.lazy(() => exports.Ne$outboundSchema),
    z.lazy(() => exports.Gt$outboundSchema),
    z.lazy(() => exports.Gte$outboundSchema),
    z.lazy(() => exports.Lt$outboundSchema),
    z.lazy(() => exports.Lte$outboundSchema),
    z.lazy(() => exports.In$outboundSchema),
    z.lazy(() => exports.Nin$outboundSchema),
    z.lazy(() => exports.Exists$outboundSchema),
]);
function knowledgeFilter1ToJSON(knowledgeFilter1) {
    return JSON.stringify(exports.KnowledgeFilter1$outboundSchema.parse(knowledgeFilter1));
}
/** @internal */
exports.KnowledgeFilter$outboundSchema = z.union([
    z.lazy(() => exports.And$outboundSchema),
    z.lazy(() => exports.Or$outboundSchema),
    z.record(z.union([
        z.lazy(() => exports.Eq$outboundSchema),
        z.lazy(() => exports.Ne$outboundSchema),
        z.lazy(() => exports.Gt$outboundSchema),
        z.lazy(() => exports.Gte$outboundSchema),
        z.lazy(() => exports.Lt$outboundSchema),
        z.lazy(() => exports.Lte$outboundSchema),
        z.lazy(() => exports.In$outboundSchema),
        z.lazy(() => exports.Nin$outboundSchema),
        z.lazy(() => exports.Exists$outboundSchema),
    ])),
]);
function knowledgeFilterToJSON(knowledgeFilter) {
    return JSON.stringify(exports.KnowledgeFilter$outboundSchema.parse(knowledgeFilter));
}
/** @internal */
exports.DeploymentGetConfigRequestBody$outboundSchema = z.object({
    key: z.string(),
    inputs: z.record(z.any()).optional(),
    context: z.record(z.any()).optional(),
    prefixMessages: z.array(z.union([
        z.lazy(() => exports.SystemMessage$outboundSchema),
        z.lazy(() => exports.DeveloperMessage$outboundSchema),
        z.lazy(() => exports.UserMessage$outboundSchema),
        z.lazy(() => exports.AssistantMessage$outboundSchema),
        z.lazy(() => exports.ToolMessage$outboundSchema),
    ])).optional(),
    messages: z.array(z.union([
        z.lazy(() => exports.MessagesSystemMessage$outboundSchema),
        z.lazy(() => exports.MessagesDeveloperMessage$outboundSchema),
        z.lazy(() => exports.MessagesUserMessage$outboundSchema),
        z.lazy(() => exports.MessagesAssistantMessage$outboundSchema),
        z.lazy(() => exports.MessagesToolMessage$outboundSchema),
    ])).optional(),
    identity: components.PublicIdentity$outboundSchema.optional(),
    fileIds: z.array(z.string()).optional(),
    metadata: z.record(z.any()).optional(),
    extraParams: z.record(z.any()).optional(),
    documents: z.array(z.lazy(() => exports.Documents$outboundSchema)).optional(),
    invokeOptions: z.lazy(() => exports.InvokeOptions$outboundSchema).optional(),
    thread: z.lazy(() => exports.Thread$outboundSchema).optional(),
    knowledgeFilter: z.union([
        z.lazy(() => exports.And$outboundSchema),
        z.lazy(() => exports.Or$outboundSchema),
        z.record(z.union([
            z.lazy(() => exports.Eq$outboundSchema),
            z.lazy(() => exports.Ne$outboundSchema),
            z.lazy(() => exports.Gt$outboundSchema),
            z.lazy(() => exports.Gte$outboundSchema),
            z.lazy(() => exports.Lt$outboundSchema),
            z.lazy(() => exports.Lte$outboundSchema),
            z.lazy(() => exports.In$outboundSchema),
            z.lazy(() => exports.Nin$outboundSchema),
            z.lazy(() => exports.Exists$outboundSchema),
        ])),
    ]).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        prefixMessages: "prefix_messages",
        fileIds: "file_ids",
        extraParams: "extra_params",
        invokeOptions: "invoke_options",
        knowledgeFilter: "knowledge_filter",
    });
});
function deploymentGetConfigRequestBodyToJSON(deploymentGetConfigRequestBody) {
    return JSON.stringify(exports.DeploymentGetConfigRequestBody$outboundSchema.parse(deploymentGetConfigRequestBody));
}
/** @internal */
exports.DeploymentGetConfigType$inboundSchema = z.nativeEnum(exports.DeploymentGetConfigType);
/** @internal */
exports.DeploymentGetConfigRole$inboundSchema = z.nativeEnum(exports.DeploymentGetConfigRole);
/** @internal */
exports.TwoFile$inboundSchema = z.object({
    file_data: z.string().optional(),
    uri: z.string().optional(),
    mimeType: z.string().optional(),
    filename: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "file_data": "fileData",
    });
});
function twoFileFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TwoFile$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoFile' from JSON`);
}
/** @internal */
exports.DeploymentGetConfig23$inboundSchema = z.object({
    type: z.literal("file"),
    file: z.lazy(() => exports.TwoFile$inboundSchema),
});
function deploymentGetConfig23FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeploymentGetConfig23$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentGetConfig23' from JSON`);
}
/** @internal */
exports.TwoImageUrl$inboundSchema = z.object({
    id: z.string().optional(),
    url: z.string(),
    detail: z.string().optional(),
});
function twoImageUrlFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TwoImageUrl$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoImageUrl' from JSON`);
}
/** @internal */
exports.DeploymentGetConfig22$inboundSchema = z.object({
    type: z.literal("image_url"),
    image_url: z.lazy(() => exports.TwoImageUrl$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "image_url": "imageUrl",
    });
});
function deploymentGetConfig22FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeploymentGetConfig22$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentGetConfig22' from JSON`);
}
/** @internal */
exports.DeploymentGetConfig21$inboundSchema = z.object({
    type: z.literal("text"),
    text: z.string(),
});
function deploymentGetConfig21FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeploymentGetConfig21$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentGetConfig21' from JSON`);
}
/** @internal */
exports.DeploymentGetConfigContentDeploymentsResponse2$inboundSchema = z.union([
    z.lazy(() => exports.DeploymentGetConfig21$inboundSchema),
    z.lazy(() => exports.DeploymentGetConfig22$inboundSchema),
    z.lazy(() => exports.DeploymentGetConfig23$inboundSchema),
]);
function deploymentGetConfigContentDeploymentsResponse2FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeploymentGetConfigContentDeploymentsResponse2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentGetConfigContentDeploymentsResponse2' from JSON`);
}
/** @internal */
exports.DeploymentGetConfigContent$inboundSchema = z.union([
    z.string(),
    z.array(z.union([
        z.lazy(() => exports.DeploymentGetConfig21$inboundSchema),
        z.lazy(() => exports.DeploymentGetConfig22$inboundSchema),
        z.lazy(() => exports.DeploymentGetConfig23$inboundSchema),
    ])),
]);
function deploymentGetConfigContentFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeploymentGetConfigContent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentGetConfigContent' from JSON`);
}
/** @internal */
exports.DeploymentGetConfigDeploymentsResponseType$inboundSchema = z
    .nativeEnum(exports.DeploymentGetConfigDeploymentsResponseType);
/** @internal */
exports.DeploymentGetConfigDeploymentsFunction$inboundSchema = z.object({
    name: z.string(),
    arguments: z.string(),
});
function deploymentGetConfigDeploymentsFunctionFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeploymentGetConfigDeploymentsFunction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentGetConfigDeploymentsFunction' from JSON`);
}
/** @internal */
exports.DeploymentGetConfigToolCalls$inboundSchema = z.object({
    id: z.string().optional(),
    index: z.number().optional(),
    type: exports.DeploymentGetConfigDeploymentsResponseType$inboundSchema,
    function: z.lazy(() => exports.DeploymentGetConfigDeploymentsFunction$inboundSchema),
});
function deploymentGetConfigToolCallsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeploymentGetConfigToolCalls$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentGetConfigToolCalls' from JSON`);
}
/** @internal */
exports.DeploymentGetConfigDeploymentsMessages$inboundSchema = z.object({
    role: exports.DeploymentGetConfigRole$inboundSchema,
    content: z.nullable(z.union([
        z.string(),
        z.array(z.union([
            z.lazy(() => exports.DeploymentGetConfig21$inboundSchema),
            z.lazy(() => exports.DeploymentGetConfig22$inboundSchema),
            z.lazy(() => exports.DeploymentGetConfig23$inboundSchema),
        ])),
    ])),
    tool_calls: z.array(z.lazy(() => exports.DeploymentGetConfigToolCalls$inboundSchema))
        .optional(),
    tool_call_id: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "tool_calls": "toolCalls",
        "tool_call_id": "toolCallId",
    });
});
function deploymentGetConfigDeploymentsMessagesFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeploymentGetConfigDeploymentsMessages$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentGetConfigDeploymentsMessages' from JSON`);
}
/** @internal */
exports.DeploymentGetConfigFormat$inboundSchema = z.nativeEnum(exports.DeploymentGetConfigFormat);
/** @internal */
exports.ResponseFormat6$inboundSchema = z.nativeEnum(exports.ResponseFormat6);
/** @internal */
exports.ResponseFormat5$inboundSchema = z.nativeEnum(exports.ResponseFormat5);
/** @internal */
exports.ResponseFormat4$inboundSchema = z.nativeEnum(exports.ResponseFormat4);
/** @internal */
exports.DeploymentGetConfigResponseFormatDeploymentsType$inboundSchema = z
    .nativeEnum(exports.DeploymentGetConfigResponseFormatDeploymentsType);
/** @internal */
exports.ResponseFormat3$inboundSchema = z.object({
    type: exports.DeploymentGetConfigResponseFormatDeploymentsType$inboundSchema,
});
function responseFormat3FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResponseFormat3$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseFormat3' from JSON`);
}
/** @internal */
exports.DeploymentGetConfigResponseFormatType$inboundSchema = z.nativeEnum(exports.DeploymentGetConfigResponseFormatType);
/** @internal */
exports.ResponseFormat2$inboundSchema = z.object({
    type: exports.DeploymentGetConfigResponseFormatType$inboundSchema,
});
function responseFormat2FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResponseFormat2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseFormat2' from JSON`);
}
/** @internal */
exports.DeploymentGetConfigResponseFormatDeploymentsResponseType$inboundSchema = z.nativeEnum(exports.DeploymentGetConfigResponseFormatDeploymentsResponseType);
/** @internal */
exports.DeploymentGetConfigResponseFormatJsonSchema$inboundSchema = z.object({
    name: z.string(),
    description: z.string().optional(),
    strict: z.boolean().optional(),
    schema: z.record(z.any()),
});
function deploymentGetConfigResponseFormatJsonSchemaFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeploymentGetConfigResponseFormatJsonSchema$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentGetConfigResponseFormatJsonSchema' from JSON`);
}
/** @internal */
exports.ResponseFormat1$inboundSchema = z.object({
    type: exports.DeploymentGetConfigResponseFormatDeploymentsResponseType$inboundSchema,
    display_name: z.string().optional(),
    json_schema: z.lazy(() => exports.DeploymentGetConfigResponseFormatJsonSchema$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "display_name": "displayName",
        "json_schema": "jsonSchema",
    });
});
function responseFormat1FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResponseFormat1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseFormat1' from JSON`);
}
/** @internal */
exports.DeploymentGetConfigResponseFormat$inboundSchema = z.union([
    z.lazy(() => exports.ResponseFormat1$inboundSchema),
    z.lazy(() => exports.ResponseFormat2$inboundSchema),
    z.lazy(() => exports.ResponseFormat3$inboundSchema),
    exports.ResponseFormat4$inboundSchema,
    exports.ResponseFormat5$inboundSchema,
    exports.ResponseFormat6$inboundSchema,
]);
function deploymentGetConfigResponseFormatFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeploymentGetConfigResponseFormat$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentGetConfigResponseFormat' from JSON`);
}
/** @internal */
exports.PhotoRealVersion$inboundSchema = z.nativeEnum(exports.PhotoRealVersion);
/** @internal */
exports.DeploymentGetConfigEncodingFormat$inboundSchema = z.nativeEnum(exports.DeploymentGetConfigEncodingFormat);
/** @internal */
exports.DeploymentGetConfigReasoningEffort$inboundSchema = z.nativeEnum(exports.DeploymentGetConfigReasoningEffort);
/** @internal */
exports.Verbosity$inboundSchema = z
    .nativeEnum(exports.Verbosity);
/** @internal */
exports.ThinkingLevel$inboundSchema = z.nativeEnum(exports.ThinkingLevel);
/** @internal */
exports.DeploymentGetConfigParameters$inboundSchema = z.object({
    temperature: z.number().optional(),
    maxTokens: z.number().optional(),
    topK: z.number().optional(),
    topP: z.number().optional(),
    frequencyPenalty: z.number().optional(),
    presencePenalty: z.number().optional(),
    numImages: z.number().optional(),
    seed: z.number().optional(),
    format: exports.DeploymentGetConfigFormat$inboundSchema.optional(),
    dimensions: z.string().optional(),
    quality: z.string().optional(),
    style: z.string().optional(),
    responseFormat: z.nullable(z.union([
        z.lazy(() => exports.ResponseFormat1$inboundSchema),
        z.lazy(() => exports.ResponseFormat2$inboundSchema),
        z.lazy(() => exports.ResponseFormat3$inboundSchema),
        exports.ResponseFormat4$inboundSchema,
        exports.ResponseFormat5$inboundSchema,
        exports.ResponseFormat6$inboundSchema,
    ])).optional(),
    photoRealVersion: exports.PhotoRealVersion$inboundSchema.optional(),
    encoding_format: exports.DeploymentGetConfigEncodingFormat$inboundSchema.optional(),
    reasoningEffort: exports.DeploymentGetConfigReasoningEffort$inboundSchema.optional(),
    budgetTokens: z.number().optional(),
    verbosity: exports.Verbosity$inboundSchema.optional(),
    thinkingLevel: exports.ThinkingLevel$inboundSchema.optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "encoding_format": "encodingFormat",
    });
});
function deploymentGetConfigParametersFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeploymentGetConfigParameters$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentGetConfigParameters' from JSON`);
}
/** @internal */
exports.DeploymentGetConfigDeploymentsType$inboundSchema = z.nativeEnum(exports.DeploymentGetConfigDeploymentsType);
/** @internal */
exports.DeploymentGetConfigFunction$inboundSchema = z.object({
    name: z.string(),
    description: z.string().optional(),
    parameters: z.record(z.any()).optional(),
});
function deploymentGetConfigFunctionFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeploymentGetConfigFunction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentGetConfigFunction' from JSON`);
}
/** @internal */
exports.DeploymentGetConfigTools$inboundSchema = z.object({
    type: exports.DeploymentGetConfigDeploymentsType$inboundSchema,
    function: z.lazy(() => exports.DeploymentGetConfigFunction$inboundSchema),
});
function deploymentGetConfigToolsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeploymentGetConfigTools$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentGetConfigTools' from JSON`);
}
/** @internal */
exports.DeploymentGetConfigResponseBody$inboundSchema = z.object({
    id: z.string(),
    provider: z.string(),
    model: z.string(),
    type: exports.DeploymentGetConfigType$inboundSchema.optional(),
    version: z.string(),
    messages: z.array(z.lazy(() => exports.DeploymentGetConfigDeploymentsMessages$inboundSchema)),
    parameters: z.lazy(() => exports.DeploymentGetConfigParameters$inboundSchema),
    tools: z.array(z.lazy(() => exports.DeploymentGetConfigTools$inboundSchema))
        .optional(),
});
function deploymentGetConfigResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeploymentGetConfigResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentGetConfigResponseBody' from JSON`);
}
//# sourceMappingURL=deploymentgetconfig.js.map