"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.RetrieveAgentRequestToolChoice$inboundSchema = exports.RetrieveAgentRequestToolChoice1$inboundSchema = exports.RetrieveAgentRequestToolChoice2$inboundSchema = exports.RetrieveAgentRequestToolChoiceFunction$inboundSchema = exports.RetrieveAgentRequestToolChoiceType$inboundSchema = exports.RetrieveAgentRequestThinking$inboundSchema = exports.RetrieveAgentRequestStop$inboundSchema = exports.RetrieveAgentRequestReasoningEffort$inboundSchema = exports.RetrieveAgentRequestResponseFormat$inboundSchema = exports.RetrieveAgentRequestResponseFormatText$inboundSchema = exports.RetrieveAgentRequestResponseFormatJSONObject$inboundSchema = exports.RetrieveAgentRequestResponseFormatAgentsJSONSchema$inboundSchema = exports.RetrieveAgentRequestResponseFormatJsonSchema$inboundSchema = exports.RetrieveAgentRequestSettings$inboundSchema = exports.RetrieveAgentRequestGuardrails$inboundSchema = exports.RetrieveAgentRequestAgentsExecuteOn$inboundSchema = exports.RetrieveAgentRequestEvaluators$inboundSchema = exports.RetrieveAgentRequestExecuteOn$inboundSchema = exports.RetrieveAgentRequestTools$inboundSchema = exports.RetrieveAgentRequestConditions$inboundSchema = exports.RetrieveAgentRequestToolApprovalRequired$inboundSchema = exports.RetrieveAgentRequestType$inboundSchema = exports.RetrieveAgentRequestSource$inboundSchema = exports.RetrieveAgentRequestKnowledgeBases$inboundSchema = exports.RetrieveAgentRequestMetrics$inboundSchema = exports.RetrieveAgentRequestTeamOfAgents$inboundSchema = exports.RetrieveAgentRequestStatus$inboundSchema = exports.RetrieveAgentRequestRequest$outboundSchema = exports.RetrieveAgentRequestLoadBalancerAgentsType = exports.RetrieveAgentRequestFallbackModelConfigurationType = exports.RetrieveAgentRequestFallbackModelConfigurationExecuteOn = exports.RetrieveAgentRequestIdAgents1 = exports.RetrieveAgentRequestFallbackModelConfigurationModalities = exports.RetrieveAgentRequestToolChoiceAgents1 = exports.RetrieveAgentRequestToolChoiceAgentsType = exports.RetrieveAgentRequestFallbackModelConfigurationReasoningEffort = exports.RetrieveAgentRequestLoadBalancerType = exports.RetrieveAgentRequestAgentsType = exports.RetrieveAgentRequestAgentsResponseExecuteOn = exports.RetrieveAgentRequestId1 = exports.RetrieveAgentRequestModalities = exports.RetrieveAgentRequestToolChoice1 = exports.RetrieveAgentRequestToolChoiceType = exports.RetrieveAgentRequestReasoningEffort = exports.RetrieveAgentRequestAgentsExecuteOn = exports.RetrieveAgentRequestExecuteOn = exports.RetrieveAgentRequestToolApprovalRequired = exports.RetrieveAgentRequestType = exports.RetrieveAgentRequestSource = exports.RetrieveAgentRequestStatus = void 0;
exports.RetrieveAgentRequestResponseBody$inboundSchema = exports.RetrieveAgentRequestA2AAgentConfiguration$inboundSchema = exports.RetrieveAgentRequestHeaders$inboundSchema = exports.RetrieveAgentRequestModel$inboundSchema = exports.RetrieveAgentRequestFallbackModelConfiguration$inboundSchema = exports.RetrieveAgentRequestFallbackModelConfiguration2$inboundSchema = exports.RetrieveAgentRequestFallbackModelConfigurationRetry$inboundSchema = exports.RetrieveAgentRequestFallbackModelConfigurationParameters$inboundSchema = exports.RetrieveAgentRequestFallbackModelConfigurationTimeout$inboundSchema = exports.RetrieveAgentRequestFallbackModelConfigurationLoadBalancer$inboundSchema = exports.RetrieveAgentRequestLoadBalancerAgents1$inboundSchema = exports.RetrieveAgentRequestLoadBalancerAgentsModels$inboundSchema = exports.RetrieveAgentRequestLoadBalancerAgentsType$inboundSchema = exports.RetrieveAgentRequestFallbackModelConfigurationCache$inboundSchema = exports.RetrieveAgentRequestFallbackModelConfigurationType$inboundSchema = exports.RetrieveAgentRequestFallbackModelConfigurationFallbacks$inboundSchema = exports.RetrieveAgentRequestFallbackModelConfigurationGuardrails$inboundSchema = exports.RetrieveAgentRequestFallbackModelConfigurationExecuteOn$inboundSchema = exports.RetrieveAgentRequestFallbackModelConfigurationId$inboundSchema = exports.RetrieveAgentRequestIdAgents1$inboundSchema = exports.RetrieveAgentRequestFallbackModelConfigurationModalities$inboundSchema = exports.RetrieveAgentRequestFallbackModelConfigurationToolChoice$inboundSchema = exports.RetrieveAgentRequestToolChoiceAgents1$inboundSchema = exports.RetrieveAgentRequestToolChoiceAgents2$inboundSchema = exports.RetrieveAgentRequestToolChoiceAgentsFunction$inboundSchema = exports.RetrieveAgentRequestToolChoiceAgentsType$inboundSchema = exports.RetrieveAgentRequestFallbackModelConfigurationThinking$inboundSchema = exports.RetrieveAgentRequestFallbackModelConfigurationStop$inboundSchema = exports.RetrieveAgentRequestFallbackModelConfigurationReasoningEffort$inboundSchema = exports.RetrieveAgentRequestFallbackModelConfigurationResponseFormat$inboundSchema = exports.RetrieveAgentRequestResponseFormatAgentsText$inboundSchema = exports.RetrieveAgentRequestResponseFormatAgentsJSONObject$inboundSchema = exports.RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema$inboundSchema = exports.RetrieveAgentRequestResponseFormatAgentsResponseJsonSchema$inboundSchema = exports.RetrieveAgentRequestRetry$inboundSchema = exports.RetrieveAgentRequestParameters$inboundSchema = exports.RetrieveAgentRequestTimeout$inboundSchema = exports.RetrieveAgentRequestLoadBalancer$inboundSchema = exports.RetrieveAgentRequestLoadBalancer1$inboundSchema = exports.RetrieveAgentRequestLoadBalancerModels$inboundSchema = exports.RetrieveAgentRequestLoadBalancerType$inboundSchema = exports.RetrieveAgentRequestCache$inboundSchema = exports.RetrieveAgentRequestAgentsType$inboundSchema = exports.RetrieveAgentRequestFallbacks$inboundSchema = exports.RetrieveAgentRequestAgentsGuardrails$inboundSchema = exports.RetrieveAgentRequestAgentsResponseExecuteOn$inboundSchema = exports.RetrieveAgentRequestId$inboundSchema = exports.RetrieveAgentRequestId1$inboundSchema = exports.RetrieveAgentRequestModalities$inboundSchema = void 0;
exports.retrieveAgentRequestRequestToJSON = retrieveAgentRequestRequestToJSON;
exports.retrieveAgentRequestTeamOfAgentsFromJSON = retrieveAgentRequestTeamOfAgentsFromJSON;
exports.retrieveAgentRequestMetricsFromJSON = retrieveAgentRequestMetricsFromJSON;
exports.retrieveAgentRequestKnowledgeBasesFromJSON = retrieveAgentRequestKnowledgeBasesFromJSON;
exports.retrieveAgentRequestConditionsFromJSON = retrieveAgentRequestConditionsFromJSON;
exports.retrieveAgentRequestToolsFromJSON = retrieveAgentRequestToolsFromJSON;
exports.retrieveAgentRequestEvaluatorsFromJSON = retrieveAgentRequestEvaluatorsFromJSON;
exports.retrieveAgentRequestGuardrailsFromJSON = retrieveAgentRequestGuardrailsFromJSON;
exports.retrieveAgentRequestSettingsFromJSON = retrieveAgentRequestSettingsFromJSON;
exports.retrieveAgentRequestResponseFormatJsonSchemaFromJSON = retrieveAgentRequestResponseFormatJsonSchemaFromJSON;
exports.retrieveAgentRequestResponseFormatAgentsJSONSchemaFromJSON = retrieveAgentRequestResponseFormatAgentsJSONSchemaFromJSON;
exports.retrieveAgentRequestResponseFormatJSONObjectFromJSON = retrieveAgentRequestResponseFormatJSONObjectFromJSON;
exports.retrieveAgentRequestResponseFormatTextFromJSON = retrieveAgentRequestResponseFormatTextFromJSON;
exports.retrieveAgentRequestResponseFormatFromJSON = retrieveAgentRequestResponseFormatFromJSON;
exports.retrieveAgentRequestStopFromJSON = retrieveAgentRequestStopFromJSON;
exports.retrieveAgentRequestThinkingFromJSON = retrieveAgentRequestThinkingFromJSON;
exports.retrieveAgentRequestToolChoiceFunctionFromJSON = retrieveAgentRequestToolChoiceFunctionFromJSON;
exports.retrieveAgentRequestToolChoice2FromJSON = retrieveAgentRequestToolChoice2FromJSON;
exports.retrieveAgentRequestToolChoiceFromJSON = retrieveAgentRequestToolChoiceFromJSON;
exports.retrieveAgentRequestIdFromJSON = retrieveAgentRequestIdFromJSON;
exports.retrieveAgentRequestAgentsGuardrailsFromJSON = retrieveAgentRequestAgentsGuardrailsFromJSON;
exports.retrieveAgentRequestFallbacksFromJSON = retrieveAgentRequestFallbacksFromJSON;
exports.retrieveAgentRequestCacheFromJSON = retrieveAgentRequestCacheFromJSON;
exports.retrieveAgentRequestLoadBalancerModelsFromJSON = retrieveAgentRequestLoadBalancerModelsFromJSON;
exports.retrieveAgentRequestLoadBalancer1FromJSON = retrieveAgentRequestLoadBalancer1FromJSON;
exports.retrieveAgentRequestLoadBalancerFromJSON = retrieveAgentRequestLoadBalancerFromJSON;
exports.retrieveAgentRequestTimeoutFromJSON = retrieveAgentRequestTimeoutFromJSON;
exports.retrieveAgentRequestParametersFromJSON = retrieveAgentRequestParametersFromJSON;
exports.retrieveAgentRequestRetryFromJSON = retrieveAgentRequestRetryFromJSON;
exports.retrieveAgentRequestResponseFormatAgentsResponseJsonSchemaFromJSON = retrieveAgentRequestResponseFormatAgentsResponseJsonSchemaFromJSON;
exports.retrieveAgentRequestResponseFormatAgentsResponse200JSONSchemaFromJSON = retrieveAgentRequestResponseFormatAgentsResponse200JSONSchemaFromJSON;
exports.retrieveAgentRequestResponseFormatAgentsJSONObjectFromJSON = retrieveAgentRequestResponseFormatAgentsJSONObjectFromJSON;
exports.retrieveAgentRequestResponseFormatAgentsTextFromJSON = retrieveAgentRequestResponseFormatAgentsTextFromJSON;
exports.retrieveAgentRequestFallbackModelConfigurationResponseFormatFromJSON = retrieveAgentRequestFallbackModelConfigurationResponseFormatFromJSON;
exports.retrieveAgentRequestFallbackModelConfigurationStopFromJSON = retrieveAgentRequestFallbackModelConfigurationStopFromJSON;
exports.retrieveAgentRequestFallbackModelConfigurationThinkingFromJSON = retrieveAgentRequestFallbackModelConfigurationThinkingFromJSON;
exports.retrieveAgentRequestToolChoiceAgentsFunctionFromJSON = retrieveAgentRequestToolChoiceAgentsFunctionFromJSON;
exports.retrieveAgentRequestToolChoiceAgents2FromJSON = retrieveAgentRequestToolChoiceAgents2FromJSON;
exports.retrieveAgentRequestFallbackModelConfigurationToolChoiceFromJSON = retrieveAgentRequestFallbackModelConfigurationToolChoiceFromJSON;
exports.retrieveAgentRequestFallbackModelConfigurationIdFromJSON = retrieveAgentRequestFallbackModelConfigurationIdFromJSON;
exports.retrieveAgentRequestFallbackModelConfigurationGuardrailsFromJSON = retrieveAgentRequestFallbackModelConfigurationGuardrailsFromJSON;
exports.retrieveAgentRequestFallbackModelConfigurationFallbacksFromJSON = retrieveAgentRequestFallbackModelConfigurationFallbacksFromJSON;
exports.retrieveAgentRequestFallbackModelConfigurationCacheFromJSON = retrieveAgentRequestFallbackModelConfigurationCacheFromJSON;
exports.retrieveAgentRequestLoadBalancerAgentsModelsFromJSON = retrieveAgentRequestLoadBalancerAgentsModelsFromJSON;
exports.retrieveAgentRequestLoadBalancerAgents1FromJSON = retrieveAgentRequestLoadBalancerAgents1FromJSON;
exports.retrieveAgentRequestFallbackModelConfigurationLoadBalancerFromJSON = retrieveAgentRequestFallbackModelConfigurationLoadBalancerFromJSON;
exports.retrieveAgentRequestFallbackModelConfigurationTimeoutFromJSON = retrieveAgentRequestFallbackModelConfigurationTimeoutFromJSON;
exports.retrieveAgentRequestFallbackModelConfigurationParametersFromJSON = retrieveAgentRequestFallbackModelConfigurationParametersFromJSON;
exports.retrieveAgentRequestFallbackModelConfigurationRetryFromJSON = retrieveAgentRequestFallbackModelConfigurationRetryFromJSON;
exports.retrieveAgentRequestFallbackModelConfiguration2FromJSON = retrieveAgentRequestFallbackModelConfiguration2FromJSON;
exports.retrieveAgentRequestFallbackModelConfigurationFromJSON = retrieveAgentRequestFallbackModelConfigurationFromJSON;
exports.retrieveAgentRequestModelFromJSON = retrieveAgentRequestModelFromJSON;
exports.retrieveAgentRequestHeadersFromJSON = retrieveAgentRequestHeadersFromJSON;
exports.retrieveAgentRequestA2AAgentConfigurationFromJSON = retrieveAgentRequestA2AAgentConfigurationFromJSON;
exports.retrieveAgentRequestResponseBodyFromJSON = retrieveAgentRequestResponseBodyFromJSON;
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"));
/**
 * The status of the agent. `Live` is the latest version of the agent. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
 */
