"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.DeploymentStreamMessagesAudio$outboundSchema = exports.DeploymentStreamMessagesDeploymentsRequestRequestBodyContent$outboundSchema = exports.DeploymentStreamContentDeploymentsRequestRequestBodyMessages2$outboundSchema = exports.DeploymentStreamMessagesToolMessage$outboundSchema = exports.DeploymentStreamMessagesCacheControl$outboundSchema = exports.DeploymentStreamMessagesTtl$outboundSchema = exports.DeploymentStreamMessagesDeploymentsType$outboundSchema = exports.DeploymentStreamMessagesDeploymentsRequestRequestBody5Content$outboundSchema = exports.DeploymentStreamContentDeploymentsRequestRequestBodyMessages52$outboundSchema = exports.DeploymentStreamPrefixMessages$outboundSchema = exports.PrefixMessagesSystemMessage$outboundSchema = exports.DeploymentStreamPrefixMessagesContent$outboundSchema = exports.PrefixMessagesDeveloperMessage$outboundSchema = exports.DeploymentStreamPrefixMessagesDeploymentsContent$outboundSchema = exports.PrefixMessagesUserMessage$outboundSchema = exports.DeploymentStreamPrefixMessagesDeploymentsRequestContent$outboundSchema = exports.DeploymentStreamContent2$outboundSchema = exports.DeploymentStream24$outboundSchema = exports.DeploymentStream2CacheControl$outboundSchema = exports.DeploymentStream2Ttl$outboundSchema = exports.DeploymentStream2DeploymentsType$outboundSchema = exports.PrefixMessagesAssistantMessage$outboundSchema = exports.DeploymentStreamPrefixMessagesToolCalls$outboundSchema = exports.DeploymentStreamPrefixMessagesFunction$outboundSchema = exports.DeploymentStreamPrefixMessagesType$outboundSchema = exports.PrefixMessagesAudio$outboundSchema = exports.DeploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContent$outboundSchema = exports.DeploymentStreamContentDeployments2$outboundSchema = exports.PrefixMessagesToolMessage$outboundSchema = exports.DeploymentStreamPrefixMessagesCacheControl$outboundSchema = exports.DeploymentStreamPrefixMessagesTtl$outboundSchema = exports.DeploymentStreamPrefixMessagesDeploymentsType$outboundSchema = exports.DeploymentStreamPrefixMessagesDeploymentsRequestRequestBody5Content$outboundSchema = exports.DeploymentStreamContentDeploymentsRequest2$outboundSchema = exports.DeploymentStreamMessageDeploymentsResponse200Type = exports.DeploymentStreamMessageRole = exports.DeploymentStreamMessageDeploymentsRole = exports.DeploymentStreamMessageDeploymentsResponseRole = exports.DeploymentStreamProvider = exports.DeploymentStreamObject = exports.DeploymentStream2DeploymentsTtl = exports.DeploymentStream2DeploymentsRequestRequestBodyType = exports.DeploymentStreamMessagesType = exports.DeploymentStreamMessagesTtl = exports.DeploymentStreamMessagesDeploymentsType = exports.DeploymentStream2Ttl = exports.DeploymentStream2DeploymentsType = exports.DeploymentStreamPrefixMessagesType = exports.DeploymentStreamPrefixMessagesTtl = exports.DeploymentStreamPrefixMessagesDeploymentsType = void 0;
exports.DeploymentStreamKnowledgeFilterAnd$outboundSchema = exports.DeploymentStreamKnowledgeFilterDeploymentsAnd$outboundSchema = exports.DeploymentStreamAndEq$outboundSchema = exports.DeploymentStreamAndDeploymentsEq$outboundSchema = exports.DeploymentStreamAndNe$outboundSchema = exports.DeploymentStreamAndDeploymentsNe$outboundSchema = exports.DeploymentStreamAndGt$outboundSchema = exports.DeploymentStreamAndGte$outboundSchema = exports.DeploymentStreamAndLt$outboundSchema = exports.DeploymentStreamAndLte$outboundSchema = exports.DeploymentStreamAndIn$outboundSchema = exports.DeploymentStreamAndDeploymentsIn$outboundSchema = exports.DeploymentStreamAndNin$outboundSchema = exports.DeploymentStreamAndDeploymentsNin$outboundSchema = exports.DeploymentStreamAndExists$outboundSchema = exports.DeploymentStreamKnowledgeFilterOr$outboundSchema = exports.DeploymentStreamKnowledgeFilterDeploymentsOr$outboundSchema = exports.DeploymentStreamOrEq$outboundSchema = exports.DeploymentStreamOrDeploymentsEq$outboundSchema = exports.DeploymentStreamOrNe$outboundSchema = exports.DeploymentStreamOrDeploymentsNe$outboundSchema = exports.DeploymentStreamOrGt$outboundSchema = exports.DeploymentStreamOrGte$outboundSchema = exports.DeploymentStreamOrLt$outboundSchema = exports.DeploymentStreamOrLte$outboundSchema = exports.DeploymentStreamOrIn$outboundSchema = exports.DeploymentStreamOrDeploymentsIn$outboundSchema = exports.DeploymentStreamOrNin$outboundSchema = exports.DeploymentStreamOrDeploymentsNin$outboundSchema = exports.DeploymentStreamOrExists$outboundSchema = exports.DeploymentStreamThread$outboundSchema = exports.DeploymentStreamInvokeOptions$outboundSchema = exports.DeploymentStreamDocuments$outboundSchema = exports.DeploymentStreamMetadata$outboundSchema = exports.DeploymentStreamMessages$outboundSchema = exports.DeploymentStreamMessagesSystemMessage$outboundSchema = exports.DeploymentStreamMessagesContent$outboundSchema = exports.DeploymentStreamMessagesDeveloperMessage$outboundSchema = exports.DeploymentStreamMessagesDeploymentsContent$outboundSchema = exports.DeploymentStreamMessagesUserMessage$outboundSchema = exports.DeploymentStreamMessagesDeploymentsRequestContent$outboundSchema = exports.DeploymentStreamContentDeploymentsRequestRequestBody2$outboundSchema = exports.DeploymentStream2Deployments4$outboundSchema = exports.DeploymentStream2DeploymentsCacheControl$outboundSchema = exports.DeploymentStream2DeploymentsTtl$outboundSchema = exports.DeploymentStream2DeploymentsRequestRequestBodyType$outboundSchema = exports.DeploymentStreamMessagesAssistantMessage$outboundSchema = exports.DeploymentStreamMessagesToolCalls$outboundSchema = exports.DeploymentStreamMessagesFunction$outboundSchema = exports.DeploymentStreamMessagesType$outboundSchema = void 0;
exports.DeploymentStreamResponseBody$inboundSchema = exports.DeploymentStreamData$inboundSchema = exports.DeploymentStreamChoices$inboundSchema = exports.DeploymentStreamMessage$inboundSchema = exports.DeploymentStreamMessage1$inboundSchema = exports.DeploymentStreamMessageToolCalls$inboundSchema = exports.DeploymentStreamMessageFunction$inboundSchema = exports.DeploymentStreamMessageDeploymentsResponse200Type$inboundSchema = exports.DeploymentStreamMessageRole$inboundSchema = exports.DeploymentStreamMessage2$inboundSchema = exports.DeploymentStreamMessageDeploymentsRole$inboundSchema = exports.DeploymentStreamMessage3$inboundSchema = exports.DeploymentStreamMessageDeploymentsResponseRole$inboundSchema = exports.DeploymentStreamUsage$inboundSchema = exports.DeploymentStreamCompletionTokensDetails$inboundSchema = exports.DeploymentStreamPromptTokensDetails$inboundSchema = exports.DeploymentStreamRetrievals$inboundSchema = exports.DeploymentStreamDeploymentsMetadata$inboundSchema = exports.DeploymentStreamTelemetry$inboundSchema = exports.DeploymentStreamProvider$inboundSchema = exports.DeploymentStreamObject$inboundSchema = exports.DeploymentStreamRequestBody$outboundSchema = exports.DeploymentStreamKnowledgeFilter$outboundSchema = exports.DeploymentStreamKnowledgeFilter1$outboundSchema = exports.DeploymentStream1Eq$outboundSchema = exports.DeploymentStream1DeploymentsEq$outboundSchema = exports.DeploymentStream1Ne$outboundSchema = exports.DeploymentStream1DeploymentsNe$outboundSchema = exports.OneGt$outboundSchema = exports.OneGte$outboundSchema = exports.OneLt$outboundSchema = exports.OneLte$outboundSchema = exports.DeploymentStream1In$outboundSchema = exports.DeploymentStream1DeploymentsIn$outboundSchema = exports.DeploymentStream1Nin$outboundSchema = exports.DeploymentStream1DeploymentsNin$outboundSchema = exports.OneExists$outboundSchema = void 0;
exports.deploymentStreamContentDeploymentsRequest2ToJSON = deploymentStreamContentDeploymentsRequest2ToJSON;
exports.deploymentStreamPrefixMessagesDeploymentsRequestRequestBody5ContentToJSON = deploymentStreamPrefixMessagesDeploymentsRequestRequestBody5ContentToJSON;
exports.deploymentStreamPrefixMessagesCacheControlToJSON = deploymentStreamPrefixMessagesCacheControlToJSON;
exports.prefixMessagesToolMessageToJSON = prefixMessagesToolMessageToJSON;
exports.deploymentStreamContentDeployments2ToJSON = deploymentStreamContentDeployments2ToJSON;
exports.deploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContentToJSON = deploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContentToJSON;
exports.prefixMessagesAudioToJSON = prefixMessagesAudioToJSON;
exports.deploymentStreamPrefixMessagesFunctionToJSON = deploymentStreamPrefixMessagesFunctionToJSON;
exports.deploymentStreamPrefixMessagesToolCallsToJSON = deploymentStreamPrefixMessagesToolCallsToJSON;
exports.prefixMessagesAssistantMessageToJSON = prefixMessagesAssistantMessageToJSON;
exports.deploymentStream2CacheControlToJSON = deploymentStream2CacheControlToJSON;
exports.deploymentStream24ToJSON = deploymentStream24ToJSON;
exports.deploymentStreamContent2ToJSON = deploymentStreamContent2ToJSON;
exports.deploymentStreamPrefixMessagesDeploymentsRequestContentToJSON = deploymentStreamPrefixMessagesDeploymentsRequestContentToJSON;
exports.prefixMessagesUserMessageToJSON = prefixMessagesUserMessageToJSON;
exports.deploymentStreamPrefixMessagesDeploymentsContentToJSON = deploymentStreamPrefixMessagesDeploymentsContentToJSON;
exports.prefixMessagesDeveloperMessageToJSON = prefixMessagesDeveloperMessageToJSON;
exports.deploymentStreamPrefixMessagesContentToJSON = deploymentStreamPrefixMessagesContentToJSON;
exports.prefixMessagesSystemMessageToJSON = prefixMessagesSystemMessageToJSON;
exports.deploymentStreamPrefixMessagesToJSON = deploymentStreamPrefixMessagesToJSON;
exports.deploymentStreamContentDeploymentsRequestRequestBodyMessages52ToJSON = deploymentStreamContentDeploymentsRequestRequestBodyMessages52ToJSON;
exports.deploymentStreamMessagesDeploymentsRequestRequestBody5ContentToJSON = deploymentStreamMessagesDeploymentsRequestRequestBody5ContentToJSON;
exports.deploymentStreamMessagesCacheControlToJSON = deploymentStreamMessagesCacheControlToJSON;
exports.deploymentStreamMessagesToolMessageToJSON = deploymentStreamMessagesToolMessageToJSON;
exports.deploymentStreamContentDeploymentsRequestRequestBodyMessages2ToJSON = deploymentStreamContentDeploymentsRequestRequestBodyMessages2ToJSON;
exports.deploymentStreamMessagesDeploymentsRequestRequestBodyContentToJSON = deploymentStreamMessagesDeploymentsRequestRequestBodyContentToJSON;
exports.deploymentStreamMessagesAudioToJSON = deploymentStreamMessagesAudioToJSON;
exports.deploymentStreamMessagesFunctionToJSON = deploymentStreamMessagesFunctionToJSON;
exports.deploymentStreamMessagesToolCallsToJSON = deploymentStreamMessagesToolCallsToJSON;
exports.deploymentStreamMessagesAssistantMessageToJSON = deploymentStreamMessagesAssistantMessageToJSON;
exports.deploymentStream2DeploymentsCacheControlToJSON = deploymentStream2DeploymentsCacheControlToJSON;
exports.deploymentStream2Deployments4ToJSON = deploymentStream2Deployments4ToJSON;
exports.deploymentStreamContentDeploymentsRequestRequestBody2ToJSON = deploymentStreamContentDeploymentsRequestRequestBody2ToJSON;
exports.deploymentStreamMessagesDeploymentsRequestContentToJSON = deploymentStreamMessagesDeploymentsRequestContentToJSON;
exports.deploymentStreamMessagesUserMessageToJSON = deploymentStreamMessagesUserMessageToJSON;
exports.deploymentStreamMessagesDeploymentsContentToJSON = deploymentStreamMessagesDeploymentsContentToJSON;
exports.deploymentStreamMessagesDeveloperMessageToJSON = deploymentStreamMessagesDeveloperMessageToJSON;
exports.deploymentStreamMessagesContentToJSON = deploymentStreamMessagesContentToJSON;
exports.deploymentStreamMessagesSystemMessageToJSON = deploymentStreamMessagesSystemMessageToJSON;
exports.deploymentStreamMessagesToJSON = deploymentStreamMessagesToJSON;
exports.deploymentStreamMetadataToJSON = deploymentStreamMetadataToJSON;
exports.deploymentStreamDocumentsToJSON = deploymentStreamDocumentsToJSON;
exports.deploymentStreamInvokeOptionsToJSON = deploymentStreamInvokeOptionsToJSON;
exports.deploymentStreamThreadToJSON = deploymentStreamThreadToJSON;
exports.deploymentStreamOrExistsToJSON = deploymentStreamOrExistsToJSON;
exports.deploymentStreamOrDeploymentsNinToJSON = deploymentStreamOrDeploymentsNinToJSON;
exports.deploymentStreamOrNinToJSON = deploymentStreamOrNinToJSON;
exports.deploymentStreamOrDeploymentsInToJSON = deploymentStreamOrDeploymentsInToJSON;
exports.deploymentStreamOrInToJSON = deploymentStreamOrInToJSON;
exports.deploymentStreamOrLteToJSON = deploymentStreamOrLteToJSON;
exports.deploymentStreamOrLtToJSON = deploymentStreamOrLtToJSON;
exports.deploymentStreamOrGteToJSON = deploymentStreamOrGteToJSON;
exports.deploymentStreamOrGtToJSON = deploymentStreamOrGtToJSON;
exports.deploymentStreamOrDeploymentsNeToJSON = deploymentStreamOrDeploymentsNeToJSON;
exports.deploymentStreamOrNeToJSON = deploymentStreamOrNeToJSON;
exports.deploymentStreamOrDeploymentsEqToJSON = deploymentStreamOrDeploymentsEqToJSON;
exports.deploymentStreamOrEqToJSON = deploymentStreamOrEqToJSON;
exports.deploymentStreamKnowledgeFilterDeploymentsOrToJSON = deploymentStreamKnowledgeFilterDeploymentsOrToJSON;
exports.deploymentStreamKnowledgeFilterOrToJSON = deploymentStreamKnowledgeFilterOrToJSON;
exports.deploymentStreamAndExistsToJSON = deploymentStreamAndExistsToJSON;
exports.deploymentStreamAndDeploymentsNinToJSON = deploymentStreamAndDeploymentsNinToJSON;
exports.deploymentStreamAndNinToJSON = deploymentStreamAndNinToJSON;
exports.deploymentStreamAndDeploymentsInToJSON = deploymentStreamAndDeploymentsInToJSON;
exports.deploymentStreamAndInToJSON = deploymentStreamAndInToJSON;
exports.deploymentStreamAndLteToJSON = deploymentStreamAndLteToJSON;
exports.deploymentStreamAndLtToJSON = deploymentStreamAndLtToJSON;
exports.deploymentStreamAndGteToJSON = deploymentStreamAndGteToJSON;
exports.deploymentStreamAndGtToJSON = deploymentStreamAndGtToJSON;
exports.deploymentStreamAndDeploymentsNeToJSON = deploymentStreamAndDeploymentsNeToJSON;
exports.deploymentStreamAndNeToJSON = deploymentStreamAndNeToJSON;
exports.deploymentStreamAndDeploymentsEqToJSON = deploymentStreamAndDeploymentsEqToJSON;
exports.deploymentStreamAndEqToJSON = deploymentStreamAndEqToJSON;
exports.deploymentStreamKnowledgeFilterDeploymentsAndToJSON = deploymentStreamKnowledgeFilterDeploymentsAndToJSON;
exports.deploymentStreamKnowledgeFilterAndToJSON = deploymentStreamKnowledgeFilterAndToJSON;
exports.oneExistsToJSON = oneExistsToJSON;
exports.deploymentStream1DeploymentsNinToJSON = deploymentStream1DeploymentsNinToJSON;
exports.deploymentStream1NinToJSON = deploymentStream1NinToJSON;
exports.deploymentStream1DeploymentsInToJSON = deploymentStream1DeploymentsInToJSON;
exports.deploymentStream1InToJSON = deploymentStream1InToJSON;
exports.oneLteToJSON = oneLteToJSON;
exports.oneLtToJSON = oneLtToJSON;
exports.oneGteToJSON = oneGteToJSON;
exports.oneGtToJSON = oneGtToJSON;
exports.deploymentStream1DeploymentsNeToJSON = deploymentStream1DeploymentsNeToJSON;
exports.deploymentStream1NeToJSON = deploymentStream1NeToJSON;
exports.deploymentStream1DeploymentsEqToJSON = deploymentStream1DeploymentsEqToJSON;
exports.deploymentStream1EqToJSON = deploymentStream1EqToJSON;
exports.deploymentStreamKnowledgeFilter1ToJSON = deploymentStreamKnowledgeFilter1ToJSON;
exports.deploymentStreamKnowledgeFilterToJSON = deploymentStreamKnowledgeFilterToJSON;
exports.deploymentStreamRequestBodyToJSON = deploymentStreamRequestBodyToJSON;
exports.deploymentStreamTelemetryFromJSON = deploymentStreamTelemetryFromJSON;
exports.deploymentStreamDeploymentsMetadataFromJSON = deploymentStreamDeploymentsMetadataFromJSON;
exports.deploymentStreamRetrievalsFromJSON = deploymentStreamRetrievalsFromJSON;
exports.deploymentStreamPromptTokensDetailsFromJSON = deploymentStreamPromptTokensDetailsFromJSON;
exports.deploymentStreamCompletionTokensDetailsFromJSON = deploymentStreamCompletionTokensDetailsFromJSON;
exports.deploymentStreamUsageFromJSON = deploymentStreamUsageFromJSON;
exports.deploymentStreamMessage3FromJSON = deploymentStreamMessage3FromJSON;
exports.deploymentStreamMessage2FromJSON = deploymentStreamMessage2FromJSON;
exports.deploymentStreamMessageFunctionFromJSON = deploymentStreamMessageFunctionFromJSON;
exports.deploymentStreamMessageToolCallsFromJSON = deploymentStreamMessageToolCallsFromJSON;
exports.deploymentStreamMessage1FromJSON = deploymentStreamMessage1FromJSON;
exports.deploymentStreamMessageFromJSON = deploymentStreamMessageFromJSON;
exports.deploymentStreamChoicesFromJSON = deploymentStreamChoicesFromJSON;
exports.deploymentStreamDataFromJSON = deploymentStreamDataFromJSON;
exports.deploymentStreamResponseBodyFromJSON = deploymentStreamResponseBodyFromJSON;
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.DeploymentStreamPrefixMessagesDeploymentsType = {
    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.DeploymentStreamPrefixMessagesTtl = {
    Fivem: "5m",
    Oneh: "1h",
};
/**
 * The type of the tool. Currently, only `function` is supported.
 */
exports.DeploymentStreamPrefixMessagesType = {
    Function: "function",
};
/**
 * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
 */
exports.DeploymentStream2DeploymentsType = {
    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.DeploymentStream2Ttl = {
    Fivem: "5m",
    Oneh: "1h",
};
/**
 * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
 */
exports.DeploymentStreamMessagesDeploymentsType = {
    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.DeploymentStreamMessagesTtl = {
    Fivem: "5m",
    Oneh: "1h",
};
/**
 * The type of the tool. Currently, only `function` is supported.
 */
exports.DeploymentStreamMessagesType = {
    Function: "function",
};
/**
 * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
 */
exports.DeploymentStream2DeploymentsRequestRequestBodyType = {
    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.DeploymentStream2DeploymentsTtl = {
    Fivem: "5m",
    Oneh: "1h",
};
/**
 * Indicates the type of model used to generate the response
 */
exports.DeploymentStreamObject = {
    Chat: "chat",
    Completion: "completion",
    Image: "image",
};
/**
 * The provider used to generate the response
 */
exports.DeploymentStreamProvider = {
    Openai: "openai",
    Groq: "groq",
    Cohere: "cohere",
    Azure: "azure",
    Aws: "aws",
    Google: "google",
    GoogleAi: "google-ai",
    Huggingface: "huggingface",
    Togetherai: "togetherai",
    Perplexity: "perplexity",
    Anthropic: "anthropic",
    Leonardoai: "leonardoai",
    Fal: "fal",
    Nvidia: "nvidia",
    Jina: "jina",
    Elevenlabs: "elevenlabs",
    Litellm: "litellm",
    Cerebras: "cerebras",
    Openailike: "openailike",
    Bytedance: "bytedance",
    Mistral: "mistral",
    Deepseek: "deepseek",
    Contextualai: "contextualai",
    Moonshotai: "moonshotai",
    Zai: "zai",
    Minimax: "minimax",
    Xai: "xai",
    Alibaba: "alibaba",
    Tensorix: "tensorix",
    Scaleway: "scaleway",
    Hcompany: "hcompany",
    Inceptron: "inceptron",
    Slack: "slack",
    Orq: "orq",
};
/**
 * The role of the prompt message
 */
exports.DeploymentStreamMessageDeploymentsResponseRole = {
    System: "system",
    Developer: "developer",
    Assistant: "assistant",
    User: "user",
    Exception: "exception",
    Tool: "tool",
    Prompt: "prompt",
    Correction: "correction",
    ExpectedOutput: "expected_output",
};
/**
 * The role of the prompt message
 */
exports.DeploymentStreamMessageDeploymentsRole = {
    System: "system",
    Developer: "developer",
    Assistant: "assistant",
    User: "user",
    Exception: "exception",
    Tool: "tool",
    Prompt: "prompt",
    Correction: "correction",
    ExpectedOutput: "expected_output",
};
/**
 * The role of the prompt message
 */
exports.DeploymentStreamMessageRole = {
    System: "system",
    Developer: "developer",
    Assistant: "assistant",
    User: "user",
    Exception: "exception",
    Tool: "tool",
    Prompt: "prompt",
    Correction: "correction",
    ExpectedOutput: "expected_output",
};
exports.DeploymentStreamMessageDeploymentsResponse200Type = {
    Function: "function",
};
/** @internal */
exports.DeploymentStreamContentDeploymentsRequest2$outboundSchema = components.TextContentPartSchema$outboundSchema;
function deploymentStreamContentDeploymentsRequest2ToJSON(deploymentStreamContentDeploymentsRequest2) {
    return JSON.stringify(exports.DeploymentStreamContentDeploymentsRequest2$outboundSchema.parse(deploymentStreamContentDeploymentsRequest2));
}
/** @internal */
exports.DeploymentStreamPrefixMessagesDeploymentsRequestRequestBody5Content$outboundSchema = z.union([
    z.string(),
    z.array(components.TextContentPartSchema$outboundSchema),
]);
function deploymentStreamPrefixMessagesDeploymentsRequestRequestBody5ContentToJSON(deploymentStreamPrefixMessagesDeploymentsRequestRequestBody5Content) {
    return JSON.stringify(exports.DeploymentStreamPrefixMessagesDeploymentsRequestRequestBody5Content$outboundSchema
        .parse(deploymentStreamPrefixMessagesDeploymentsRequestRequestBody5Content));
}
/** @internal */
exports.DeploymentStreamPrefixMessagesDeploymentsType$outboundSchema = z
    .nativeEnum(exports.DeploymentStreamPrefixMessagesDeploymentsType);
/** @internal */
exports.DeploymentStreamPrefixMessagesTtl$outboundSchema = z.nativeEnum(exports.DeploymentStreamPrefixMessagesTtl);
/** @internal */
exports.DeploymentStreamPrefixMessagesCacheControl$outboundSchema = z.object({
    type: exports.DeploymentStreamPrefixMessagesDeploymentsType$outboundSchema,
    ttl: exports.DeploymentStreamPrefixMessagesTtl$outboundSchema.default("5m"),
});
function deploymentStreamPrefixMessagesCacheControlToJSON(deploymentStreamPrefixMessagesCacheControl) {
    return JSON.stringify(exports.DeploymentStreamPrefixMessagesCacheControl$outboundSchema.parse(deploymentStreamPrefixMessagesCacheControl));
}
/** @internal */
exports.PrefixMessagesToolMessage$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.DeploymentStreamPrefixMessagesCacheControl$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        toolCallId: "tool_call_id",
        cacheControl: "cache_control",
    });
});
function prefixMessagesToolMessageToJSON(prefixMessagesToolMessage) {
    return JSON.stringify(exports.PrefixMessagesToolMessage$outboundSchema.parse(prefixMessagesToolMessage));
}
/** @internal */
exports.DeploymentStreamContentDeployments2$outboundSchema = z.union([
    components.TextContentPartSchema$outboundSchema.and(z.object({ type: z.literal("text") })),
    components.RefusalPartSchema$outboundSchema,
    components.ReasoningPartSchema$outboundSchema,
    components.RedactedReasoningPartSchema$outboundSchema,
]);
function deploymentStreamContentDeployments2ToJSON(deploymentStreamContentDeployments2) {
    return JSON.stringify(exports.DeploymentStreamContentDeployments2$outboundSchema.parse(deploymentStreamContentDeployments2));
}
/** @internal */
exports.DeploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContent$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 deploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContentToJSON(deploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContent) {
    return JSON.stringify(exports.DeploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContent$outboundSchema
        .parse(deploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContent));
}
/** @internal */
exports.PrefixMessagesAudio$outboundSchema = z.object({
    id: z.string(),
});
function prefixMessagesAudioToJSON(prefixMessagesAudio) {
    return JSON.stringify(exports.PrefixMessagesAudio$outboundSchema.parse(prefixMessagesAudio));
}
/** @internal */
exports.DeploymentStreamPrefixMessagesType$outboundSchema = z.nativeEnum(exports.DeploymentStreamPrefixMessagesType);
/** @internal */
exports.DeploymentStreamPrefixMessagesFunction$outboundSchema = z.object({
    name: z.string().optional(),
    arguments: z.string().optional(),
});
function deploymentStreamPrefixMessagesFunctionToJSON(deploymentStreamPrefixMessagesFunction) {
    return JSON.stringify(exports.DeploymentStreamPrefixMessagesFunction$outboundSchema.parse(deploymentStreamPrefixMessagesFunction));
}
/** @internal */
exports.DeploymentStreamPrefixMessagesToolCalls$outboundSchema = z.object({
    id: z.string(),
    type: exports.DeploymentStreamPrefixMessagesType$outboundSchema,
    function: z.lazy(() => exports.DeploymentStreamPrefixMessagesFunction$outboundSchema),
    thoughtSignature: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        thoughtSignature: "thought_signature",
    });
});
function deploymentStreamPrefixMessagesToolCallsToJSON(deploymentStreamPrefixMessagesToolCalls) {
    return JSON.stringify(exports.DeploymentStreamPrefixMessagesToolCalls$outboundSchema.parse(deploymentStreamPrefixMessagesToolCalls));
}
/** @internal */
exports.PrefixMessagesAssistantMessage$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.PrefixMessagesAudio$outboundSchema))
        .optional(),
    toolCalls: z.array(z.lazy(() => exports.DeploymentStreamPrefixMessagesToolCalls$outboundSchema)).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        toolCalls: "tool_calls",
    });
});
function prefixMessagesAssistantMessageToJSON(prefixMessagesAssistantMessage) {
    return JSON.stringify(exports.PrefixMessagesAssistantMessage$outboundSchema.parse(prefixMessagesAssistantMessage));
}
/** @internal */
exports.DeploymentStream2DeploymentsType$outboundSchema = z.nativeEnum(exports.DeploymentStream2DeploymentsType);
/** @internal */
exports.DeploymentStream2Ttl$outboundSchema = z.nativeEnum(exports.DeploymentStream2Ttl);
/** @internal */
exports.DeploymentStream2CacheControl$outboundSchema = z.object({
    type: exports.DeploymentStream2DeploymentsType$outboundSchema,
    ttl: exports.DeploymentStream2Ttl$outboundSchema.default("5m"),
});
function deploymentStream2CacheControlToJSON(deploymentStream2CacheControl) {
    return JSON.stringify(exports.DeploymentStream2CacheControl$outboundSchema.parse(deploymentStream2CacheControl));
}
/** @internal */
exports.DeploymentStream24$outboundSchema = z.object({
    type: z.literal("file"),
    cacheControl: z.lazy(() => exports.DeploymentStream2CacheControl$outboundSchema)
        .optional(),
    file: components.FileContentPartSchema$outboundSchema,
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        cacheControl: "cache_control",
    });
});
function deploymentStream24ToJSON(deploymentStream24) {
    return JSON.stringify(exports.DeploymentStream24$outboundSchema.parse(deploymentStream24));
}
/** @internal */
exports.DeploymentStreamContent2$outboundSchema = z.union([
    components.TextContentPartSchema$outboundSchema.and(z.object({ type: z.literal("text") })),
    components.ImageContentPartSchema$outboundSchema,
    components.AudioContentPartSchema$outboundSchema,
    z.lazy(() => exports.DeploymentStream24$outboundSchema),
]);
function deploymentStreamContent2ToJSON(deploymentStreamContent2) {
    return JSON.stringify(exports.DeploymentStreamContent2$outboundSchema.parse(deploymentStreamContent2));
}
/** @internal */
exports.DeploymentStreamPrefixMessagesDeploymentsRequestContent$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.DeploymentStream24$outboundSchema),
    ])),
]);
function deploymentStreamPrefixMessagesDeploymentsRequestContentToJSON(deploymentStreamPrefixMessagesDeploymentsRequestContent) {
    return JSON.stringify(exports.DeploymentStreamPrefixMessagesDeploymentsRequestContent$outboundSchema
        .parse(deploymentStreamPrefixMessagesDeploymentsRequestContent));
}
/** @internal */
exports.PrefixMessagesUserMessage$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.DeploymentStream24$outboundSchema),
        ])),
    ]),
});
function prefixMessagesUserMessageToJSON(prefixMessagesUserMessage) {
    return JSON.stringify(exports.PrefixMessagesUserMessage$outboundSchema.parse(prefixMessagesUserMessage));
}
/** @internal */
exports.DeploymentStreamPrefixMessagesDeploymentsContent$outboundSchema = z.union([
    z.string(),
    z.array(components.TextContentPartSchema$outboundSchema),
]);
function deploymentStreamPrefixMessagesDeploymentsContentToJSON(deploymentStreamPrefixMessagesDeploymentsContent) {
    return JSON.stringify(exports.DeploymentStreamPrefixMessagesDeploymentsContent$outboundSchema.parse(deploymentStreamPrefixMessagesDeploymentsContent));
}
/** @internal */
exports.PrefixMessagesDeveloperMessage$outboundSchema = z.object({
    role: z.literal("developer"),
    content: z.union([
        z.string(),
        z.array(components.TextContentPartSchema$outboundSchema),
    ]),
    name: z.string().optional(),
});
function prefixMessagesDeveloperMessageToJSON(prefixMessagesDeveloperMessage) {
    return JSON.stringify(exports.PrefixMessagesDeveloperMessage$outboundSchema.parse(prefixMessagesDeveloperMessage));
}
/** @internal */
exports.DeploymentStreamPrefixMessagesContent$outboundSchema = z.union([
    z.string(),
    z.array(components.TextContentPartSchema$outboundSchema),
]);
function deploymentStreamPrefixMessagesContentToJSON(deploymentStreamPrefixMessagesContent) {
    return JSON.stringify(exports.DeploymentStreamPrefixMessagesContent$outboundSchema.parse(deploymentStreamPrefixMessagesContent));
}
/** @internal */
exports.PrefixMessagesSystemMessage$outboundSchema = z.object({
    role: z.literal("system"),
    content: z.union([
        z.string(),
        z.array(components.TextContentPartSchema$outboundSchema),
    ]),
    name: z.string().optional(),
});
function prefixMessagesSystemMessageToJSON(prefixMessagesSystemMessage) {
    return JSON.stringify(exports.PrefixMessagesSystemMessage$outboundSchema.parse(prefixMessagesSystemMessage));
}
/** @internal */
exports.DeploymentStreamPrefixMessages$outboundSchema = z.union([
    z.lazy(() => exports.PrefixMessagesSystemMessage$outboundSchema),
    z.lazy(() => exports.PrefixMessagesDeveloperMessage$outboundSchema),
    z.lazy(() => exports.PrefixMessagesUserMessage$outboundSchema),
    z.lazy(() => exports.PrefixMessagesAssistantMessage$outboundSchema),
    z.lazy(() => exports.PrefixMessagesToolMessage$outboundSchema),
]);
function deploymentStreamPrefixMessagesToJSON(deploymentStreamPrefixMessages) {
    return JSON.stringify(exports.DeploymentStreamPrefixMessages$outboundSchema.parse(deploymentStreamPrefixMessages));
}
/** @internal */
exports.DeploymentStreamContentDeploymentsRequestRequestBodyMessages52$outboundSchema = components.TextContentPartSchema$outboundSchema;
function deploymentStreamContentDeploymentsRequestRequestBodyMessages52ToJSON(deploymentStreamContentDeploymentsRequestRequestBodyMessages52) {
    return JSON.stringify(exports.DeploymentStreamContentDeploymentsRequestRequestBodyMessages52$outboundSchema
        .parse(deploymentStreamContentDeploymentsRequestRequestBodyMessages52));
}
/** @internal */
exports.DeploymentStreamMessagesDeploymentsRequestRequestBody5Content$outboundSchema = z.union([
    z.string(),
    z.array(components.TextContentPartSchema$outboundSchema),
]);
function deploymentStreamMessagesDeploymentsRequestRequestBody5ContentToJSON(deploymentStreamMessagesDeploymentsRequestRequestBody5Content) {
    return JSON.stringify(exports.DeploymentStreamMessagesDeploymentsRequestRequestBody5Content$outboundSchema
        .parse(deploymentStreamMessagesDeploymentsRequestRequestBody5Content));
}
/** @internal */
exports.DeploymentStreamMessagesDeploymentsType$outboundSchema = z
    .nativeEnum(exports.DeploymentStreamMessagesDeploymentsType);
