/** * upstream.ts — Build OpenAI request body and call Copilot endpoint. */ import * as http from 'http'; import type { AnthropicRequest, OpenAIMessage } from './types'; interface OpenAIRequestBody { model: string; messages: OpenAIMessage[]; stream: boolean; max_tokens?: number; temperature?: number; top_p?: number; tools?: Array<{ type: 'function'; function: { name: string; description: string; parameters: Record; }; }>; tool_choice?: string | { type: 'function'; function: { name: string; }; }; } export declare function buildOpenAIRequest(anthropicBody: AnthropicRequest): OpenAIRequestBody; export declare function callCopilot(openaiBody: OpenAIRequestBody | { stream?: boolean; [key: string]: unknown; }, copilotToken: string): Promise; export declare function callCopilotResponses(body: Record, copilotToken: string): Promise; export declare function buildResponsesRequest(anthropicBody: AnthropicRequest): Record; export declare function readBody(req: http.IncomingMessage): Promise; export {};