"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.ChoicesAssistantMessage$outboundSchema = exports.ChoicesToolCalls$outboundSchema = exports.ChoicesFunction$outboundSchema = exports.ChoicesType$outboundSchema = exports.ChoicesAudio$outboundSchema = exports.DeploymentCreateMetricChoicesDeploymentsMetricsRequestContent$outboundSchema = exports.DeploymentCreateMetricContentDeploymentsMetricsRequestRequestBodyChoices2$outboundSchema = exports.ChoicesToolMessage$outboundSchema = exports.ChoicesCacheControl$outboundSchema = exports.ChoicesTtl$outboundSchema = exports.DeploymentCreateMetricChoicesType$outboundSchema = exports.DeploymentCreateMetricChoicesDeploymentsMetricsRequestRequestBodyContent$outboundSchema = exports.DeploymentCreateMetricContentDeploymentsMetricsRequestRequestBodyChoices52$outboundSchema = exports.DeploymentCreateMetricMessages$outboundSchema = exports.DeploymentCreateMetricMessagesSystemMessage$outboundSchema = exports.DeploymentCreateMetricMessagesContent$outboundSchema = exports.DeploymentCreateMetricMessagesDeveloperMessage$outboundSchema = exports.DeploymentCreateMetricMessagesDeploymentsMetricsContent$outboundSchema = exports.DeploymentCreateMetricMessagesUserMessage$outboundSchema = exports.DeploymentCreateMetricMessagesDeploymentsMetricsRequestContent$outboundSchema = exports.DeploymentCreateMetricContent2$outboundSchema = exports.DeploymentCreateMetric24$outboundSchema = exports.DeploymentCreateMetric2CacheControl$outboundSchema = exports.DeploymentCreateMetric2Ttl$outboundSchema = exports.DeploymentCreateMetric2DeploymentsMetricsType$outboundSchema = exports.DeploymentCreateMetricMessagesAssistantMessage$outboundSchema = exports.DeploymentCreateMetricMessagesToolCalls$outboundSchema = exports.DeploymentCreateMetricMessagesFunction$outboundSchema = exports.DeploymentCreateMetricMessagesType$outboundSchema = exports.DeploymentCreateMetricMessagesAudio$outboundSchema = exports.DeploymentCreateMetricMessagesDeploymentsMetricsRequestRequestBodyContent$outboundSchema = exports.DeploymentCreateMetricContentDeploymentsMetrics2$outboundSchema = exports.DeploymentCreateMetricMessagesToolMessage$outboundSchema = exports.DeploymentCreateMetricMessagesCacheControl$outboundSchema = exports.DeploymentCreateMetricMessagesTtl$outboundSchema = exports.DeploymentCreateMetricMessagesDeploymentsMetricsType$outboundSchema = exports.DeploymentCreateMetricMessagesDeploymentsMetricsRequestRequestBody5Content$outboundSchema = exports.DeploymentCreateMetricContentDeploymentsMetricsRequest2$outboundSchema = exports.Performance$outboundSchema = exports.Usage$outboundSchema = exports.DeploymentCreateMetric2DeploymentsMetricsTtl = exports.DeploymentCreateMetric2DeploymentsMetricsRequestRequestBodyType = exports.ChoicesType = exports.ChoicesTtl = exports.DeploymentCreateMetricChoicesType = exports.DeploymentCreateMetric2Ttl = exports.DeploymentCreateMetric2DeploymentsMetricsType = exports.DeploymentCreateMetricMessagesType = exports.DeploymentCreateMetricMessagesTtl = exports.DeploymentCreateMetricMessagesDeploymentsMetricsType = void 0;
exports.DeploymentCreateMetricResponseBody$inboundSchema = exports.DeploymentCreateMetricRequest$outboundSchema = exports.DeploymentCreateMetricRequestBody$outboundSchema = exports.Feedback$outboundSchema = exports.Choices$outboundSchema = exports.ChoicesSystemMessage$outboundSchema = exports.ChoicesContent$outboundSchema = exports.ChoicesDeveloperMessage$outboundSchema = exports.DeploymentCreateMetricChoicesContent$outboundSchema = exports.ChoicesUserMessage$outboundSchema = exports.DeploymentCreateMetricChoicesDeploymentsMetricsContent$outboundSchema = exports.DeploymentCreateMetricContentDeploymentsMetricsRequestRequestBody2$outboundSchema = exports.DeploymentCreateMetric2DeploymentsMetrics4$outboundSchema = exports.DeploymentCreateMetric2DeploymentsMetricsCacheControl$outboundSchema = exports.DeploymentCreateMetric2DeploymentsMetricsTtl$outboundSchema = exports.DeploymentCreateMetric2DeploymentsMetricsRequestRequestBodyType$outboundSchema = void 0;
exports.usageToJSON = usageToJSON;
exports.performanceToJSON = performanceToJSON;
exports.deploymentCreateMetricContentDeploymentsMetricsRequest2ToJSON = deploymentCreateMetricContentDeploymentsMetricsRequest2ToJSON;
exports.deploymentCreateMetricMessagesDeploymentsMetricsRequestRequestBody5ContentToJSON = deploymentCreateMetricMessagesDeploymentsMetricsRequestRequestBody5ContentToJSON;
exports.deploymentCreateMetricMessagesCacheControlToJSON = deploymentCreateMetricMessagesCacheControlToJSON;
exports.deploymentCreateMetricMessagesToolMessageToJSON = deploymentCreateMetricMessagesToolMessageToJSON;
exports.deploymentCreateMetricContentDeploymentsMetrics2ToJSON = deploymentCreateMetricContentDeploymentsMetrics2ToJSON;
exports.deploymentCreateMetricMessagesDeploymentsMetricsRequestRequestBodyContentToJSON = deploymentCreateMetricMessagesDeploymentsMetricsRequestRequestBodyContentToJSON;
exports.deploymentCreateMetricMessagesAudioToJSON = deploymentCreateMetricMessagesAudioToJSON;
exports.deploymentCreateMetricMessagesFunctionToJSON = deploymentCreateMetricMessagesFunctionToJSON;
exports.deploymentCreateMetricMessagesToolCallsToJSON = deploymentCreateMetricMessagesToolCallsToJSON;
exports.deploymentCreateMetricMessagesAssistantMessageToJSON = deploymentCreateMetricMessagesAssistantMessageToJSON;
exports.deploymentCreateMetric2CacheControlToJSON = deploymentCreateMetric2CacheControlToJSON;
exports.deploymentCreateMetric24ToJSON = deploymentCreateMetric24ToJSON;
exports.deploymentCreateMetricContent2ToJSON = deploymentCreateMetricContent2ToJSON;
exports.deploymentCreateMetricMessagesDeploymentsMetricsRequestContentToJSON = deploymentCreateMetricMessagesDeploymentsMetricsRequestContentToJSON;
exports.deploymentCreateMetricMessagesUserMessageToJSON = deploymentCreateMetricMessagesUserMessageToJSON;
exports.deploymentCreateMetricMessagesDeploymentsMetricsContentToJSON = deploymentCreateMetricMessagesDeploymentsMetricsContentToJSON;
exports.deploymentCreateMetricMessagesDeveloperMessageToJSON = deploymentCreateMetricMessagesDeveloperMessageToJSON;
exports.deploymentCreateMetricMessagesContentToJSON = deploymentCreateMetricMessagesContentToJSON;
exports.deploymentCreateMetricMessagesSystemMessageToJSON = deploymentCreateMetricMessagesSystemMessageToJSON;
exports.deploymentCreateMetricMessagesToJSON = deploymentCreateMetricMessagesToJSON;
exports.deploymentCreateMetricContentDeploymentsMetricsRequestRequestBodyChoices52ToJSON = deploymentCreateMetricContentDeploymentsMetricsRequestRequestBodyChoices52ToJSON;
exports.deploymentCreateMetricChoicesDeploymentsMetricsRequestRequestBodyContentToJSON = deploymentCreateMetricChoicesDeploymentsMetricsRequestRequestBodyContentToJSON;
exports.choicesCacheControlToJSON = choicesCacheControlToJSON;
exports.choicesToolMessageToJSON = choicesToolMessageToJSON;
exports.deploymentCreateMetricContentDeploymentsMetricsRequestRequestBodyChoices2ToJSON = deploymentCreateMetricContentDeploymentsMetricsRequestRequestBodyChoices2ToJSON;
exports.deploymentCreateMetricChoicesDeploymentsMetricsRequestContentToJSON = deploymentCreateMetricChoicesDeploymentsMetricsRequestContentToJSON;
exports.choicesAudioToJSON = choicesAudioToJSON;
exports.choicesFunctionToJSON = choicesFunctionToJSON;
exports.choicesToolCallsToJSON = choicesToolCallsToJSON;
exports.choicesAssistantMessageToJSON = choicesAssistantMessageToJSON;
exports.deploymentCreateMetric2DeploymentsMetricsCacheControlToJSON = deploymentCreateMetric2DeploymentsMetricsCacheControlToJSON;
exports.deploymentCreateMetric2DeploymentsMetrics4ToJSON = deploymentCreateMetric2DeploymentsMetrics4ToJSON;
exports.deploymentCreateMetricContentDeploymentsMetricsRequestRequestBody2ToJSON = deploymentCreateMetricContentDeploymentsMetricsRequestRequestBody2ToJSON;
exports.deploymentCreateMetricChoicesDeploymentsMetricsContentToJSON = deploymentCreateMetricChoicesDeploymentsMetricsContentToJSON;
exports.choicesUserMessageToJSON = choicesUserMessageToJSON;
exports.deploymentCreateMetricChoicesContentToJSON = deploymentCreateMetricChoicesContentToJSON;
exports.choicesDeveloperMessageToJSON = choicesDeveloperMessageToJSON;
exports.choicesContentToJSON = choicesContentToJSON;
exports.choicesSystemMessageToJSON = choicesSystemMessageToJSON;
exports.choicesToJSON = choicesToJSON;
exports.feedbackToJSON = feedbackToJSON;
exports.deploymentCreateMetricRequestBodyToJSON = deploymentCreateMetricRequestBodyToJSON;
exports.deploymentCreateMetricRequestToJSON = deploymentCreateMetricRequestToJSON;
exports.deploymentCreateMetricResponseBodyFromJSON = deploymentCreateMetricResponseBodyFromJSON;
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.DeploymentCreateMetricMessagesDeploymentsMetricsType = {
    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.DeploymentCreateMetricMessagesTtl = {
    Fivem: "5m",
    Oneh: "1h",
};
/**
 * The type of the tool. Currently, only `function` is supported.
 */
exports.DeploymentCreateMetricMessagesType = {
    Function: "function",
};
/**
 * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
 */
exports.DeploymentCreateMetric2DeploymentsMetricsType = {
    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.DeploymentCreateMetric2Ttl = {
    Fivem: "5m",
    Oneh: "1h",
};
/**
 * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
 */
exports.DeploymentCreateMetricChoicesType = {
    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.ChoicesTtl = {
    Fivem: "5m",
    Oneh: "1h",
};
/**
 * The type of the tool. Currently, only `function` is supported.
 */
exports.ChoicesType = {
    Function: "function",
};
/**
 * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
 */
exports.DeploymentCreateMetric2DeploymentsMetricsRequestRequestBodyType = {
    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.DeploymentCreateMetric2DeploymentsMetricsTtl = {
    Fivem: "5m",
    Oneh: "1h",
};
/** @internal */
exports.Usage$outboundSchema = z.object({
    promptTokens: z.number(),
    completionTokens: z.number(),
    totalTokens: z.number().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        promptTokens: "prompt_tokens",
        completionTokens: "completion_tokens",
        totalTokens: "total_tokens",
    });
});
function usageToJSON(usage) {
    return JSON.stringify(exports.Usage$outboundSchema.parse(usage));
}
/** @internal */
exports.Performance$outboundSchema = z.object({
    latency: z.number(),
    timeToFirstToken: z.number().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        timeToFirstToken: "time_to_first_token",
    });
});
function performanceToJSON(performance) {
    return JSON.stringify(exports.Performance$outboundSchema.parse(performance));
}
/** @internal */
exports.DeploymentCreateMetricContentDeploymentsMetricsRequest2$outboundSchema = components.TextContentPartSchema$outboundSchema;
function deploymentCreateMetricContentDeploymentsMetricsRequest2ToJSON(deploymentCreateMetricContentDeploymentsMetricsRequest2) {
    return JSON.stringify(exports.DeploymentCreateMetricContentDeploymentsMetricsRequest2$outboundSchema
        .parse(deploymentCreateMetricContentDeploymentsMetricsRequest2));
}
/** @internal */
exports.DeploymentCreateMetricMessagesDeploymentsMetricsRequestRequestBody5Content$outboundSchema = z.union([
    z.string(),
    z.array(components.TextContentPartSchema$outboundSchema),
]);
function deploymentCreateMetricMessagesDeploymentsMetricsRequestRequestBody5ContentToJSON(deploymentCreateMetricMessagesDeploymentsMetricsRequestRequestBody5Content) {
    return JSON.stringify(exports.DeploymentCreateMetricMessagesDeploymentsMetricsRequestRequestBody5Content$outboundSchema
        .parse(deploymentCreateMetricMessagesDeploymentsMetricsRequestRequestBody5Content));
}
/** @internal */
exports.DeploymentCreateMetricMessagesDeploymentsMetricsType$outboundSchema = z.nativeEnum(exports.DeploymentCreateMetricMessagesDeploymentsMetricsType);
/** @internal */
exports.DeploymentCreateMetricMessagesTtl$outboundSchema = z.nativeEnum(exports.DeploymentCreateMetricMessagesTtl);
/** @internal */
exports.DeploymentCreateMetricMessagesCacheControl$outboundSchema = z.object({
    type: exports.DeploymentCreateMetricMessagesDeploymentsMetricsType$outboundSchema,
    ttl: exports.DeploymentCreateMetricMessagesTtl$outboundSchema.default("5m"),
});
function deploymentCreateMetricMessagesCacheControlToJSON(deploymentCreateMetricMessagesCacheControl) {
    return JSON.stringify(exports.DeploymentCreateMetricMessagesCacheControl$outboundSchema.parse(deploymentCreateMetricMessagesCacheControl));
}
/** @internal */
exports.DeploymentCreateMetricMessagesToolMessage$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.DeploymentCreateMetricMessagesCacheControl$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        toolCallId: "tool_call_id",
        cacheControl: "cache_control",
    });
});
function deploymentCreateMetricMessagesToolMessageToJSON(deploymentCreateMetricMessagesToolMessage) {
    return JSON.stringify(exports.DeploymentCreateMetricMessagesToolMessage$outboundSchema.parse(deploymentCreateMetricMessagesToolMessage));
}
/** @internal */
exports.DeploymentCreateMetricContentDeploymentsMetrics2$outboundSchema = z.union([
    components.TextContentPartSchema$outboundSchema.and(z.object({ type: z.literal("text") })),
    components.RefusalPartSchema$outboundSchema,
    components.ReasoningPartSchema$outboundSchema,
    components.RedactedReasoningPartSchema$outboundSchema,
]);
function deploymentCreateMetricContentDeploymentsMetrics2ToJSON(deploymentCreateMetricContentDeploymentsMetrics2) {
    return JSON.stringify(exports.DeploymentCreateMetricContentDeploymentsMetrics2$outboundSchema.parse(deploymentCreateMetricContentDeploymentsMetrics2));
}
/** @internal */
exports.DeploymentCreateMetricMessagesDeploymentsMetricsRequestRequestBodyContent$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 deploymentCreateMetricMessagesDeploymentsMetricsRequestRequestBodyContentToJSON(deploymentCreateMetricMessagesDeploymentsMetricsRequestRequestBodyContent) {
    return JSON.stringify(exports.DeploymentCreateMetricMessagesDeploymentsMetricsRequestRequestBodyContent$outboundSchema
        .parse(deploymentCreateMetricMessagesDeploymentsMetricsRequestRequestBodyContent));
}
/** @internal */
exports.DeploymentCreateMetricMessagesAudio$outboundSchema = z.object({
    id: z.string(),
});
function deploymentCreateMetricMessagesAudioToJSON(deploymentCreateMetricMessagesAudio) {
    return JSON.stringify(exports.DeploymentCreateMetricMessagesAudio$outboundSchema.parse(deploymentCreateMetricMessagesAudio));
}
/** @internal */
exports.DeploymentCreateMetricMessagesType$outboundSchema = z.nativeEnum(exports.DeploymentCreateMetricMessagesType);
/** @internal */
exports.DeploymentCreateMetricMessagesFunction$outboundSchema = z.object({
    name: z.string().optional(),
    arguments: z.string().optional(),
});
function deploymentCreateMetricMessagesFunctionToJSON(deploymentCreateMetricMessagesFunction) {
    return JSON.stringify(exports.DeploymentCreateMetricMessagesFunction$outboundSchema.parse(deploymentCreateMetricMessagesFunction));
}
/** @internal */
exports.DeploymentCreateMetricMessagesToolCalls$outboundSchema = z.object({
    id: z.string(),
    type: exports.DeploymentCreateMetricMessagesType$outboundSchema,
    function: z.lazy(() => exports.DeploymentCreateMetricMessagesFunction$outboundSchema),
    thoughtSignature: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        thoughtSignature: "thought_signature",
    });
});
function deploymentCreateMetricMessagesToolCallsToJSON(deploymentCreateMetricMessagesToolCalls) {
    return JSON.stringify(exports.DeploymentCreateMetricMessagesToolCalls$outboundSchema.parse(deploymentCreateMetricMessagesToolCalls));
}
/** @internal */
exports.DeploymentCreateMetricMessagesAssistantMessage$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.DeploymentCreateMetricMessagesAudio$outboundSchema)).optional(),
    toolCalls: z.array(z.lazy(() => exports.DeploymentCreateMetricMessagesToolCalls$outboundSchema)).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        toolCalls: "tool_calls",
    });
});
function deploymentCreateMetricMessagesAssistantMessageToJSON(deploymentCreateMetricMessagesAssistantMessage) {
    return JSON.stringify(exports.DeploymentCreateMetricMessagesAssistantMessage$outboundSchema.parse(deploymentCreateMetricMessagesAssistantMessage));
}
/** @internal */
exports.DeploymentCreateMetric2DeploymentsMetricsType$outboundSchema = z
    .nativeEnum(exports.DeploymentCreateMetric2DeploymentsMetricsType);
