import http from 'http'; /** * Local HTTP server expose CLIProxyAPI-compatible endpoints: * - POST /v1/chat/completions (OpenAI-compatible → Codex/xAI) * - POST /v1/messages (Claude-compatible) * - POST /v1beta/models/*action (Gemini) * - Generic POST /llm/:provider/* (passthrough cho mọi provider) * * Mục đích: Cursor/Cline trên máy user có thể trỏ tới `http://localhost:8317` * để dùng quota OAuth Pro của user — thay thế CLIProxyAPI. * * Auth: yêu cầu `Authorization: Bearer ` (random sinh ở start, * hoặc user truyền vào qua `--api-key`). */ export interface ServeOpts { port: number; host: string; /** API key dùng để client local auth. Random nếu không truyền. */ apiKey: string; } export declare function startHttpServer(opts: ServeOpts): http.Server; export declare function generateApiKey(): string;