/** @internal */
exports.DeploymentStreamMessagesTtl$outboundSchema = z.nativeEnum(exports.DeploymentStreamMessagesTtl);
/** @internal */
exports.DeploymentStreamMessagesCacheControl$outboundSchema = z.object({
    type: exports.DeploymentStreamMessagesDeploymentsType$outboundSchema,
    ttl: exports.DeploymentStreamMessagesTtl$outboundSchema.default("5m"),
});
function deploymentStreamMessagesCacheControlToJSON(deploymentStreamMessagesCacheControl) {
    return JSON.stringify(exports.DeploymentStreamMessagesCacheControl$outboundSchema.parse(deploymentStreamMessagesCacheControl));
}
/** @internal */
exports.DeploymentStreamMessagesToolMessage$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.DeploymentStreamMessagesCacheControl$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        toolCallId: "tool_call_id",
        cacheControl: "cache_control",
    });
});
function deploymentStreamMessagesToolMessageToJSON(deploymentStreamMessagesToolMessage) {
    return JSON.stringify(exports.DeploymentStreamMessagesToolMessage$outboundSchema.parse(deploymentStreamMessagesToolMessage));
}
/** @internal */
exports.DeploymentStreamContentDeploymentsRequestRequestBodyMessages2$outboundSchema = z.union([
    components.TextContentPartSchema$outboundSchema.and(z.object({ type: z.literal("text") })),
    components.RefusalPartSchema$outboundSchema,
    components.ReasoningPartSchema$outboundSchema,
    components.RedactedReasoningPartSchema$outboundSchema,
]);
function deploymentStreamContentDeploymentsRequestRequestBodyMessages2ToJSON(deploymentStreamContentDeploymentsRequestRequestBodyMessages2) {
    return JSON.stringify(exports.DeploymentStreamContentDeploymentsRequestRequestBodyMessages2$outboundSchema
        .parse(deploymentStreamContentDeploymentsRequestRequestBodyMessages2));
}
/** @internal */
exports.DeploymentStreamMessagesDeploymentsRequestRequestBodyContent$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 deploymentStreamMessagesDeploymentsRequestRequestBodyContentToJSON(deploymentStreamMessagesDeploymentsRequestRequestBodyContent) {
    return JSON.stringify(exports.DeploymentStreamMessagesDeploymentsRequestRequestBodyContent$outboundSchema
        .parse(deploymentStreamMessagesDeploymentsRequestRequestBodyContent));
}
/** @internal */
exports.DeploymentStreamMessagesAudio$outboundSchema = z.object({
    id: z.string(),
});
function deploymentStreamMessagesAudioToJSON(deploymentStreamMessagesAudio) {
    return JSON.stringify(exports.DeploymentStreamMessagesAudio$outboundSchema.parse(deploymentStreamMessagesAudio));
}
/** @internal */
exports.DeploymentStreamMessagesType$outboundSchema = z.nativeEnum(exports.DeploymentStreamMessagesType);
/** @internal */
exports.DeploymentStreamMessagesFunction$outboundSchema = z.object({
    name: z.string().optional(),
    arguments: z.string().optional(),
});
function deploymentStreamMessagesFunctionToJSON(deploymentStreamMessagesFunction) {
    return JSON.stringify(exports.DeploymentStreamMessagesFunction$outboundSchema.parse(deploymentStreamMessagesFunction));
}
/** @internal */
exports.DeploymentStreamMessagesToolCalls$outboundSchema = z.object({
    id: z.string(),
    type: exports.DeploymentStreamMessagesType$outboundSchema,
    function: z.lazy(() => exports.DeploymentStreamMessagesFunction$outboundSchema),
    thoughtSignature: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        thoughtSignature: "thought_signature",
    });
});
function deploymentStreamMessagesToolCallsToJSON(deploymentStreamMessagesToolCalls) {
    return JSON.stringify(exports.DeploymentStreamMessagesToolCalls$outboundSchema.parse(deploymentStreamMessagesToolCalls));
}
/** @internal */
exports.DeploymentStreamMessagesAssistantMessage$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.DeploymentStreamMessagesAudio$outboundSchema))
        .optional(),
    toolCalls: z.array(z.lazy(() => exports.DeploymentStreamMessagesToolCalls$outboundSchema)).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        toolCalls: "tool_calls",
    });
});
function deploymentStreamMessagesAssistantMessageToJSON(deploymentStreamMessagesAssistantMessage) {
    return JSON.stringify(exports.DeploymentStreamMessagesAssistantMessage$outboundSchema.parse(deploymentStreamMessagesAssistantMessage));
}
/** @internal */
exports.DeploymentStream2DeploymentsRequestRequestBodyType$outboundSchema = z
    .nativeEnum(exports.DeploymentStream2DeploymentsRequestRequestBodyType);
