/** * Model Service * * Service for managing LLM model configurations. * Models can be referenced by tag in agent definitions for centralized * API key management and configuration. */ import ProductBuilder from '../products/services/products.service'; import { IProductLLMModel } from '../types/productsBuilder.types'; /** * Configuration for ModelService */ export interface IModelServiceConfig { workspace_id: string; user_id: string; env_type: string; } /** * Input for creating a model */ export interface ICreateModelInput extends Omit { product: string; } /** * Input for updating a model */ export interface IUpdateModelInput extends Partial> { product: string; tag: string; } /** * Input for fetching a model */ export interface IFetchModelInput { product: string; tag: string; } /** * Input for fetching all models */ export interface IFetchAllModelsInput { product: string; } /** * Input for deleting a model */ export interface IDeleteModelInput { product: string; tag: string; } /** * Model Service * * Provides CRUD operations for LLM model configurations. */ export declare class ModelService { private config; private productBuilders; private getProductBuilder; constructor(config: IModelServiceConfig, getProductBuilder: (productTag: string) => Promise); /** * Update service configuration */ updateConfig(config: IModelServiceConfig): void; /** * Create a new LLM model configuration * * @example * ```typescript * await ductape.model.create({ * product: 'my-product', * tag: 'claude-sonnet', * name: 'Claude Sonnet', * provider: 'anthropic', * model: 'claude-sonnet-4-20250514', * temperature: 0.7, * envs: [ * { slug: 'dev', apiKey: process.env.ANTHROPIC_API_KEY }, * { slug: 'prd', apiKey: process.env.ANTHROPIC_PROD_KEY }, * ], * }); * ``` */ create(input: ICreateModelInput): Promise; /** * Update an existing LLM model configuration * * @example * ```typescript * await ductape.model.update({ * product: 'my-product', * tag: 'claude-sonnet', * temperature: 0.5, * envs: [ * { slug: 'prd', apiKey: 'new-api-key' }, * ], * }); * ``` */ update(input: IUpdateModelInput): Promise; /** * Fetch a specific LLM model configuration by tag * * @example * ```typescript * const model = await ductape.model.fetch({ * product: 'my-product', * tag: 'claude-sonnet', * }); * ``` */ fetch(input: IFetchModelInput): Promise; /** * Fetch all LLM model configurations for a product * * @example * ```typescript * const models = await ductape.model.fetchAll({ * product: 'my-product', * }); * ``` */ fetchAll(input: IFetchAllModelsInput): Promise; /** * Delete an LLM model configuration * * @example * ```typescript * await ductape.model.delete({ * product: 'my-product', * tag: 'claude-sonnet', * }); * ``` */ delete(input: IDeleteModelInput): Promise; } export default ModelService;