import type { IncomingMessage } from 'node:http'; export declare function readBody(req: IncomingMessage): Promise; export declare function getDefaultApiBase(type: 'anthropic' | 'openai' | 'openai-responses'): string; /** * 去除 api_base 末尾多余的 /v1 路径段,避免拼接 URL 时出现重复 /v1。 * 例如: * 'https://api.example.com/v1' → 'https://api.example.com' * 'https://api.example.com/v1/' → 'https://api.example.com' * 'https://api.example.com' → 'https://api.example.com'(不变) * 'https://api.example.com/' → 'https://api.example.com'(仅去末尾斜杠) */ /** * 脱敏 URL 中的认证信息。 */ export declare function maskUrl(url: string): string; /** * 脱敏请求头中的敏感字段(Authorization / x-api-key)。 */ export declare function maskHeaders(headers: Record): Record; export declare function sanitizeApiBase(base: string): string; //# sourceMappingURL=http-utils.d.ts.map