exports.RetrieveAgentRequestStatus = {
    Live: "live",
    Draft: "draft",
    Pending: "pending",
    Published: "published",
};
exports.RetrieveAgentRequestSource = {
    Internal: "internal",
    External: "external",
    Experiment: "experiment",
};
/**
 * Agent type: internal (Orquesta-managed) or a2a (external A2A-compliant)
 */
exports.RetrieveAgentRequestType = {
    Internal: "internal",
    A2a: "a2a",
};
/**
 * If all, the agent will require approval for all tools. If respect_tool, the agent will require approval for tools that have the requires_approval flag set to true. If none, the agent will not require approval for any tools.
 */
exports.RetrieveAgentRequestToolApprovalRequired = {
    All: "all",
    RespectTool: "respect_tool",
    None: "none",
};
/**
 * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
 */
exports.RetrieveAgentRequestExecuteOn = {
    Input: "input",
    Output: "output",
};
/**
 * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
 */
exports.RetrieveAgentRequestAgentsExecuteOn = {
    Input: "input",
    Output: "output",
};
/**
 * Constrains effort on reasoning for [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
 *
 * @remarks
 *
 * - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.
 * - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.
 * - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
 * - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
 *
 * Any of "none", "minimal", "low", "medium", "high", "xhigh".
 */