/** @internal */
exports.DeploymentCreateMetric2Ttl$outboundSchema = z.nativeEnum(exports.DeploymentCreateMetric2Ttl);
/** @internal */
exports.DeploymentCreateMetric2CacheControl$outboundSchema = z.object({
    type: exports.DeploymentCreateMetric2DeploymentsMetricsType$outboundSchema,
    ttl: exports.DeploymentCreateMetric2Ttl$outboundSchema.default("5m"),
});
function deploymentCreateMetric2CacheControlToJSON(deploymentCreateMetric2CacheControl) {
    return JSON.stringify(exports.DeploymentCreateMetric2CacheControl$outboundSchema.parse(deploymentCreateMetric2CacheControl));
}
/** @internal */
exports.DeploymentCreateMetric24$outboundSchema = z.object({
    type: z.literal("file"),
    cacheControl: z.lazy(() => exports.DeploymentCreateMetric2CacheControl$outboundSchema)
        .optional(),
    file: components.FileContentPartSchema$outboundSchema,
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        cacheControl: "cache_control",
    });
});
function deploymentCreateMetric24ToJSON(deploymentCreateMetric24) {
    return JSON.stringify(exports.DeploymentCreateMetric24$outboundSchema.parse(deploymentCreateMetric24));
}
/** @internal */
exports.DeploymentCreateMetricContent2$outboundSchema = z.union([
    components.TextContentPartSchema$outboundSchema.and(z.object({ type: z.literal("text") })),
    components.ImageContentPartSchema$outboundSchema,
    components.AudioContentPartSchema$outboundSchema,
    z.lazy(() => exports.DeploymentCreateMetric24$outboundSchema),
]);
function deploymentCreateMetricContent2ToJSON(deploymentCreateMetricContent2) {
    return JSON.stringify(exports.DeploymentCreateMetricContent2$outboundSchema.parse(deploymentCreateMetricContent2));
}
/** @internal */
exports.DeploymentCreateMetricMessagesDeploymentsMetricsRequestContent$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.DeploymentCreateMetric24$outboundSchema),
    ])),
]);
function deploymentCreateMetricMessagesDeploymentsMetricsRequestContentToJSON(deploymentCreateMetricMessagesDeploymentsMetricsRequestContent) {
    return JSON.stringify(exports.DeploymentCreateMetricMessagesDeploymentsMetricsRequestContent$outboundSchema
        .parse(deploymentCreateMetricMessagesDeploymentsMetricsRequestContent));
}
/** @internal */
exports.DeploymentCreateMetricMessagesUserMessage$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.DeploymentCreateMetric24$outboundSchema),
        ])),
    ]),
});
function deploymentCreateMetricMessagesUserMessageToJSON(deploymentCreateMetricMessagesUserMessage) {
    return JSON.stringify(exports.DeploymentCreateMetricMessagesUserMessage$outboundSchema.parse(deploymentCreateMetricMessagesUserMessage));
}
/** @internal */
exports.DeploymentCreateMetricMessagesDeploymentsMetricsContent$outboundSchema = z.union([
    z.string(),
    z.array(components.TextContentPartSchema$outboundSchema),
]);
function deploymentCreateMetricMessagesDeploymentsMetricsContentToJSON(deploymentCreateMetricMessagesDeploymentsMetricsContent) {
    return JSON.stringify(exports.DeploymentCreateMetricMessagesDeploymentsMetricsContent$outboundSchema
        .parse(deploymentCreateMetricMessagesDeploymentsMetricsContent));
}
/** @internal */
exports.DeploymentCreateMetricMessagesDeveloperMessage$outboundSchema = z.object({
    role: z.literal("developer"),
    content: z.union([
        z.string(),
        z.array(components.TextContentPartSchema$outboundSchema),
    ]),
    name: z.string().optional(),
});
function deploymentCreateMetricMessagesDeveloperMessageToJSON(deploymentCreateMetricMessagesDeveloperMessage) {
    return JSON.stringify(exports.DeploymentCreateMetricMessagesDeveloperMessage$outboundSchema.parse(deploymentCreateMetricMessagesDeveloperMessage));
}
/** @internal */
exports.DeploymentCreateMetricMessagesContent$outboundSchema = z.union([
    z.string(),
    z.array(components.TextContentPartSchema$outboundSchema),
]);
function deploymentCreateMetricMessagesContentToJSON(deploymentCreateMetricMessagesContent) {
    return JSON.stringify(exports.DeploymentCreateMetricMessagesContent$outboundSchema.parse(deploymentCreateMetricMessagesContent));
}
/** @internal */
exports.DeploymentCreateMetricMessagesSystemMessage$outboundSchema = z.object({
    role: z.literal("system"),
    content: z.union([
        z.string(),
        z.array(components.TextContentPartSchema$outboundSchema),
    ]),
    name: z.string().optional(),
});
function deploymentCreateMetricMessagesSystemMessageToJSON(deploymentCreateMetricMessagesSystemMessage) {
    return JSON.stringify(exports.DeploymentCreateMetricMessagesSystemMessage$outboundSchema.parse(deploymentCreateMetricMessagesSystemMessage));
}
/** @internal */
exports.DeploymentCreateMetricMessages$outboundSchema = z.union([
    z.lazy(() => exports.DeploymentCreateMetricMessagesSystemMessage$outboundSchema),
    z.lazy(() => exports.DeploymentCreateMetricMessagesDeveloperMessage$outboundSchema),
    z.lazy(() => exports.DeploymentCreateMetricMessagesUserMessage$outboundSchema),
    z.lazy(() => exports.DeploymentCreateMetricMessagesAssistantMessage$outboundSchema),
    z.lazy(() => exports.DeploymentCreateMetricMessagesToolMessage$outboundSchema),
]);
function deploymentCreateMetricMessagesToJSON(deploymentCreateMetricMessages) {
    return JSON.stringify(exports.DeploymentCreateMetricMessages$outboundSchema.parse(deploymentCreateMetricMessages));
}
/** @internal */
exports.DeploymentCreateMetricContentDeploymentsMetricsRequestRequestBodyChoices52$outboundSchema = components.TextContentPartSchema$outboundSchema;
function deploymentCreateMetricContentDeploymentsMetricsRequestRequestBodyChoices52ToJSON(deploymentCreateMetricContentDeploymentsMetricsRequestRequestBodyChoices52) {
    return JSON.stringify(exports.DeploymentCreateMetricContentDeploymentsMetricsRequestRequestBodyChoices52$outboundSchema
        .parse(deploymentCreateMetricContentDeploymentsMetricsRequestRequestBodyChoices52));
}
/** @internal */
exports.DeploymentCreateMetricChoicesDeploymentsMetricsRequestRequestBodyContent$outboundSchema = z.union([
    z.string(),
    z.array(components.TextContentPartSchema$outboundSchema),
]);
function deploymentCreateMetricChoicesDeploymentsMetricsRequestRequestBodyContentToJSON(deploymentCreateMetricChoicesDeploymentsMetricsRequestRequestBodyContent) {
    return JSON.stringify(exports.DeploymentCreateMetricChoicesDeploymentsMetricsRequestRequestBodyContent$outboundSchema
        .parse(deploymentCreateMetricChoicesDeploymentsMetricsRequestRequestBodyContent));
}
/** @internal */
exports.DeploymentCreateMetricChoicesType$outboundSchema = z.nativeEnum(exports.DeploymentCreateMetricChoicesType);
/** @internal */
exports.ChoicesTtl$outboundSchema = z
    .nativeEnum(exports.ChoicesTtl);