/** @internal */
exports.DeploymentStream2DeploymentsTtl$outboundSchema = z.nativeEnum(exports.DeploymentStream2DeploymentsTtl);
/** @internal */
exports.DeploymentStream2DeploymentsCacheControl$outboundSchema = z.object({
    type: exports.DeploymentStream2DeploymentsRequestRequestBodyType$outboundSchema,
    ttl: exports.DeploymentStream2DeploymentsTtl$outboundSchema.default("5m"),
});
function deploymentStream2DeploymentsCacheControlToJSON(deploymentStream2DeploymentsCacheControl) {
    return JSON.stringify(exports.DeploymentStream2DeploymentsCacheControl$outboundSchema.parse(deploymentStream2DeploymentsCacheControl));
}
/** @internal */
exports.DeploymentStream2Deployments4$outboundSchema = z.object({
    type: z.literal("file"),
    cacheControl: z.lazy(() => exports.DeploymentStream2DeploymentsCacheControl$outboundSchema).optional(),
    file: components.FileContentPartSchema$outboundSchema,
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        cacheControl: "cache_control",
    });
});
function deploymentStream2Deployments4ToJSON(deploymentStream2Deployments4) {
    return JSON.stringify(exports.DeploymentStream2Deployments4$outboundSchema.parse(deploymentStream2Deployments4));
}
/** @internal */
exports.DeploymentStreamContentDeploymentsRequestRequestBody2$outboundSchema = z.union([
    components.TextContentPartSchema$outboundSchema.and(z.object({ type: z.literal("text") })),
    components.ImageContentPartSchema$outboundSchema,
    components.AudioContentPartSchema$outboundSchema,
    z.lazy(() => exports.DeploymentStream2Deployments4$outboundSchema),
]);
function deploymentStreamContentDeploymentsRequestRequestBody2ToJSON(deploymentStreamContentDeploymentsRequestRequestBody2) {
    return JSON.stringify(exports.DeploymentStreamContentDeploymentsRequestRequestBody2$outboundSchema.parse(deploymentStreamContentDeploymentsRequestRequestBody2));
}
/** @internal */
exports.DeploymentStreamMessagesDeploymentsRequestContent$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.DeploymentStream2Deployments4$outboundSchema),
    ])),
]);
function deploymentStreamMessagesDeploymentsRequestContentToJSON(deploymentStreamMessagesDeploymentsRequestContent) {
    return JSON.stringify(exports.DeploymentStreamMessagesDeploymentsRequestContent$outboundSchema.parse(deploymentStreamMessagesDeploymentsRequestContent));
}
/** @internal */
exports.DeploymentStreamMessagesUserMessage$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.DeploymentStream2Deployments4$outboundSchema),
        ])),
    ]),
});
function deploymentStreamMessagesUserMessageToJSON(deploymentStreamMessagesUserMessage) {
    return JSON.stringify(exports.DeploymentStreamMessagesUserMessage$outboundSchema.parse(deploymentStreamMessagesUserMessage));
}
/** @internal */
exports.DeploymentStreamMessagesDeploymentsContent$outboundSchema = z.union([
    z.string(),
    z.array(components.TextContentPartSchema$outboundSchema),
]);
function deploymentStreamMessagesDeploymentsContentToJSON(deploymentStreamMessagesDeploymentsContent) {
    return JSON.stringify(exports.DeploymentStreamMessagesDeploymentsContent$outboundSchema.parse(deploymentStreamMessagesDeploymentsContent));
}
/** @internal */
exports.DeploymentStreamMessagesDeveloperMessage$outboundSchema = z.object({
    role: z.literal("developer"),
    content: z.union([
        z.string(),
        z.array(components.TextContentPartSchema$outboundSchema),
    ]),
    name: z.string().optional(),
});
function deploymentStreamMessagesDeveloperMessageToJSON(deploymentStreamMessagesDeveloperMessage) {
    return JSON.stringify(exports.DeploymentStreamMessagesDeveloperMessage$outboundSchema.parse(deploymentStreamMessagesDeveloperMessage));
}
/** @internal */
exports.DeploymentStreamMessagesContent$outboundSchema = z.union([
    z.string(),
    z.array(components.TextContentPartSchema$outboundSchema),
]);
function deploymentStreamMessagesContentToJSON(deploymentStreamMessagesContent) {
    return JSON.stringify(exports.DeploymentStreamMessagesContent$outboundSchema.parse(deploymentStreamMessagesContent));
}
/** @internal */
exports.DeploymentStreamMessagesSystemMessage$outboundSchema = z.object({
    role: z.literal("system"),
    content: z.union([
        z.string(),
        z.array(components.TextContentPartSchema$outboundSchema),
    ]),
    name: z.string().optional(),
});
function deploymentStreamMessagesSystemMessageToJSON(deploymentStreamMessagesSystemMessage) {
    return JSON.stringify(exports.DeploymentStreamMessagesSystemMessage$outboundSchema.parse(deploymentStreamMessagesSystemMessage));
}
/** @internal */
exports.DeploymentStreamMessages$outboundSchema = z.union([
    z.lazy(() => exports.DeploymentStreamMessagesSystemMessage$outboundSchema),
    z.lazy(() => exports.DeploymentStreamMessagesDeveloperMessage$outboundSchema),
    z.lazy(() => exports.DeploymentStreamMessagesUserMessage$outboundSchema),
    z.lazy(() => exports.DeploymentStreamMessagesAssistantMessage$outboundSchema),
    z.lazy(() => exports.DeploymentStreamMessagesToolMessage$outboundSchema),
]);
function deploymentStreamMessagesToJSON(deploymentStreamMessages) {
    return JSON.stringify(exports.DeploymentStreamMessages$outboundSchema.parse(deploymentStreamMessages));
}
/** @internal */
exports.DeploymentStreamMetadata$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 deploymentStreamMetadataToJSON(deploymentStreamMetadata) {
    return JSON.stringify(exports.DeploymentStreamMetadata$outboundSchema.parse(deploymentStreamMetadata));
}
/** @internal */
exports.DeploymentStreamDocuments$outboundSchema = z.object({
    text: z.string(),
    metadata: z.lazy(() => exports.DeploymentStreamMetadata$outboundSchema).optional(),
});
function deploymentStreamDocumentsToJSON(deploymentStreamDocuments) {
    return JSON.stringify(exports.DeploymentStreamDocuments$outboundSchema.parse(deploymentStreamDocuments));
}
/** @internal */
exports.DeploymentStreamInvokeOptions$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 deploymentStreamInvokeOptionsToJSON(deploymentStreamInvokeOptions) {
    return JSON.stringify(exports.DeploymentStreamInvokeOptions$outboundSchema.parse(deploymentStreamInvokeOptions));
}
/** @internal */
exports.DeploymentStreamThread$outboundSchema = z.object({
    id: z.string(),
    tags: z.array(z.string()).optional(),
});
function deploymentStreamThreadToJSON(deploymentStreamThread) {
    return JSON.stringify(exports.DeploymentStreamThread$outboundSchema.parse(deploymentStreamThread));
}
/** @internal */
exports.DeploymentStreamOrExists$outboundSchema = z.object({
    exists: z.boolean(),
});
function deploymentStreamOrExistsToJSON(deploymentStreamOrExists) {
    return JSON.stringify(exports.DeploymentStreamOrExists$outboundSchema.parse(deploymentStreamOrExists));
}
/** @internal */
exports.DeploymentStreamOrDeploymentsNin$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function deploymentStreamOrDeploymentsNinToJSON(deploymentStreamOrDeploymentsNin) {
    return JSON.stringify(exports.DeploymentStreamOrDeploymentsNin$outboundSchema.parse(deploymentStreamOrDeploymentsNin));
}
/** @internal */
exports.DeploymentStreamOrNin$outboundSchema = z.object({
    nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
});
function deploymentStreamOrNinToJSON(deploymentStreamOrNin) {
    return JSON.stringify(exports.DeploymentStreamOrNin$outboundSchema.parse(deploymentStreamOrNin));
}
/** @internal */
exports.DeploymentStreamOrDeploymentsIn$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function deploymentStreamOrDeploymentsInToJSON(deploymentStreamOrDeploymentsIn) {
    return JSON.stringify(exports.DeploymentStreamOrDeploymentsIn$outboundSchema.parse(deploymentStreamOrDeploymentsIn));
}
/** @internal */
exports.DeploymentStreamOrIn$outboundSchema = z.object({
    in: z.array(z.union([z.string(), z.number(), z.boolean()])),
});
function deploymentStreamOrInToJSON(deploymentStreamOrIn) {
    return JSON.stringify(exports.DeploymentStreamOrIn$outboundSchema.parse(deploymentStreamOrIn));
}
/** @internal */
exports.DeploymentStreamOrLte$outboundSchema = z.object({
    lte: z.number(),
});
function deploymentStreamOrLteToJSON(deploymentStreamOrLte) {
    return JSON.stringify(exports.DeploymentStreamOrLte$outboundSchema.parse(deploymentStreamOrLte));
}
/** @internal */
exports.DeploymentStreamOrLt$outboundSchema = z.object({
    lt: z.number(),
});
function deploymentStreamOrLtToJSON(deploymentStreamOrLt) {
    return JSON.stringify(exports.DeploymentStreamOrLt$outboundSchema.parse(deploymentStreamOrLt));
}
/** @internal */
exports.DeploymentStreamOrGte$outboundSchema = z.object({
    gte: z.number(),
});
function deploymentStreamOrGteToJSON(deploymentStreamOrGte) {
    return JSON.stringify(exports.DeploymentStreamOrGte$outboundSchema.parse(deploymentStreamOrGte));
}
/** @internal */
exports.DeploymentStreamOrGt$outboundSchema = z.object({
    gt: z.number(),
});
function deploymentStreamOrGtToJSON(deploymentStreamOrGt) {
    return JSON.stringify(exports.DeploymentStreamOrGt$outboundSchema.parse(deploymentStreamOrGt));
}
/** @internal */
exports.DeploymentStreamOrDeploymentsNe$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function deploymentStreamOrDeploymentsNeToJSON(deploymentStreamOrDeploymentsNe) {
    return JSON.stringify(exports.DeploymentStreamOrDeploymentsNe$outboundSchema.parse(deploymentStreamOrDeploymentsNe));
}
/** @internal */
exports.DeploymentStreamOrNe$outboundSchema = z.object({
    ne: z.union([z.string(), z.number(), z.boolean()]),
});
function deploymentStreamOrNeToJSON(deploymentStreamOrNe) {
    return JSON.stringify(exports.DeploymentStreamOrNe$outboundSchema.parse(deploymentStreamOrNe));
}
/** @internal */
exports.DeploymentStreamOrDeploymentsEq$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function deploymentStreamOrDeploymentsEqToJSON(deploymentStreamOrDeploymentsEq) {
    return JSON.stringify(exports.DeploymentStreamOrDeploymentsEq$outboundSchema.parse(deploymentStreamOrDeploymentsEq));
}
/** @internal */
exports.DeploymentStreamOrEq$outboundSchema = z.object({
    eq: z.union([z.string(), z.number(), z.boolean()]),
});
function deploymentStreamOrEqToJSON(deploymentStreamOrEq) {
    return JSON.stringify(exports.DeploymentStreamOrEq$outboundSchema.parse(deploymentStreamOrEq));
}
/** @internal */
exports.DeploymentStreamKnowledgeFilterDeploymentsOr$outboundSchema = z.union([
    z.lazy(() => exports.DeploymentStreamOrEq$outboundSchema),
    z.lazy(() => exports.DeploymentStreamOrNe$outboundSchema),
    z.lazy(() => exports.DeploymentStreamOrGt$outboundSchema),
    z.lazy(() => exports.DeploymentStreamOrGte$outboundSchema),
    z.lazy(() => exports.DeploymentStreamOrLt$outboundSchema),
    z.lazy(() => exports.DeploymentStreamOrLte$outboundSchema),
    z.lazy(() => exports.DeploymentStreamOrIn$outboundSchema),
    z.lazy(() => exports.DeploymentStreamOrNin$outboundSchema),
    z.lazy(() => exports.DeploymentStreamOrExists$outboundSchema),
]);
function deploymentStreamKnowledgeFilterDeploymentsOrToJSON(deploymentStreamKnowledgeFilterDeploymentsOr) {
    return JSON.stringify(exports.DeploymentStreamKnowledgeFilterDeploymentsOr$outboundSchema.parse(deploymentStreamKnowledgeFilterDeploymentsOr));
}
/** @internal */
exports.DeploymentStreamKnowledgeFilterOr$outboundSchema = z.object({
    or: z.array(z.record(z.union([
        z.lazy(() => exports.DeploymentStreamOrEq$outboundSchema),
        z.lazy(() => exports.DeploymentStreamOrNe$outboundSchema),
        z.lazy(() => exports.DeploymentStreamOrGt$outboundSchema),
        z.lazy(() => exports.DeploymentStreamOrGte$outboundSchema),
        z.lazy(() => exports.DeploymentStreamOrLt$outboundSchema),
        z.lazy(() => exports.DeploymentStreamOrLte$outboundSchema),
        z.lazy(() => exports.DeploymentStreamOrIn$outboundSchema),
        z.lazy(() => exports.DeploymentStreamOrNin$outboundSchema),
        z.lazy(() => exports.DeploymentStreamOrExists$outboundSchema),
    ]))),
});
function deploymentStreamKnowledgeFilterOrToJSON(deploymentStreamKnowledgeFilterOr) {
    return JSON.stringify(exports.DeploymentStreamKnowledgeFilterOr$outboundSchema.parse(deploymentStreamKnowledgeFilterOr));
}
/** @internal */
exports.DeploymentStreamAndExists$outboundSchema = z.object({
    exists: z.boolean(),
});
function deploymentStreamAndExistsToJSON(deploymentStreamAndExists) {
    return JSON.stringify(exports.DeploymentStreamAndExists$outboundSchema.parse(deploymentStreamAndExists));
}
/** @internal */
exports.DeploymentStreamAndDeploymentsNin$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function deploymentStreamAndDeploymentsNinToJSON(deploymentStreamAndDeploymentsNin) {
    return JSON.stringify(exports.DeploymentStreamAndDeploymentsNin$outboundSchema.parse(deploymentStreamAndDeploymentsNin));
}
/** @internal */
exports.DeploymentStreamAndNin$outboundSchema = z.object({
    nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
});
function deploymentStreamAndNinToJSON(deploymentStreamAndNin) {
    return JSON.stringify(exports.DeploymentStreamAndNin$outboundSchema.parse(deploymentStreamAndNin));
}
/** @internal */
exports.DeploymentStreamAndDeploymentsIn$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function deploymentStreamAndDeploymentsInToJSON(deploymentStreamAndDeploymentsIn) {
    return JSON.stringify(exports.DeploymentStreamAndDeploymentsIn$outboundSchema.parse(deploymentStreamAndDeploymentsIn));
}
/** @internal */
exports.DeploymentStreamAndIn$outboundSchema = z.object({
    in: z.array(z.union([z.string(), z.number(), z.boolean()])),
});
function deploymentStreamAndInToJSON(deploymentStreamAndIn) {
    return JSON.stringify(exports.DeploymentStreamAndIn$outboundSchema.parse(deploymentStreamAndIn));
}
/** @internal */
exports.DeploymentStreamAndLte$outboundSchema = z.object({
    lte: z.number(),
});
function deploymentStreamAndLteToJSON(deploymentStreamAndLte) {
    return JSON.stringify(exports.DeploymentStreamAndLte$outboundSchema.parse(deploymentStreamAndLte));
}
/** @internal */
exports.DeploymentStreamAndLt$outboundSchema = z.object({
    lt: z.number(),
});
function deploymentStreamAndLtToJSON(deploymentStreamAndLt) {
    return JSON.stringify(exports.DeploymentStreamAndLt$outboundSchema.parse(deploymentStreamAndLt));
}
/** @internal */
exports.DeploymentStreamAndGte$outboundSchema = z.object({
    gte: z.number(),
});
function deploymentStreamAndGteToJSON(deploymentStreamAndGte) {
    return JSON.stringify(exports.DeploymentStreamAndGte$outboundSchema.parse(deploymentStreamAndGte));
}
/** @internal */
exports.DeploymentStreamAndGt$outboundSchema = z.object({
    gt: z.number(),
});
function deploymentStreamAndGtToJSON(deploymentStreamAndGt) {
    return JSON.stringify(exports.DeploymentStreamAndGt$outboundSchema.parse(deploymentStreamAndGt));
}
/** @internal */
exports.DeploymentStreamAndDeploymentsNe$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function deploymentStreamAndDeploymentsNeToJSON(deploymentStreamAndDeploymentsNe) {
    return JSON.stringify(exports.DeploymentStreamAndDeploymentsNe$outboundSchema.parse(deploymentStreamAndDeploymentsNe));
}
/** @internal */
exports.DeploymentStreamAndNe$outboundSchema = z.object({
    ne: z.union([z.string(), z.number(), z.boolean()]),
});
function deploymentStreamAndNeToJSON(deploymentStreamAndNe) {
    return JSON.stringify(exports.DeploymentStreamAndNe$outboundSchema.parse(deploymentStreamAndNe));
}
/** @internal */
exports.DeploymentStreamAndDeploymentsEq$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function deploymentStreamAndDeploymentsEqToJSON(deploymentStreamAndDeploymentsEq) {
    return JSON.stringify(exports.DeploymentStreamAndDeploymentsEq$outboundSchema.parse(deploymentStreamAndDeploymentsEq));
}
/** @internal */
exports.DeploymentStreamAndEq$outboundSchema = z.object({
    eq: z.union([z.string(), z.number(), z.boolean()]),
});
function deploymentStreamAndEqToJSON(deploymentStreamAndEq) {
    return JSON.stringify(exports.DeploymentStreamAndEq$outboundSchema.parse(deploymentStreamAndEq));
}
/** @internal */
exports.DeploymentStreamKnowledgeFilterDeploymentsAnd$outboundSchema = z.union([
    z.lazy(() => exports.DeploymentStreamAndEq$outboundSchema),
    z.lazy(() => exports.DeploymentStreamAndNe$outboundSchema),
    z.lazy(() => exports.DeploymentStreamAndGt$outboundSchema),
    z.lazy(() => exports.DeploymentStreamAndGte$outboundSchema),
    z.lazy(() => exports.DeploymentStreamAndLt$outboundSchema),
    z.lazy(() => exports.DeploymentStreamAndLte$outboundSchema),
    z.lazy(() => exports.DeploymentStreamAndIn$outboundSchema),
    z.lazy(() => exports.DeploymentStreamAndNin$outboundSchema),
    z.lazy(() => exports.DeploymentStreamAndExists$outboundSchema),
]);
function deploymentStreamKnowledgeFilterDeploymentsAndToJSON(deploymentStreamKnowledgeFilterDeploymentsAnd) {
    return JSON.stringify(exports.DeploymentStreamKnowledgeFilterDeploymentsAnd$outboundSchema.parse(deploymentStreamKnowledgeFilterDeploymentsAnd));
}
/** @internal */
exports.DeploymentStreamKnowledgeFilterAnd$outboundSchema = z.object({
    and: z.array(z.record(z.union([
        z.lazy(() => exports.DeploymentStreamAndEq$outboundSchema),
        z.lazy(() => exports.DeploymentStreamAndNe$outboundSchema),
        z.lazy(() => exports.DeploymentStreamAndGt$outboundSchema),
        z.lazy(() => exports.DeploymentStreamAndGte$outboundSchema),
        z.lazy(() => exports.DeploymentStreamAndLt$outboundSchema),
        z.lazy(() => exports.DeploymentStreamAndLte$outboundSchema),
        z.lazy(() => exports.DeploymentStreamAndIn$outboundSchema),
        z.lazy(() => exports.DeploymentStreamAndNin$outboundSchema),
        z.lazy(() => exports.DeploymentStreamAndExists$outboundSchema),
    ]))),
});
function deploymentStreamKnowledgeFilterAndToJSON(deploymentStreamKnowledgeFilterAnd) {
    return JSON.stringify(exports.DeploymentStreamKnowledgeFilterAnd$outboundSchema.parse(deploymentStreamKnowledgeFilterAnd));
}
/** @internal */
exports.OneExists$outboundSchema = z.object({
    exists: z.boolean(),
});
function oneExistsToJSON(oneExists) {
    return JSON.stringify(exports.OneExists$outboundSchema.parse(oneExists));
}
/** @internal */
exports.DeploymentStream1DeploymentsNin$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function deploymentStream1DeploymentsNinToJSON(deploymentStream1DeploymentsNin) {
    return JSON.stringify(exports.DeploymentStream1DeploymentsNin$outboundSchema.parse(deploymentStream1DeploymentsNin));
}
/** @internal */
exports.DeploymentStream1Nin$outboundSchema = z.object({
    nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
});
function deploymentStream1NinToJSON(deploymentStream1Nin) {
    return JSON.stringify(exports.DeploymentStream1Nin$outboundSchema.parse(deploymentStream1Nin));
}
/** @internal */
exports.DeploymentStream1DeploymentsIn$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function deploymentStream1DeploymentsInToJSON(deploymentStream1DeploymentsIn) {
    return JSON.stringify(exports.DeploymentStream1DeploymentsIn$outboundSchema.parse(deploymentStream1DeploymentsIn));
}
/** @internal */
exports.DeploymentStream1In$outboundSchema = z.object({
    in: z.array(z.union([z.string(), z.number(), z.boolean()])),
});
function deploymentStream1InToJSON(deploymentStream1In) {
    return JSON.stringify(exports.DeploymentStream1In$outboundSchema.parse(deploymentStream1In));
}
/** @internal */
exports.OneLte$outboundSchema = z.object({
    lte: z.number(),
});
function oneLteToJSON(oneLte) {
    return JSON.stringify(exports.OneLte$outboundSchema.parse(oneLte));
}
/** @internal */
exports.OneLt$outboundSchema = z.object({
    lt: z.number(),
});
function oneLtToJSON(oneLt) {
    return JSON.stringify(exports.OneLt$outboundSchema.parse(oneLt));
}
/** @internal */
exports.OneGte$outboundSchema = z.object({
    gte: z.number(),
});
function oneGteToJSON(oneGte) {
    return JSON.stringify(exports.OneGte$outboundSchema.parse(oneGte));
}
/** @internal */
exports.OneGt$outboundSchema = z.object({
    gt: z.number(),
});
function oneGtToJSON(oneGt) {
    return JSON.stringify(exports.OneGt$outboundSchema.parse(oneGt));
}
/** @internal */
exports.DeploymentStream1DeploymentsNe$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function deploymentStream1DeploymentsNeToJSON(deploymentStream1DeploymentsNe) {
    return JSON.stringify(exports.DeploymentStream1DeploymentsNe$outboundSchema.parse(deploymentStream1DeploymentsNe));
}
/** @internal */
exports.DeploymentStream1Ne$outboundSchema = z.object({
    ne: z.union([z.string(), z.number(), z.boolean()]),
});
function deploymentStream1NeToJSON(deploymentStream1Ne) {
    return JSON.stringify(exports.DeploymentStream1Ne$outboundSchema.parse(deploymentStream1Ne));
}
/** @internal */
exports.DeploymentStream1DeploymentsEq$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function deploymentStream1DeploymentsEqToJSON(deploymentStream1DeploymentsEq) {
    return JSON.stringify(exports.DeploymentStream1DeploymentsEq$outboundSchema.parse(deploymentStream1DeploymentsEq));
}
/** @internal */
exports.DeploymentStream1Eq$outboundSchema = z.object({
    eq: z.union([z.string(), z.number(), z.boolean()]),
});
function deploymentStream1EqToJSON(deploymentStream1Eq) {
    return JSON.stringify(exports.DeploymentStream1Eq$outboundSchema.parse(deploymentStream1Eq));
}
/** @internal */
exports.DeploymentStreamKnowledgeFilter1$outboundSchema = z.union([
    z.lazy(() => exports.DeploymentStream1Eq$outboundSchema),
    z.lazy(() => exports.DeploymentStream1Ne$outboundSchema),
    z.lazy(() => exports.OneGt$outboundSchema),
    z.lazy(() => exports.OneGte$outboundSchema),
    z.lazy(() => exports.OneLt$outboundSchema),
    z.lazy(() => exports.OneLte$outboundSchema),
    z.lazy(() => exports.DeploymentStream1In$outboundSchema),
    z.lazy(() => exports.DeploymentStream1Nin$outboundSchema),
    z.lazy(() => exports.OneExists$outboundSchema),
]);
function deploymentStreamKnowledgeFilter1ToJSON(deploymentStreamKnowledgeFilter1) {
    return JSON.stringify(exports.DeploymentStreamKnowledgeFilter1$outboundSchema.parse(deploymentStreamKnowledgeFilter1));
}
/** @internal */
exports.DeploymentStreamKnowledgeFilter$outboundSchema = z.union([
    z.lazy(() => exports.DeploymentStreamKnowledgeFilterAnd$outboundSchema),
    z.lazy(() => exports.DeploymentStreamKnowledgeFilterOr$outboundSchema),
    z.record(z.union([
        z.lazy(() => exports.DeploymentStream1Eq$outboundSchema),
        z.lazy(() => exports.DeploymentStream1Ne$outboundSchema),
        z.lazy(() => exports.OneGt$outboundSchema),
        z.lazy(() => exports.OneGte$outboundSchema),
        z.lazy(() => exports.OneLt$outboundSchema),
        z.lazy(() => exports.OneLte$outboundSchema),
        z.lazy(() => exports.DeploymentStream1In$outboundSchema),
        z.lazy(() => exports.DeploymentStream1Nin$outboundSchema),
        z.lazy(() => exports.OneExists$outboundSchema),
    ])),
]);
function deploymentStreamKnowledgeFilterToJSON(deploymentStreamKnowledgeFilter) {
    return JSON.stringify(exports.DeploymentStreamKnowledgeFilter$outboundSchema.parse(deploymentStreamKnowledgeFilter));
}
/** @internal */
exports.DeploymentStreamRequestBody$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.PrefixMessagesSystemMessage$outboundSchema),
        z.lazy(() => exports.PrefixMessagesDeveloperMessage$outboundSchema),
        z.lazy(() => exports.PrefixMessagesUserMessage$outboundSchema),
        z.lazy(() => exports.PrefixMessagesAssistantMessage$outboundSchema),
        z.lazy(() => exports.PrefixMessagesToolMessage$outboundSchema),
    ])).optional(),
    messages: z.array(z.union([
        z.lazy(() => exports.DeploymentStreamMessagesSystemMessage$outboundSchema),
        z.lazy(() => exports.DeploymentStreamMessagesDeveloperMessage$outboundSchema),
        z.lazy(() => exports.DeploymentStreamMessagesUserMessage$outboundSchema),
        z.lazy(() => exports.DeploymentStreamMessagesAssistantMessage$outboundSchema),
        z.lazy(() => exports.DeploymentStreamMessagesToolMessage$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.DeploymentStreamDocuments$outboundSchema))
        .optional(),
    invokeOptions: z.lazy(() => exports.DeploymentStreamInvokeOptions$outboundSchema)
        .optional(),
    thread: z.lazy(() => exports.DeploymentStreamThread$outboundSchema).optional(),
    knowledgeFilter: z.union([
        z.lazy(() => exports.DeploymentStreamKnowledgeFilterAnd$outboundSchema),
        z.lazy(() => exports.DeploymentStreamKnowledgeFilterOr$outboundSchema),
        z.record(z.union([
            z.lazy(() => exports.DeploymentStream1Eq$outboundSchema),
            z.lazy(() => exports.DeploymentStream1Ne$outboundSchema),
            z.lazy(() => exports.OneGt$outboundSchema),
            z.lazy(() => exports.OneGte$outboundSchema),
            z.lazy(() => exports.OneLt$outboundSchema),
            z.lazy(() => exports.OneLte$outboundSchema),
            z.lazy(() => exports.DeploymentStream1In$outboundSchema),
            z.lazy(() => exports.DeploymentStream1Nin$outboundSchema),
            z.lazy(() => exports.OneExists$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 deploymentStreamRequestBodyToJSON(deploymentStreamRequestBody) {
    return JSON.stringify(exports.DeploymentStreamRequestBody$outboundSchema.parse(deploymentStreamRequestBody));
}
/** @internal */
exports.DeploymentStreamObject$inboundSchema = z.nativeEnum(exports.DeploymentStreamObject);
/** @internal */
exports.DeploymentStreamProvider$inboundSchema = z.nativeEnum(exports.DeploymentStreamProvider);
/** @internal */
exports.DeploymentStreamTelemetry$inboundSchema = z.object({
    trace_id: z.string(),
    span_id: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "trace_id": "traceId",
        "span_id": "spanId",
    });
});
function deploymentStreamTelemetryFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeploymentStreamTelemetry$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStreamTelemetry' from JSON`);
}
/** @internal */
exports.DeploymentStreamDeploymentsMetadata$inboundSchema = z.object({
    file_name: z.string(),
    page_number: z.nullable(z.number()),
    file_type: z.string(),
    rerank_score: z.number().optional(),
    search_score: z.number(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "file_name": "fileName",
        "page_number": "pageNumber",
        "file_type": "fileType",
        "rerank_score": "rerankScore",
        "search_score": "searchScore",
    });
});
function deploymentStreamDeploymentsMetadataFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeploymentStreamDeploymentsMetadata$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStreamDeploymentsMetadata' from JSON`);
}
/** @internal */
exports.DeploymentStreamRetrievals$inboundSchema = z.object({
    document: z.string(),
    metadata: z.lazy(() => exports.DeploymentStreamDeploymentsMetadata$inboundSchema),
});
function deploymentStreamRetrievalsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeploymentStreamRetrievals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStreamRetrievals' from JSON`);
}
/** @internal */
exports.DeploymentStreamPromptTokensDetails$inboundSchema = z.object({
    cached_tokens: z.nullable(z.number()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "cached_tokens": "cachedTokens",
    });
});
function deploymentStreamPromptTokensDetailsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeploymentStreamPromptTokensDetails$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStreamPromptTokensDetails' from JSON`);
}
/** @internal */
exports.DeploymentStreamCompletionTokensDetails$inboundSchema = z.object({
    reasoning_tokens: z.nullable(z.number()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "reasoning_tokens": "reasoningTokens",
    });
});
function deploymentStreamCompletionTokensDetailsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeploymentStreamCompletionTokensDetails$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStreamCompletionTokensDetails' from JSON`);
}
/** @internal */
exports.DeploymentStreamUsage$inboundSchema = z.object({
    total_tokens: z.number().optional(),
    prompt_tokens: z.number().optional(),
    completion_tokens: z.number().optional(),
    prompt_tokens_details: z.lazy(() => exports.DeploymentStreamPromptTokensDetails$inboundSchema).optional(),
    completion_tokens_details: z.nullable(z.lazy(() => exports.DeploymentStreamCompletionTokensDetails$inboundSchema)).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "total_tokens": "totalTokens",
        "prompt_tokens": "promptTokens",
        "completion_tokens": "completionTokens",
        "prompt_tokens_details": "promptTokensDetails",
        "completion_tokens_details": "completionTokensDetails",
    });
});
function deploymentStreamUsageFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeploymentStreamUsage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStreamUsage' from JSON`);
}
/** @internal */
exports.DeploymentStreamMessageDeploymentsResponseRole$inboundSchema = z
    .nativeEnum(exports.DeploymentStreamMessageDeploymentsResponseRole);
