import { requestClient } from '#/api/request';

/** AI 厂商模型 API */
const prefix = 'ai-model/';

export async function getAiModelList(data: any) {
  return requestClient.get<any>(`${prefix}list`, { params: data });
}

export async function getAiModelOption(data?: { platform_id?: number }) {
  return requestClient.get<any>(`${prefix}option`, { params: data || {} });
}

export async function createAiModel(data: Record<string, any>) {
  return requestClient.post<any>(`${prefix}create`, data);
}

export async function updateAiModel(data: Record<string, any>) {
  return requestClient.post<any>(`${prefix}update`, data);
}

export async function deleteAiModel(data: Record<string, any>) {
  return requestClient.post<any>(`${prefix}delete`, data);
}

/** 设为平台默认模型 */
export async function setAiModelDefault(data: { id: number }) {
  return requestClient.post<any>(`${prefix}set-default`, data);
}
