import { IResponseInfo } from '../interfaces'; /** 模型状态,1:开启,2:关闭 */ export type AIModelStatus = 1 | 2; /** AI 模型信息 */ export interface AIModel { /** 模型名,示例值:huanyuan-v1 */ Model?: string; /** 是否开启 MCP,示例值:false */ EnableMCP?: boolean; /** 标签 */ Tags?: string[]; } /** AI 模型密钥信息 */ export interface AIModelSecret { /** 密钥来源,示例值:custom */ SecretSource?: string; /** 密钥 ID,和 SecretKey 一一对应 */ SecretId?: string; /** 密钥 Key,和 SecretId 一一对应 */ SecretKey?: string; /** ApiKey,SecretKey 和 ApiKey 二选一 */ ApiKey?: string; } /** AI 模型分组类型 */ export type AIModelGroupType = 'builtin' | 'custom'; /** AI 模型分组信息 */ export interface AIModelGroup { /** * 模型分组 * 枚举值: * - hunyuan-exp * - hunyuan-image * - deepseek * - cloudbase * - custom-xxxx */ GroupName?: string; /** * 模型列表 * 注意:此字段可能返回 null,表示取不到有效值 */ Models?: AIModel[] | null; /** 模型类型:builtin 内置模型分组类别,custom 用户自定义模型分组类别 */ Type?: AIModelGroupType; /** 原始模型类型:builtin 内置模型类型,custom 用户自定义模型类型 */ OriginType?: AIModelGroupType; /** 备注 */ Remark?: string; /** 模型地址 */ BaseUrl?: string; /** 模型状态,1:开启,2:关闭 */ Status?: AIModelStatus; /** * 模型密钥 * 注意:此字段可能返回 null,表示取不到有效值 */ Secret?: AIModelSecret | null; /** 创建时间,ISO8601 格式 */ CreateTime?: string; /** 更新时间,ISO8601 格式 */ UpdateTime?: string; } /** 托管 AI 模型计费类型 */ export type ManagedAIModelChargingType = 'Uniform' | 'Tiered'; /** 托管 AI 模型参数规格 */ export interface ManagedAIModelSpec { /** 最大输入 Token,示例值:192k */ MaxInputToken?: string; /** 最大输出 Token,示例值:32k */ MaxOutputToken?: string; /** 上下文长度,示例值:128k */ ContextLength?: string; } /** 托管 AI 模型计费信息 */ export interface ManagedAIModelChargingInfo { /** 计费类型:Uniform 固定计费,Tiered 分段计费 */ Type?: ManagedAIModelChargingType; /** 分组名称,示例值:0-16k */ Name?: string; /** 输入 Token 价格,示例值:1.2 */ InputPrice?: string; /** 输出 Token 价格,示例值:4 */ OutputPrice?: string; /** 命中缓存价格,示例值:0.4 */ CachePrice?: string; /** 计费单位,示例值:千tokens */ InputOutputUnit?: string; } /** 托管型 AI 模型信息 */ export interface ManagedAIModel { /** 模型名,示例值:hy3-preview */ Model?: string; /** 是否开启 MCP,示例值:true */ EnableMCP?: boolean; /** 模型规格 */ ModelSpec?: ManagedAIModelSpec; /** 模型计费信息 */ ModelChargingInfo?: ManagedAIModelChargingInfo[]; } /** 云开发内置 AI 模型分组信息 */ export interface ManagedAIModelGroup { /** 模型分组,示例值:cloudbase */ GroupName?: string; /** * 模型列表 * 注意:此字段可能返回 null,表示取不到有效值 */ Models?: ManagedAIModel[] | null; /** 备注,示例值:腾讯云开发 */ Remark?: string; } /** * CreateAIModel 用户入参 */ export interface CreateAIModelOptions { /** 环境 ID。不传则使用当前环境 ID */ envId?: string; /** * 分组名 * 入参限制:不允许以 cloudbase 为前缀 */ groupName: string; /** 模型服务地址,示例值:http://xxx */ baseUrl?: string; /** 模型名列表 */ models?: AIModel[]; /** 分组备注 */ remark?: string; /** 模型状态,1:开启,2:关闭 */ status?: AIModelStatus; /** 模型密钥 */ secret?: AIModelSecret; } /** CreateAIModel 返回结果 */ export interface CreateAIModelResp extends IResponseInfo { /** 创建数量 */ Count: number; } /** * UpdateAIModel 用户入参 */ export interface UpdateAIModelOptions { /** 环境 ID。不传则使用当前环境 ID */ envId?: string; /** 分组名 */ groupName: string; /** 模型地址,示例值:http://xxx */ baseUrl?: string; /** * 模型名列表 * 注意:Models 列表更新采用全量替换 */ models?: AIModel[]; /** 备注 */ remark?: string; /** 模型状态,1:开启,2:关闭 */ status?: AIModelStatus; /** 模型密钥 */ secret?: AIModelSecret; } /** UpdateAIModel 返回结果 */ export interface UpdateAIModelResp extends IResponseInfo { /** 更新数量 */ Count: number; } /** * DeleteAIModel 用户入参 */ export interface DeleteAIModelOptions { /** 环境 ID。不传则使用当前环境 ID */ envId?: string; /** 分组名列表 */ groupNames: string[]; } /** DeleteAIModel 返回结果 */ export interface DeleteAIModelResp extends IResponseInfo { /** 成功删除数量 */ Count: number; } /** DescribeAIModels 用户入参 */ export interface DescribeAIModelsOptions { /** 环境 ID。不传则使用当前环境 ID */ envId?: string; } /** DescribeAIModels 返回结果 */ export interface DescribeAIModelsResp extends IResponseInfo { /** * 模型列表 * 注意:此字段可能返回 null,表示取不到有效值 */ AIModels: AIModelGroup[] | null; } /** DescribeManagedAIModelList 用户入参 */ export interface DescribeManagedAIModelListOptions { /** 环境 ID。不传则使用当前环境 ID */ envId?: string; } /** DescribeManagedAIModelList 返回结果 */ export interface DescribeManagedAIModelListResp extends IResponseInfo { /** * 托管模型列表 * 注意:此字段可能返回 null,表示取不到有效值 */ ManagedAIModelList: ManagedAIModelGroup[] | null; }