/** @internal */
exports.DeploymentStreamMessage3$inboundSchema = z.object({
    type: z.literal("image"),
    role: exports.DeploymentStreamMessageDeploymentsResponseRole$inboundSchema,
    url: z.string(),
});
function deploymentStreamMessage3FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeploymentStreamMessage3$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStreamMessage3' from JSON`);
}
/** @internal */
exports.DeploymentStreamMessageDeploymentsRole$inboundSchema = z.nativeEnum(exports.DeploymentStreamMessageDeploymentsRole);
/** @internal */
exports.DeploymentStreamMessage2$inboundSchema = z.object({
    type: z.literal("content"),
    role: exports.DeploymentStreamMessageDeploymentsRole$inboundSchema,
    content: z.nullable(z.string()),
    reasoning: z.string().optional(),
    reasoning_signature: z.string().optional(),
    redacted_reasoning: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "reasoning_signature": "reasoningSignature",
        "redacted_reasoning": "redactedReasoning",
    });
});
function deploymentStreamMessage2FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeploymentStreamMessage2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStreamMessage2' from JSON`);
}
/** @internal */
exports.DeploymentStreamMessageRole$inboundSchema = z.nativeEnum(exports.DeploymentStreamMessageRole);
/** @internal */
exports.DeploymentStreamMessageDeploymentsResponse200Type$inboundSchema = z
    .nativeEnum(exports.DeploymentStreamMessageDeploymentsResponse200Type);