exports.RetrieveAgentRequestReasoningEffort = {
    None: "none",
    Minimal: "minimal",
    Low: "low",
    Medium: "medium",
    High: "high",
    Xhigh: "xhigh",
};
/**
 * The type of the tool. Currently, only function is supported.
 */
exports.RetrieveAgentRequestToolChoiceType = {
    Function: "function",
};
exports.RetrieveAgentRequestToolChoice1 = {
    None: "none",
    Auto: "auto",
    Required: "required",
};
exports.RetrieveAgentRequestModalities = {
    Text: "text",
    Audio: "audio",
};
/**
 * The key of the guardrail.
 */
exports.RetrieveAgentRequestId1 = {
    OrqPiiDetection: "orq_pii_detection",
    OrqSexualModeration: "orq_sexual_moderation",
    OrqHarmfulModeration: "orq_harmful_moderation",
};
/**
 * Determines whether the guardrail runs on the input (user message) or output (model response).
 */
exports.RetrieveAgentRequestAgentsResponseExecuteOn = {
    Input: "input",
    Output: "output",
};
exports.RetrieveAgentRequestAgentsType = {
    ExactMatch: "exact_match",
};
exports.RetrieveAgentRequestLoadBalancerType = {
    WeightBased: "weight_based",
};
/**
 * Constrains effort on reasoning for [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
 *
 * @remarks
 *
 * - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.
 * - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.
 * - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
 * - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
 *
 * Any of "none", "minimal", "low", "medium", "high", "xhigh".
 */
exports.RetrieveAgentRequestFallbackModelConfigurationReasoningEffort = {
    None: "none",
    Minimal: "minimal",
    Low: "low",
    Medium: "medium",
    High: "high",
    Xhigh: "xhigh",
};
/**
 * The type of the tool. Currently, only function is supported.
 */
exports.RetrieveAgentRequestToolChoiceAgentsType = {
    Function: "function",
};
exports.RetrieveAgentRequestToolChoiceAgents1 = {
    None: "none",
    Auto: "auto",
    Required: "required",
};
exports.RetrieveAgentRequestFallbackModelConfigurationModalities = {
    Text: "text",
    Audio: "audio",
};
/**
 * The key of the guardrail.
 */
