/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { llmModelsPutOrgAutoModel } from "../../funcs/llmModelsPutOrgAutoModel.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations.PutOrgAutoModelRequest$inboundSchema, }; export const tool$llmModelsPutOrgAutoModel: ToolDefinition = { name: "llm-models-put-org-auto-model", description: `Set this org's auto-model override for an endpoint Stores \`{ endpoint → modelId }\` so subsequent requests with \`model: "auto"\` for the endpoint resolve to \`modelId\` instead of the operator's YAML default. The target must (a) not be the literal string \`"auto"\`, (b) be active in this org's model registry, and (c) have the same \`apiFormat\` as the endpoint.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await llmModelsPutOrgAutoModel( client, args.request, { fetchOptions: { signal: ctx.signal } }, ).$inspect(); if (!result.ok) { return { content: [{ type: "text", text: result.error.message }], isError: true, }; } const value = result.value; return formatResult(value, apiCall); }, };