/** * Routes 共享工具函数 */ import type { ProviderConfig } from '../../config.js'; /** * 解析请求体中的模型参数 * 返回 { model, modelGroup, stream } */ export declare function parseModelParams(body: any): { model: string | undefined; modelGroup: string | undefined; stream: boolean; }; /** * 验证模型参数互斥 */ export declare function validateModelMutualExclusion(model: string | undefined, modelGroup: string | undefined): string | null; /** * 创建错误响应 */ export declare function createErrorResponse(message: string, type?: string): { error: { message: string; type: string; }; }; /** * 解析错误消息 */ export declare function parseErrorMessage(error: any): string; /** * 从 ProviderConfig[] 中查找模型对应的 Provider */ export declare function findModelProvider(providers: ProviderConfig[], model: string): ProviderConfig | null; //# sourceMappingURL=helpers.d.ts.map