/** @internal */
exports.ChoicesCacheControl$outboundSchema = z.object({
    type: exports.DeploymentCreateMetricChoicesType$outboundSchema,
    ttl: exports.ChoicesTtl$outboundSchema.default("5m"),
});
function choicesCacheControlToJSON(choicesCacheControl) {
    return JSON.stringify(exports.ChoicesCacheControl$outboundSchema.parse(choicesCacheControl));
}
/** @internal */
exports.ChoicesToolMessage$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.ChoicesCacheControl$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        toolCallId: "tool_call_id",
        cacheControl: "cache_control",
    });
});
function choicesToolMessageToJSON(choicesToolMessage) {
    return JSON.stringify(exports.ChoicesToolMessage$outboundSchema.parse(choicesToolMessage));
}
/** @internal */
exports.DeploymentCreateMetricContentDeploymentsMetricsRequestRequestBodyChoices2$outboundSchema = z.union([
    components.TextContentPartSchema$outboundSchema.and(z.object({ type: z.literal("text") })),
    components.RefusalPartSchema$outboundSchema,
    components.ReasoningPartSchema$outboundSchema,
    components.RedactedReasoningPartSchema$outboundSchema,
]);
function deploymentCreateMetricContentDeploymentsMetricsRequestRequestBodyChoices2ToJSON(deploymentCreateMetricContentDeploymentsMetricsRequestRequestBodyChoices2) {
    return JSON.stringify(exports.DeploymentCreateMetricContentDeploymentsMetricsRequestRequestBodyChoices2$outboundSchema
        .parse(deploymentCreateMetricContentDeploymentsMetricsRequestRequestBodyChoices2));
}
/** @internal */
exports.DeploymentCreateMetricChoicesDeploymentsMetricsRequestContent$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 deploymentCreateMetricChoicesDeploymentsMetricsRequestContentToJSON(deploymentCreateMetricChoicesDeploymentsMetricsRequestContent) {
    return JSON.stringify(exports.DeploymentCreateMetricChoicesDeploymentsMetricsRequestContent$outboundSchema
        .parse(deploymentCreateMetricChoicesDeploymentsMetricsRequestContent));
}
/** @internal */
exports.ChoicesAudio$outboundSchema = z.object({
    id: z.string(),
});
function choicesAudioToJSON(choicesAudio) {
    return JSON.stringify(exports.ChoicesAudio$outboundSchema.parse(choicesAudio));
}
/** @internal */
exports.ChoicesType$outboundSchema = z
    .nativeEnum(exports.ChoicesType);