exports.RetrieveAgentRequestIdAgents1 = {
    OrqPiiDetection: "orq_pii_detection",
    OrqSexualModeration: "orq_sexual_moderation",
    OrqHarmfulModeration: "orq_harmful_moderation",
};
/**
 * Determines whether the guardrail runs on the input (user message) or output (model response).
 */
exports.RetrieveAgentRequestFallbackModelConfigurationExecuteOn = {
    Input: "input",
    Output: "output",
};
exports.RetrieveAgentRequestFallbackModelConfigurationType = {
    ExactMatch: "exact_match",
};
exports.RetrieveAgentRequestLoadBalancerAgentsType = {
    WeightBased: "weight_based",
};
/** @internal */
exports.RetrieveAgentRequestRequest$outboundSchema = z.object({
    agentKey: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        agentKey: "agent_key",
    });
});
function retrieveAgentRequestRequestToJSON(retrieveAgentRequestRequest) {
    return JSON.stringify(exports.RetrieveAgentRequestRequest$outboundSchema.parse(retrieveAgentRequestRequest));
}
/** @internal */
exports.RetrieveAgentRequestStatus$inboundSchema = z.nativeEnum(exports.RetrieveAgentRequestStatus);
/** @internal */
exports.RetrieveAgentRequestTeamOfAgents$inboundSchema = z.object({
    key: z.string(),
    role: z.string().optional(),
});
function retrieveAgentRequestTeamOfAgentsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestTeamOfAgents$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestTeamOfAgents' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestMetrics$inboundSchema = z.object({
    total_cost: z.number().default(0),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "total_cost": "totalCost",
    });
});
function retrieveAgentRequestMetricsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestMetrics$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestMetrics' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestKnowledgeBases$inboundSchema = z.object({
    knowledge_id: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "knowledge_id": "knowledgeId",
    });
});
function retrieveAgentRequestKnowledgeBasesFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestKnowledgeBases$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestKnowledgeBases' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestSource$inboundSchema = z.nativeEnum(exports.RetrieveAgentRequestSource);
/** @internal */
exports.RetrieveAgentRequestType$inboundSchema = z.nativeEnum(exports.RetrieveAgentRequestType);
/** @internal */
exports.RetrieveAgentRequestToolApprovalRequired$inboundSchema = z
    .nativeEnum(exports.RetrieveAgentRequestToolApprovalRequired);
/** @internal */
exports.RetrieveAgentRequestConditions$inboundSchema = z.object({
    condition: z.string(),
    operator: z.string(),
    value: z.string(),
});
function retrieveAgentRequestConditionsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestConditions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestConditions' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestTools$inboundSchema = z.object({
    id: z.string(),
    key: z.string().optional(),
    action_type: z.string(),
    display_name: z.string().optional(),
    description: z.string().optional(),
    requires_approval: z.boolean().default(false),
    tool_id: z.string().optional(),
    conditions: z.array(z.lazy(() => exports.RetrieveAgentRequestConditions$inboundSchema)).optional(),
    timeout: z.number().default(120),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "action_type": "actionType",
        "display_name": "displayName",
        "requires_approval": "requiresApproval",
        "tool_id": "toolId",
    });
});
function retrieveAgentRequestToolsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestTools$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestTools' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestExecuteOn$inboundSchema = z.nativeEnum(exports.RetrieveAgentRequestExecuteOn);
/** @internal */
exports.RetrieveAgentRequestEvaluators$inboundSchema = z.object({
    id: z.string(),
    sample_rate: z.number().default(50),
    execute_on: exports.RetrieveAgentRequestExecuteOn$inboundSchema,
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "sample_rate": "sampleRate",
        "execute_on": "executeOn",
    });
});
function retrieveAgentRequestEvaluatorsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestEvaluators$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestEvaluators' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestAgentsExecuteOn$inboundSchema = z.nativeEnum(exports.RetrieveAgentRequestAgentsExecuteOn);
/** @internal */
exports.RetrieveAgentRequestGuardrails$inboundSchema = z.object({
    id: z.string(),
    sample_rate: z.number().default(50),
    execute_on: exports.RetrieveAgentRequestAgentsExecuteOn$inboundSchema,
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "sample_rate": "sampleRate",
        "execute_on": "executeOn",
    });
});
function retrieveAgentRequestGuardrailsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestGuardrails$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestGuardrails' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestSettings$inboundSchema = z.object({
    max_iterations: z.number().int().default(100),
    max_execution_time: z.number().int().default(600),
    max_cost: z.number().default(0),
    tool_approval_required: exports.RetrieveAgentRequestToolApprovalRequired$inboundSchema
        .default("respect_tool"),
    tools: z.array(z.lazy(() => exports.RetrieveAgentRequestTools$inboundSchema))
        .optional(),
    evaluators: z.array(z.lazy(() => exports.RetrieveAgentRequestEvaluators$inboundSchema)).optional(),
    guardrails: z.array(z.lazy(() => exports.RetrieveAgentRequestGuardrails$inboundSchema)).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "max_iterations": "maxIterations",
        "max_execution_time": "maxExecutionTime",
        "max_cost": "maxCost",
        "tool_approval_required": "toolApprovalRequired",
    });
});
function retrieveAgentRequestSettingsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestSettings$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestSettings' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestResponseFormatJsonSchema$inboundSchema = z.object({
    description: z.string().optional(),
    name: z.string(),
    schema: z.any().optional(),
    strict: z.boolean().default(false),
});
function retrieveAgentRequestResponseFormatJsonSchemaFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestResponseFormatJsonSchema$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestResponseFormatJsonSchema' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestResponseFormatAgentsJSONSchema$inboundSchema = z.object({
    type: z.literal("json_schema"),
    json_schema: z.lazy(() => exports.RetrieveAgentRequestResponseFormatJsonSchema$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "json_schema": "jsonSchema",
    });
});
function retrieveAgentRequestResponseFormatAgentsJSONSchemaFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestResponseFormatAgentsJSONSchema$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestResponseFormatAgentsJSONSchema' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestResponseFormatJSONObject$inboundSchema = z.object({
    type: z.literal("json_object"),
});
function retrieveAgentRequestResponseFormatJSONObjectFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestResponseFormatJSONObject$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestResponseFormatJSONObject' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestResponseFormatText$inboundSchema = z.object({
    type: z.literal("text"),
});
function retrieveAgentRequestResponseFormatTextFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestResponseFormatText$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestResponseFormatText' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestResponseFormat$inboundSchema = z.union([
    z.lazy(() => exports.RetrieveAgentRequestResponseFormatText$inboundSchema),
    z.lazy(() => exports.RetrieveAgentRequestResponseFormatJSONObject$inboundSchema),
    z.lazy(() => exports.RetrieveAgentRequestResponseFormatAgentsJSONSchema$inboundSchema),
]);
function retrieveAgentRequestResponseFormatFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestResponseFormat$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestResponseFormat' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestReasoningEffort$inboundSchema = z.nativeEnum(exports.RetrieveAgentRequestReasoningEffort);
/** @internal */
exports.RetrieveAgentRequestStop$inboundSchema = z.union([z.string(), z.array(z.string())]);
function retrieveAgentRequestStopFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestStop$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestStop' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestThinking$inboundSchema = z.union([
    components.ThinkingConfigDisabledSchema$inboundSchema,
    components.ThinkingConfigEnabledSchema$inboundSchema,
    components.ThinkingConfigAdaptiveSchema$inboundSchema,
]);
function retrieveAgentRequestThinkingFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestThinking$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestThinking' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestToolChoiceType$inboundSchema = z.nativeEnum(exports.RetrieveAgentRequestToolChoiceType);
/** @internal */
exports.RetrieveAgentRequestToolChoiceFunction$inboundSchema = z.object({
    name: z.string(),
});
function retrieveAgentRequestToolChoiceFunctionFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestToolChoiceFunction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestToolChoiceFunction' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestToolChoice2$inboundSchema = z.object({
    type: exports.RetrieveAgentRequestToolChoiceType$inboundSchema.optional(),
    function: z.lazy(() => exports.RetrieveAgentRequestToolChoiceFunction$inboundSchema),
});
function retrieveAgentRequestToolChoice2FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestToolChoice2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestToolChoice2' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestToolChoice1$inboundSchema = z.nativeEnum(exports.RetrieveAgentRequestToolChoice1);
/** @internal */
exports.RetrieveAgentRequestToolChoice$inboundSchema = z.union([
    z.lazy(() => exports.RetrieveAgentRequestToolChoice2$inboundSchema),
    exports.RetrieveAgentRequestToolChoice1$inboundSchema,
]);
function retrieveAgentRequestToolChoiceFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestToolChoice$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestToolChoice' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestModalities$inboundSchema = z.nativeEnum(exports.RetrieveAgentRequestModalities);
/** @internal */
exports.RetrieveAgentRequestId1$inboundSchema = z.nativeEnum(exports.RetrieveAgentRequestId1);
/** @internal */
exports.RetrieveAgentRequestId$inboundSchema = z.union([exports.RetrieveAgentRequestId1$inboundSchema, z.string()]);
function retrieveAgentRequestIdFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestId$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestId' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestAgentsResponseExecuteOn$inboundSchema = z
    .nativeEnum(exports.RetrieveAgentRequestAgentsResponseExecuteOn);