/** @internal */
exports.DeploymentStreamMessageFunction$inboundSchema = z.object({
    name: z.string(),
    arguments: z.string(),
});
function deploymentStreamMessageFunctionFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeploymentStreamMessageFunction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStreamMessageFunction' from JSON`);
}
/** @internal */
exports.DeploymentStreamMessageToolCalls$inboundSchema = z.object({
    id: z.string().optional(),
    index: z.number().optional(),
    type: exports.DeploymentStreamMessageDeploymentsResponse200Type$inboundSchema,
    function: z.lazy(() => exports.DeploymentStreamMessageFunction$inboundSchema),
});
function deploymentStreamMessageToolCallsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeploymentStreamMessageToolCalls$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStreamMessageToolCalls' from JSON`);
}
/** @internal */
exports.DeploymentStreamMessage1$inboundSchema = z.object({
    type: z.literal("tool_calls"),
    role: exports.DeploymentStreamMessageRole$inboundSchema,
    content: z.nullable(z.string()).optional(),
    tool_calls: z.array(z.lazy(() => exports.DeploymentStreamMessageToolCalls$inboundSchema)),
    reasoning: z.string().optional(),
    reasoning_signature: z.string().optional(),
    redacted_reasoning: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "tool_calls": "toolCalls",
        "reasoning_signature": "reasoningSignature",
        "redacted_reasoning": "redactedReasoning",
    });
});
function deploymentStreamMessage1FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeploymentStreamMessage1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStreamMessage1' from JSON`);
}
/** @internal */
exports.DeploymentStreamMessage$inboundSchema = z.union([
    z.lazy(() => exports.DeploymentStreamMessage1$inboundSchema),
    z.lazy(() => exports.DeploymentStreamMessage2$inboundSchema),
    z.lazy(() => exports.DeploymentStreamMessage3$inboundSchema),
]);
function deploymentStreamMessageFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeploymentStreamMessage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStreamMessage' from JSON`);
}
/** @internal */
exports.DeploymentStreamChoices$inboundSchema = z.object({
    index: z.number(),
    message: z.union([
        z.lazy(() => exports.DeploymentStreamMessage1$inboundSchema),
        z.lazy(() => exports.DeploymentStreamMessage2$inboundSchema),
        z.lazy(() => exports.DeploymentStreamMessage3$inboundSchema),
    ]),
    finish_reason: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "finish_reason": "finishReason",
    });
});
function deploymentStreamChoicesFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeploymentStreamChoices$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStreamChoices' from JSON`);
}
/** @internal */
exports.DeploymentStreamData$inboundSchema = z.object({
    id: z.string(),
    created: z.string().datetime({ offset: true }).transform(v => new Date(v)),
    object: exports.DeploymentStreamObject$inboundSchema,
    model: z.string(),
    provider: exports.DeploymentStreamProvider$inboundSchema,
    is_final: z.boolean(),
    integration_id: z.string().optional(),
    telemetry: z.lazy(() => exports.DeploymentStreamTelemetry$inboundSchema),
    finalized: z.string().datetime({ offset: true }).transform(v => new Date(v))
        .optional(),
    system_fingerprint: z.nullable(z.string()).optional(),
    retrievals: z.array(z.lazy(() => exports.DeploymentStreamRetrievals$inboundSchema))
        .optional(),
    provider_response: z.any().optional(),
    usage: z.nullable(z.lazy(() => exports.DeploymentStreamUsage$inboundSchema))
        .optional(),
    choices: z.array(z.lazy(() => exports.DeploymentStreamChoices$inboundSchema)),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "is_final": "isFinal",
        "integration_id": "integrationId",
        "system_fingerprint": "systemFingerprint",
        "provider_response": "providerResponse",
    });
});
function deploymentStreamDataFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeploymentStreamData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStreamData' from JSON`);
}
/** @internal */
exports.DeploymentStreamResponseBody$inboundSchema = z.object({
    data: z.unknown().optional().transform((v, ctx) => {
        if (v === undefined)
            return undefined;
        if (typeof v !== "string")
            return v;
        try {
            return JSON.parse(v);
        }
        catch (err) {
            ctx.addIssue({ code: "custom", message: `malformed json: ${err}` });
            return z.NEVER;
        }
    }).pipe(z.lazy(() => exports.DeploymentStreamData$inboundSchema).optional()),
});
function deploymentStreamResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeploymentStreamResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStreamResponseBody' from JSON`);
}
//# sourceMappingURL=deploymentstream.js.map