/** @internal */
exports.ChoicesFunction$outboundSchema = z.object({
    name: z.string().optional(),
    arguments: z.string().optional(),
});
function choicesFunctionToJSON(choicesFunction) {
    return JSON.stringify(exports.ChoicesFunction$outboundSchema.parse(choicesFunction));
}
/** @internal */
exports.ChoicesToolCalls$outboundSchema = z.object({
    id: z.string(),
    type: exports.ChoicesType$outboundSchema,
    function: z.lazy(() => exports.ChoicesFunction$outboundSchema),
    thoughtSignature: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        thoughtSignature: "thought_signature",
    });
});
function choicesToolCallsToJSON(choicesToolCalls) {
    return JSON.stringify(exports.ChoicesToolCalls$outboundSchema.parse(choicesToolCalls));
}
/** @internal */
exports.ChoicesAssistantMessage$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.ChoicesAudio$outboundSchema)).optional(),
    toolCalls: z.array(z.lazy(() => exports.ChoicesToolCalls$outboundSchema)).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        toolCalls: "tool_calls",
    });
});
function choicesAssistantMessageToJSON(choicesAssistantMessage) {
    return JSON.stringify(exports.ChoicesAssistantMessage$outboundSchema.parse(choicesAssistantMessage));
}
/** @internal */
exports.DeploymentCreateMetric2DeploymentsMetricsRequestRequestBodyType$outboundSchema = z.nativeEnum(exports.DeploymentCreateMetric2DeploymentsMetricsRequestRequestBodyType);
/** @internal */
exports.DeploymentCreateMetric2DeploymentsMetricsTtl$outboundSchema = z
    .nativeEnum(exports.DeploymentCreateMetric2DeploymentsMetricsTtl);