/** @internal */
exports.RetrieveAgentRequestAgentsGuardrails$inboundSchema = z.object({
    id: z.union([exports.RetrieveAgentRequestId1$inboundSchema, z.string()]),
    execute_on: exports.RetrieveAgentRequestAgentsResponseExecuteOn$inboundSchema,
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "execute_on": "executeOn",
    });
});
function retrieveAgentRequestAgentsGuardrailsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestAgentsGuardrails$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestAgentsGuardrails' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestFallbacks$inboundSchema = z.object({
    model: z.string(),
});
function retrieveAgentRequestFallbacksFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestFallbacks$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestFallbacks' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestAgentsType$inboundSchema = z.nativeEnum(exports.RetrieveAgentRequestAgentsType);
/** @internal */
exports.RetrieveAgentRequestCache$inboundSchema = z.object({
    ttl: z.number().default(1800),
    type: exports.RetrieveAgentRequestAgentsType$inboundSchema,
});
function retrieveAgentRequestCacheFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestCache$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestCache' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestLoadBalancerType$inboundSchema = z.nativeEnum(exports.RetrieveAgentRequestLoadBalancerType);
/** @internal */
exports.RetrieveAgentRequestLoadBalancerModels$inboundSchema = z.object({
    model: z.string(),
    weight: z.number().default(0.5),
});
function retrieveAgentRequestLoadBalancerModelsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestLoadBalancerModels$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestLoadBalancerModels' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestLoadBalancer1$inboundSchema = z.object({
    type: exports.RetrieveAgentRequestLoadBalancerType$inboundSchema,
    models: z.array(z.lazy(() => exports.RetrieveAgentRequestLoadBalancerModels$inboundSchema)),
});
function retrieveAgentRequestLoadBalancer1FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestLoadBalancer1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestLoadBalancer1' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestLoadBalancer$inboundSchema = z.lazy(() => exports.RetrieveAgentRequestLoadBalancer1$inboundSchema);
function retrieveAgentRequestLoadBalancerFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestLoadBalancer$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestLoadBalancer' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestTimeout$inboundSchema = z.object({
    call_timeout: z.number(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "call_timeout": "callTimeout",
    });
});
function retrieveAgentRequestTimeoutFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestTimeout$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestTimeout' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestParameters$inboundSchema = z.object({
    name: z.string().optional(),
    frequency_penalty: z.nullable(z.number()).optional(),
    max_tokens: z.nullable(z.number().int()).optional(),
    max_completion_tokens: z.nullable(z.number().int()).optional(),
    presence_penalty: z.nullable(z.number()).optional(),
    response_format: z.union([
        z.lazy(() => exports.RetrieveAgentRequestResponseFormatText$inboundSchema),
        z.lazy(() => exports.RetrieveAgentRequestResponseFormatJSONObject$inboundSchema),
        z.lazy(() => exports.RetrieveAgentRequestResponseFormatAgentsJSONSchema$inboundSchema),
    ]).optional(),
    reasoning_effort: exports.RetrieveAgentRequestReasoningEffort$inboundSchema
        .optional(),
    verbosity: z.string().optional(),
    seed: z.nullable(z.number()).optional(),
    stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
    thinking: z.union([
        components.ThinkingConfigDisabledSchema$inboundSchema,
        components.ThinkingConfigEnabledSchema$inboundSchema,
        components.ThinkingConfigAdaptiveSchema$inboundSchema,
    ]).optional(),
    temperature: z.nullable(z.number()).optional(),
    top_p: z.nullable(z.number()).optional(),
    top_k: z.nullable(z.number()).optional(),
    tool_choice: z.union([
        z.lazy(() => exports.RetrieveAgentRequestToolChoice2$inboundSchema),
        exports.RetrieveAgentRequestToolChoice1$inboundSchema,
    ]).optional(),
    parallel_tool_calls: z.boolean().optional(),
    modalities: z.nullable(z.array(exports.RetrieveAgentRequestModalities$inboundSchema))
        .optional(),
    guardrails: z.array(z.lazy(() => exports.RetrieveAgentRequestAgentsGuardrails$inboundSchema)).optional(),
    fallbacks: z.array(z.lazy(() => exports.RetrieveAgentRequestFallbacks$inboundSchema))
        .optional(),
    cache: z.lazy(() => exports.RetrieveAgentRequestCache$inboundSchema).optional(),
    load_balancer: z.lazy(() => exports.RetrieveAgentRequestLoadBalancer1$inboundSchema)
        .optional(),
    timeout: z.lazy(() => exports.RetrieveAgentRequestTimeout$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "frequency_penalty": "frequencyPenalty",
        "max_tokens": "maxTokens",
        "max_completion_tokens": "maxCompletionTokens",
        "presence_penalty": "presencePenalty",
        "response_format": "responseFormat",
        "reasoning_effort": "reasoningEffort",
        "top_p": "topP",
        "top_k": "topK",
        "tool_choice": "toolChoice",
        "parallel_tool_calls": "parallelToolCalls",
        "load_balancer": "loadBalancer",
    });
});
function retrieveAgentRequestParametersFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestParameters$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestParameters' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestRetry$inboundSchema = z.object({
    count: z.number().default(3),
    on_codes: z.array(z.number()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "on_codes": "onCodes",
    });
});
function retrieveAgentRequestRetryFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestRetry$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestRetry' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestResponseFormatAgentsResponseJsonSchema$inboundSchema = z.object({
    description: z.string().optional(),
    name: z.string(),
    schema: z.any().optional(),
    strict: z.boolean().default(false),
});
function retrieveAgentRequestResponseFormatAgentsResponseJsonSchemaFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestResponseFormatAgentsResponseJsonSchema$inboundSchema
        .parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestResponseFormatAgentsResponseJsonSchema' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema$inboundSchema = z.object({
    type: z.literal("json_schema"),
    json_schema: z.lazy(() => exports.RetrieveAgentRequestResponseFormatAgentsResponseJsonSchema$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "json_schema": "jsonSchema",
    });
});
function retrieveAgentRequestResponseFormatAgentsResponse200JSONSchemaFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema$inboundSchema
        .parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestResponseFormatAgentsJSONObject$inboundSchema = z.object({
    type: z.literal("json_object"),
});
function retrieveAgentRequestResponseFormatAgentsJSONObjectFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestResponseFormatAgentsJSONObject$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestResponseFormatAgentsJSONObject' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestResponseFormatAgentsText$inboundSchema = z.object({
    type: z.literal("text"),
});
function retrieveAgentRequestResponseFormatAgentsTextFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestResponseFormatAgentsText$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestResponseFormatAgentsText' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestFallbackModelConfigurationResponseFormat$inboundSchema = z.union([
    z.lazy(() => exports.RetrieveAgentRequestResponseFormatAgentsText$inboundSchema),
    z.lazy(() => exports.RetrieveAgentRequestResponseFormatAgentsJSONObject$inboundSchema),
    z.lazy(() => exports.RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema$inboundSchema),
]);
function retrieveAgentRequestFallbackModelConfigurationResponseFormatFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestFallbackModelConfigurationResponseFormat$inboundSchema
        .parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationResponseFormat' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestFallbackModelConfigurationReasoningEffort$inboundSchema = z.nativeEnum(exports.RetrieveAgentRequestFallbackModelConfigurationReasoningEffort);
