"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.Models = void 0;
const modelsAzureFoundryDeployments_js_1 = require("../funcs/modelsAzureFoundryDeployments.js");
const modelsCreate_js_1 = require("../funcs/modelsCreate.js");
const modelsCreateAutorouter_js_1 = require("../funcs/modelsCreateAutorouter.js");
const modelsCreateAwsBedrock_js_1 = require("../funcs/modelsCreateAwsBedrock.js");
const modelsCreateOpenaiLike_js_1 = require("../funcs/modelsCreateOpenaiLike.js");
const modelsCreateVertex_js_1 = require("../funcs/modelsCreateVertex.js");
const modelsDelete_js_1 = require("../funcs/modelsDelete.js");
const modelsDisable_js_1 = require("../funcs/modelsDisable.js");
const modelsEnable_js_1 = require("../funcs/modelsEnable.js");
const modelsImportLitellm_js_1 = require("../funcs/modelsImportLitellm.js");
const modelsList_js_1 = require("../funcs/modelsList.js");
const modelsListLitellm_js_1 = require("../funcs/modelsListLitellm.js");
const modelsUpdate_js_1 = require("../funcs/modelsUpdate.js");
const modelsUpdateAutorouter_js_1 = require("../funcs/modelsUpdateAutorouter.js");
const modelsUpdateAwsBedrock_js_1 = require("../funcs/modelsUpdateAwsBedrock.js");
const modelsUpdateOpenaiLike_js_1 = require("../funcs/modelsUpdateOpenaiLike.js");
const modelsValidate_js_1 = require("../funcs/modelsValidate.js");
const modelsValidateAwsBedrock_js_1 = require("../funcs/modelsValidateAwsBedrock.js");
const sdks_js_1 = require("../lib/sdks.js");
const fp_js_1 = require("../types/fp.js");
class Models extends sdks_js_1.ClientSDK {
    /**
     * Create custom model
     *
     * @remarks
     * Creates a new custom model for the workspace. Provider credentials in the configuration are encrypted using the workspace encryption key before being persisted.
     */
    async create(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, modelsCreate_js_1.modelsCreate)(this, request, options));
    }
    /**
     * Create autorouter custom model
     *
     * @remarks
     * Creates an autorouter model that routes between a strong and economical source model based on the requested profile. Both source models must already exist for the workspace and be marked autorouter-eligible in master data.
     */
    async createAutorouter(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, modelsCreateAutorouter_js_1.modelsCreateAutorouter)(this, request, options));
    }
    /**
     * Update autorouter custom model
     *
     * @remarks
     * Re-configures an autorouter model. Each of key/strong_model/economical_model/profile falls back to the existing value when omitted. Changing the key enforces uniqueness and rewrites PRICING_KV.
     */
    async updateAutorouter(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, modelsUpdateAutorouter_js_1.modelsUpdateAutorouter)(this, request, options));
    }
    /**
     * Create AWS Bedrock custom model
     *
     * @remarks
     * Registers an AWS Bedrock inference profile as a custom model for the workspace. Credentials are resolved at request time via either the integration reference or pod-identity — nothing is stored with the model.
     */
    async createAwsBedrock(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, modelsCreateAwsBedrock_js_1.modelsCreateAwsBedrock)(this, request, options));
    }
    /**
     * Validate AWS Bedrock inference profile
     *
     * @remarks
     * Performs a live Bedrock Converse probe to verify the inference profile ARN and credentials, then best-effort enriches the response from known system models.
     */
    async validateAwsBedrock(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, modelsValidateAwsBedrock_js_1.modelsValidateAwsBedrock)(this, request, options));
    }
    /**
     * Update AWS Bedrock custom model
     *
     * @remarks
     * Updates an AWS Bedrock custom model. ARN changes are format-validated (live AWS validation lives in the dedicated validate endpoint). Configuration and metadata are spread-merged. Parameters are replaced only when the request produces a non-empty list.
     */
    async updateAwsBedrock(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, modelsUpdateAwsBedrock_js_1.modelsUpdateAwsBedrock)(this, request, options));
    }
    /**
     * List Azure Foundry deployments under a resource
     *
     * @remarks
     * Lists Azure Foundry deployments under the given base_url and joins each entry with the Orq master-data row. Only OpenAI-developed deployments in succeeded state with chat/completion/embedding/vision model types are returned.
     */
    async azureFoundryDeployments(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, modelsAzureFoundryDeployments_js_1.modelsAzureFoundryDeployments)(this, request, options));
    }
    /**
     * Import models from LiteLLM
     *
     * @remarks
     * Bulk-imports a list of LiteLLM model definitions into the workspace model garden.
     */
    async importLitellm(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, modelsImportLitellm_js_1.modelsImportLitellm)(this, request, options));
    }
    /**
     * List models from configured LiteLLM instance
     *
     * @remarks
     * Fetches the list of models from the LiteLLM instance configured for the workspace. Requires a stored LiteLLM integration.
     */
    async listLitellm(options) {
        return (0, fp_js_1.unwrapAsync)((0, modelsListLitellm_js_1.modelsListLitellm)(this, options));
    }
    /**
     * Create OpenAI-compatible custom model
     *
     * @remarks
     * Creates a custom model backed by any OpenAI-compatible endpoint. The handler probes the target API with the supplied credentials before persisting the model.
     */
    async createOpenaiLike(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, modelsCreateOpenaiLike_js_1.modelsCreateOpenaiLike)(this, request, options));
    }
    /**
     * Update OpenAI-compatible custom model
     *
     * @remarks
     * Updates an OpenAI-compatible custom model. Live-re-probes the target API when base_url or model_id changes, using the stored encrypted api_key. Metadata is merged (existing preserved, new overrides).
     */
    async updateOpenaiLike(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, modelsUpdateOpenaiLike_js_1.modelsUpdateOpenaiLike)(this, request, options));
    }
    /**
     * Validate model endpoint
     *
     * @remarks
     * Validates a provider endpoint by performing a minimal live probe. Currently supports Azure OpenAI. Response includes the resolved region, whether the model is known to Orq, and either the full model document or a synthesized default.
     */
    async validate(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, modelsValidate_js_1.modelsValidate)(this, request, options));
    }
    /**
     * Create Vertex AI custom model
     *
     * @remarks
     * Registers a Google Vertex AI model as a custom model for the workspace. The service account credentials are probed against Vertex AI with a minimal GenerateContent call before persisting.
     */
    async createVertex(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, modelsCreateVertex_js_1.modelsCreateVertex)(this, request, options));
    }
    /**
     * Delete custom model
     *
     * @remarks
     * Deletes a custom model from the workspace. System models cannot be deleted. Returns 200 with an explanatory message if the model is a system model or is still referenced by experiments.
     */
    async delete(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, modelsDelete_js_1.modelsDelete)(this, request, options));
    }
    /**
     * Update custom model
     *
     * @remarks
     * Updates a custom model. Only fields present in the request body are modified, except for `metadata` and `parameters`, which are fully replaced when present (preserved from the legacy handler's behavior).
     */
    async update(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, modelsUpdate_js_1.modelsUpdate)(this, request, options));
    }
    /**
     * Enable model for workspace
     *
     * @remarks
     * Adds the model to the workspace's enabled set. Idempotent — re-enabling an already-enabled model returns 204 with no state change.
     */
    async enable(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, modelsEnable_js_1.modelsEnable)(this, request, options));
    }
    /**
     * Disable model for workspace
     *
     * @remarks
     * Removes the model from the workspace's enabled set. Idempotent — disabling an already-disabled model returns 204.
     */
    async disable(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, modelsDisable_js_1.modelsDisable)(this, request, options));
    }
    /**
     * List models
     *
     * @remarks
     * Lists all models available through the AI Router. Returns each model in OpenAI-compatible shape with its provider, ID, and creation timestamp.
     */
    async list(options) {
        return (0, fp_js_1.unwrapAsync)((0, modelsList_js_1.modelsList)(this, options));
    }
}
exports.Models = Models;
//# sourceMappingURL=models.js.map