/** @internal */
exports.DeploymentCreateMetric2DeploymentsMetricsCacheControl$outboundSchema = z.object({
    type: exports.DeploymentCreateMetric2DeploymentsMetricsRequestRequestBodyType$outboundSchema,
    ttl: exports.DeploymentCreateMetric2DeploymentsMetricsTtl$outboundSchema.default("5m"),
});
function deploymentCreateMetric2DeploymentsMetricsCacheControlToJSON(deploymentCreateMetric2DeploymentsMetricsCacheControl) {
    return JSON.stringify(exports.DeploymentCreateMetric2DeploymentsMetricsCacheControl$outboundSchema.parse(deploymentCreateMetric2DeploymentsMetricsCacheControl));
}
/** @internal */
exports.DeploymentCreateMetric2DeploymentsMetrics4$outboundSchema = z.object({
    type: z.literal("file"),
    cacheControl: z.lazy(() => exports.DeploymentCreateMetric2DeploymentsMetricsCacheControl$outboundSchema).optional(),
    file: components.FileContentPartSchema$outboundSchema,
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        cacheControl: "cache_control",
    });
});
function deploymentCreateMetric2DeploymentsMetrics4ToJSON(deploymentCreateMetric2DeploymentsMetrics4) {
    return JSON.stringify(exports.DeploymentCreateMetric2DeploymentsMetrics4$outboundSchema.parse(deploymentCreateMetric2DeploymentsMetrics4));
}
/** @internal */
exports.DeploymentCreateMetricContentDeploymentsMetricsRequestRequestBody2$outboundSchema = z.union([
    components.TextContentPartSchema$outboundSchema.and(z.object({ type: z.literal("text") })),
    components.ImageContentPartSchema$outboundSchema,
    components.AudioContentPartSchema$outboundSchema,
    z.lazy(() => exports.DeploymentCreateMetric2DeploymentsMetrics4$outboundSchema),
]);
function deploymentCreateMetricContentDeploymentsMetricsRequestRequestBody2ToJSON(deploymentCreateMetricContentDeploymentsMetricsRequestRequestBody2) {
    return JSON.stringify(exports.DeploymentCreateMetricContentDeploymentsMetricsRequestRequestBody2$outboundSchema
        .parse(deploymentCreateMetricContentDeploymentsMetricsRequestRequestBody2));
}
/** @internal */
exports.DeploymentCreateMetricChoicesDeploymentsMetricsContent$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.DeploymentCreateMetric2DeploymentsMetrics4$outboundSchema),
    ])),
]);
function deploymentCreateMetricChoicesDeploymentsMetricsContentToJSON(deploymentCreateMetricChoicesDeploymentsMetricsContent) {
    return JSON.stringify(exports.DeploymentCreateMetricChoicesDeploymentsMetricsContent$outboundSchema.parse(deploymentCreateMetricChoicesDeploymentsMetricsContent));
}
/** @internal */
exports.ChoicesUserMessage$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.DeploymentCreateMetric2DeploymentsMetrics4$outboundSchema),
        ])),
    ]),
});
function choicesUserMessageToJSON(choicesUserMessage) {
    return JSON.stringify(exports.ChoicesUserMessage$outboundSchema.parse(choicesUserMessage));
}
/** @internal */
exports.DeploymentCreateMetricChoicesContent$outboundSchema = z.union([
    z.string(),
    z.array(components.TextContentPartSchema$outboundSchema),
]);
function deploymentCreateMetricChoicesContentToJSON(deploymentCreateMetricChoicesContent) {
    return JSON.stringify(exports.DeploymentCreateMetricChoicesContent$outboundSchema.parse(deploymentCreateMetricChoicesContent));
}
/** @internal */
exports.ChoicesDeveloperMessage$outboundSchema = z.object({
    role: z.literal("developer"),
    content: z.union([
        z.string(),
        z.array(components.TextContentPartSchema$outboundSchema),
    ]),
    name: z.string().optional(),
});
function choicesDeveloperMessageToJSON(choicesDeveloperMessage) {
    return JSON.stringify(exports.ChoicesDeveloperMessage$outboundSchema.parse(choicesDeveloperMessage));
}
/** @internal */
exports.ChoicesContent$outboundSchema = z.union([
    z.string(),
    z.array(components.TextContentPartSchema$outboundSchema),
]);
function choicesContentToJSON(choicesContent) {
    return JSON.stringify(exports.ChoicesContent$outboundSchema.parse(choicesContent));
}
/** @internal */
exports.ChoicesSystemMessage$outboundSchema = z.object({
    role: z.literal("system"),
    content: z.union([
        z.string(),
        z.array(components.TextContentPartSchema$outboundSchema),
    ]),
    name: z.string().optional(),
});
function choicesSystemMessageToJSON(choicesSystemMessage) {
    return JSON.stringify(exports.ChoicesSystemMessage$outboundSchema.parse(choicesSystemMessage));
}
/** @internal */
exports.Choices$outboundSchema = z.union([
    z.lazy(() => exports.ChoicesSystemMessage$outboundSchema),
    z.lazy(() => exports.ChoicesDeveloperMessage$outboundSchema),
    z.lazy(() => exports.ChoicesUserMessage$outboundSchema),
    z.lazy(() => exports.ChoicesAssistantMessage$outboundSchema),
    z.lazy(() => exports.ChoicesToolMessage$outboundSchema),
]);
function choicesToJSON(choices) {
    return JSON.stringify(exports.Choices$outboundSchema.parse(choices));
}
/** @internal */
exports.Feedback$outboundSchema = z.object({
    score: z.number().int(),
});
function feedbackToJSON(feedback) {
    return JSON.stringify(exports.Feedback$outboundSchema.parse(feedback));
}
/** @internal */
exports.DeploymentCreateMetricRequestBody$outboundSchema = z.object({
    metadata: z.record(z.any()).optional(),
    usage: z.lazy(() => exports.Usage$outboundSchema).optional(),
    performance: z.lazy(() => exports.Performance$outboundSchema).optional(),
    messages: z.array(z.union([
        z.lazy(() => exports.DeploymentCreateMetricMessagesSystemMessage$outboundSchema),
        z.lazy(() => exports.DeploymentCreateMetricMessagesDeveloperMessage$outboundSchema),
        z.lazy(() => exports.DeploymentCreateMetricMessagesUserMessage$outboundSchema),
        z.lazy(() => exports.DeploymentCreateMetricMessagesAssistantMessage$outboundSchema),
        z.lazy(() => exports.DeploymentCreateMetricMessagesToolMessage$outboundSchema),
    ])).optional(),
    choices: z.array(z.union([
        z.lazy(() => exports.ChoicesSystemMessage$outboundSchema),
        z.lazy(() => exports.ChoicesDeveloperMessage$outboundSchema),
        z.lazy(() => exports.ChoicesUserMessage$outboundSchema),
        z.lazy(() => exports.ChoicesAssistantMessage$outboundSchema),
        z.lazy(() => exports.ChoicesToolMessage$outboundSchema),
    ])).optional(),
    feedback: z.lazy(() => exports.Feedback$outboundSchema).optional(),
});
function deploymentCreateMetricRequestBodyToJSON(deploymentCreateMetricRequestBody) {
    return JSON.stringify(exports.DeploymentCreateMetricRequestBody$outboundSchema.parse(deploymentCreateMetricRequestBody));
}
/** @internal */
exports.DeploymentCreateMetricRequest$outboundSchema = z.object({
    id: z.string(),
    requestBody: z.lazy(() => exports.DeploymentCreateMetricRequestBody$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        requestBody: "RequestBody",
    });
});
function deploymentCreateMetricRequestToJSON(deploymentCreateMetricRequest) {
    return JSON.stringify(exports.DeploymentCreateMetricRequest$outboundSchema.parse(deploymentCreateMetricRequest));
}
/** @internal */
exports.DeploymentCreateMetricResponseBody$inboundSchema = z.object({
    success: z.boolean(),
});
function deploymentCreateMetricResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeploymentCreateMetricResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentCreateMetricResponseBody' from JSON`);
}
//# sourceMappingURL=deploymentcreatemetric.js.map