/** @internal */
exports.RetrieveAgentRequestFallbackModelConfigurationStop$inboundSchema = z.union([z.string(), z.array(z.string())]);
function retrieveAgentRequestFallbackModelConfigurationStopFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestFallbackModelConfigurationStop$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationStop' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestFallbackModelConfigurationThinking$inboundSchema = z.union([
    components.ThinkingConfigDisabledSchema$inboundSchema,
    components.ThinkingConfigEnabledSchema$inboundSchema,
    components.ThinkingConfigAdaptiveSchema$inboundSchema,
]);
function retrieveAgentRequestFallbackModelConfigurationThinkingFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestFallbackModelConfigurationThinking$inboundSchema
        .parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationThinking' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestToolChoiceAgentsType$inboundSchema = z
    .nativeEnum(exports.RetrieveAgentRequestToolChoiceAgentsType);
/** @internal */
exports.RetrieveAgentRequestToolChoiceAgentsFunction$inboundSchema = z.object({
    name: z.string(),
});
function retrieveAgentRequestToolChoiceAgentsFunctionFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestToolChoiceAgentsFunction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestToolChoiceAgentsFunction' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestToolChoiceAgents2$inboundSchema = z.object({
    type: exports.RetrieveAgentRequestToolChoiceAgentsType$inboundSchema.optional(),
    function: z.lazy(() => exports.RetrieveAgentRequestToolChoiceAgentsFunction$inboundSchema),
});
function retrieveAgentRequestToolChoiceAgents2FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestToolChoiceAgents2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestToolChoiceAgents2' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestToolChoiceAgents1$inboundSchema = z.nativeEnum(exports.RetrieveAgentRequestToolChoiceAgents1);
/** @internal */
exports.RetrieveAgentRequestFallbackModelConfigurationToolChoice$inboundSchema = z.union([
    z.lazy(() => exports.RetrieveAgentRequestToolChoiceAgents2$inboundSchema),
    exports.RetrieveAgentRequestToolChoiceAgents1$inboundSchema,
]);
function retrieveAgentRequestFallbackModelConfigurationToolChoiceFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestFallbackModelConfigurationToolChoice$inboundSchema
        .parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationToolChoice' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestFallbackModelConfigurationModalities$inboundSchema = z.nativeEnum(exports.RetrieveAgentRequestFallbackModelConfigurationModalities);
/** @internal */
exports.RetrieveAgentRequestIdAgents1$inboundSchema = z.nativeEnum(exports.RetrieveAgentRequestIdAgents1);
/** @internal */
exports.RetrieveAgentRequestFallbackModelConfigurationId$inboundSchema = z.union([exports.RetrieveAgentRequestIdAgents1$inboundSchema, z.string()]);
function retrieveAgentRequestFallbackModelConfigurationIdFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestFallbackModelConfigurationId$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationId' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestFallbackModelConfigurationExecuteOn$inboundSchema = z.nativeEnum(exports.RetrieveAgentRequestFallbackModelConfigurationExecuteOn);
/** @internal */
exports.RetrieveAgentRequestFallbackModelConfigurationGuardrails$inboundSchema = z.object({
    id: z.union([exports.RetrieveAgentRequestIdAgents1$inboundSchema, z.string()]),
    execute_on: exports.RetrieveAgentRequestFallbackModelConfigurationExecuteOn$inboundSchema,
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "execute_on": "executeOn",
    });
});
function retrieveAgentRequestFallbackModelConfigurationGuardrailsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestFallbackModelConfigurationGuardrails$inboundSchema
        .parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationGuardrails' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestFallbackModelConfigurationFallbacks$inboundSchema = z.object({
    model: z.string(),
});
function retrieveAgentRequestFallbackModelConfigurationFallbacksFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestFallbackModelConfigurationFallbacks$inboundSchema
        .parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationFallbacks' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestFallbackModelConfigurationType$inboundSchema = z
    .nativeEnum(exports.RetrieveAgentRequestFallbackModelConfigurationType);
/** @internal */
exports.RetrieveAgentRequestFallbackModelConfigurationCache$inboundSchema = z.object({
    ttl: z.number().default(1800),
    type: exports.RetrieveAgentRequestFallbackModelConfigurationType$inboundSchema,
});
function retrieveAgentRequestFallbackModelConfigurationCacheFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestFallbackModelConfigurationCache$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationCache' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestLoadBalancerAgentsType$inboundSchema = z
    .nativeEnum(exports.RetrieveAgentRequestLoadBalancerAgentsType);
/** @internal */
exports.RetrieveAgentRequestLoadBalancerAgentsModels$inboundSchema = z.object({
    model: z.string(),
    weight: z.number().default(0.5),
});
function retrieveAgentRequestLoadBalancerAgentsModelsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestLoadBalancerAgentsModels$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestLoadBalancerAgentsModels' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestLoadBalancerAgents1$inboundSchema = z.object({
    type: exports.RetrieveAgentRequestLoadBalancerAgentsType$inboundSchema,
    models: z.array(z.lazy(() => exports.RetrieveAgentRequestLoadBalancerAgentsModels$inboundSchema)),
});
function retrieveAgentRequestLoadBalancerAgents1FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestLoadBalancerAgents1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestLoadBalancerAgents1' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestFallbackModelConfigurationLoadBalancer$inboundSchema = z.lazy(() => exports.RetrieveAgentRequestLoadBalancerAgents1$inboundSchema);
function retrieveAgentRequestFallbackModelConfigurationLoadBalancerFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestFallbackModelConfigurationLoadBalancer$inboundSchema
        .parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationLoadBalancer' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestFallbackModelConfigurationTimeout$inboundSchema = z.object({
    call_timeout: z.number(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "call_timeout": "callTimeout",
    });
});
function retrieveAgentRequestFallbackModelConfigurationTimeoutFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestFallbackModelConfigurationTimeout$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationTimeout' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestFallbackModelConfigurationParameters$inboundSchema = z.object({
    name: z.string().optional(),
    frequency_penalty: z.nullable(z.number()).optional(),
    max_tokens: z.nullable(z.number().int()).optional(),
    max_completion_tokens: z.nullable(z.number().int()).optional(),
    presence_penalty: z.nullable(z.number()).optional(),
    response_format: z.union([
        z.lazy(() => exports.RetrieveAgentRequestResponseFormatAgentsText$inboundSchema),
        z.lazy(() => exports.RetrieveAgentRequestResponseFormatAgentsJSONObject$inboundSchema),
        z.lazy(() => exports.RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema$inboundSchema),
    ]).optional(),
    reasoning_effort: exports.RetrieveAgentRequestFallbackModelConfigurationReasoningEffort$inboundSchema
        .optional(),
    verbosity: z.string().optional(),
    seed: z.nullable(z.number()).optional(),
    stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
    thinking: z.union([
        components.ThinkingConfigDisabledSchema$inboundSchema,
        components.ThinkingConfigEnabledSchema$inboundSchema,
        components.ThinkingConfigAdaptiveSchema$inboundSchema,
    ]).optional(),
    temperature: z.nullable(z.number()).optional(),
    top_p: z.nullable(z.number()).optional(),
    top_k: z.nullable(z.number()).optional(),
    tool_choice: z.union([
        z.lazy(() => exports.RetrieveAgentRequestToolChoiceAgents2$inboundSchema),
        exports.RetrieveAgentRequestToolChoiceAgents1$inboundSchema,
    ]).optional(),
    parallel_tool_calls: z.boolean().optional(),
    modalities: z.nullable(z.array(exports.RetrieveAgentRequestFallbackModelConfigurationModalities$inboundSchema)).optional(),
    guardrails: z.array(z.lazy(() => exports.RetrieveAgentRequestFallbackModelConfigurationGuardrails$inboundSchema)).optional(),
    fallbacks: z.array(z.lazy(() => exports.RetrieveAgentRequestFallbackModelConfigurationFallbacks$inboundSchema)).optional(),
    cache: z.lazy(() => exports.RetrieveAgentRequestFallbackModelConfigurationCache$inboundSchema).optional(),
    load_balancer: z.lazy(() => exports.RetrieveAgentRequestLoadBalancerAgents1$inboundSchema).optional(),
    timeout: z.lazy(() => exports.RetrieveAgentRequestFallbackModelConfigurationTimeout$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "frequency_penalty": "frequencyPenalty",
        "max_tokens": "maxTokens",
        "max_completion_tokens": "maxCompletionTokens",
        "presence_penalty": "presencePenalty",
        "response_format": "responseFormat",
        "reasoning_effort": "reasoningEffort",
        "top_p": "topP",
        "top_k": "topK",
        "tool_choice": "toolChoice",
        "parallel_tool_calls": "parallelToolCalls",
        "load_balancer": "loadBalancer",
    });
});
function retrieveAgentRequestFallbackModelConfigurationParametersFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestFallbackModelConfigurationParameters$inboundSchema
        .parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationParameters' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestFallbackModelConfigurationRetry$inboundSchema = z.object({
    count: z.number().default(3),
    on_codes: z.array(z.number()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "on_codes": "onCodes",
    });
});
function retrieveAgentRequestFallbackModelConfigurationRetryFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestFallbackModelConfigurationRetry$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationRetry' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestFallbackModelConfiguration2$inboundSchema = z.object({
    id: z.string(),
    parameters: z.lazy(() => exports.RetrieveAgentRequestFallbackModelConfigurationParameters$inboundSchema).optional(),
    retry: z.lazy(() => exports.RetrieveAgentRequestFallbackModelConfigurationRetry$inboundSchema).optional(),
});
function retrieveAgentRequestFallbackModelConfiguration2FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestFallbackModelConfiguration2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestFallbackModelConfiguration2' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestFallbackModelConfiguration$inboundSchema = z.union([
    z.lazy(() => exports.RetrieveAgentRequestFallbackModelConfiguration2$inboundSchema),
    z.string(),
]);
function retrieveAgentRequestFallbackModelConfigurationFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestFallbackModelConfiguration$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestFallbackModelConfiguration' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestModel$inboundSchema = z.object({
    id: z.string(),
    integration_id: z.nullable(z.string()).optional(),
    parameters: z.lazy(() => exports.RetrieveAgentRequestParameters$inboundSchema)
        .optional(),
    retry: z.lazy(() => exports.RetrieveAgentRequestRetry$inboundSchema).optional(),
    fallback_models: z.nullable(z.array(z.union([
        z.lazy(() => exports.RetrieveAgentRequestFallbackModelConfiguration2$inboundSchema),
        z.string(),
    ]))).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "integration_id": "integrationId",
        "fallback_models": "fallbackModels",
    });
});
function retrieveAgentRequestModelFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestModel$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestModel' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestHeaders$inboundSchema = z.object({
    value: z.string(),
    encrypted: z.boolean().default(false),
});
function retrieveAgentRequestHeadersFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestHeaders$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestHeaders' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestA2AAgentConfiguration$inboundSchema = z.object({
    agent_url: z.string(),
    card_url: z.string().optional(),
    headers: z.record(z.lazy(() => exports.RetrieveAgentRequestHeaders$inboundSchema))
        .optional(),
    cached_card: z.any().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "agent_url": "agentUrl",
        "card_url": "cardUrl",
        "cached_card": "cachedCard",
    });
});
function retrieveAgentRequestA2AAgentConfigurationFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestA2AAgentConfiguration$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestA2AAgentConfiguration' from JSON`);
}
/** @internal */
exports.RetrieveAgentRequestResponseBody$inboundSchema = z.object({
    _id: z.string(),
    key: z.string(),
    display_name: z.string().optional(),
    project_id: z.string(),
    created_by_id: z.nullable(z.string()).optional(),
    updated_by_id: z.nullable(z.string()).optional(),
    created: z.string().optional(),
    updated: z.string().optional(),
    status: exports.RetrieveAgentRequestStatus$inboundSchema,
    version: z.string().optional(),
    version_hash: z.string().optional(),
    path: z.string(),
    memory_stores: z.array(z.string()).optional(),
    team_of_agents: z.array(z.lazy(() => exports.RetrieveAgentRequestTeamOfAgents$inboundSchema)).optional(),
    metrics: z.lazy(() => exports.RetrieveAgentRequestMetrics$inboundSchema).optional(),
    variables: z.record(z.any()).optional(),
    knowledge_bases: z.array(z.lazy(() => exports.RetrieveAgentRequestKnowledgeBases$inboundSchema)).optional(),
    source: exports.RetrieveAgentRequestSource$inboundSchema.optional(),
    type: exports.RetrieveAgentRequestType$inboundSchema.default("internal"),
    role: z.string(),
    description: z.string(),
    system_prompt: z.string().optional(),
    instructions: z.string(),
    settings: z.lazy(() => exports.RetrieveAgentRequestSettings$inboundSchema).optional(),
    model: z.lazy(() => exports.RetrieveAgentRequestModel$inboundSchema),
    a2a: z.lazy(() => exports.RetrieveAgentRequestA2AAgentConfiguration$inboundSchema)
        .optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "_id": "id",
        "display_name": "displayName",
        "project_id": "projectId",
        "created_by_id": "createdById",
        "updated_by_id": "updatedById",
        "version_hash": "versionHash",
        "memory_stores": "memoryStores",
        "team_of_agents": "teamOfAgents",
        "knowledge_bases": "knowledgeBases",
        "system_prompt": "systemPrompt",
    });
});
function retrieveAgentRequestResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveAgentRequestResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveAgentRequestResponseBody' from JSON`);
}
//# sourceMappingURL=retrieveagentrequest.js.map