import { AudioResponse, ChatCompletion, ContentWithToolCallsResponse, EmbeddingResponse, ErrorResponse, FixtureResponse, ImageResponse, ResponseOverrides, SSEChunk, TextResponse, ToolCall, ToolCallResponse, TranscriptionResponse, VideoResponse } from "./types.cjs";
import * as http$1 from "node:http";

//#region src/helpers.d.ts
declare function flattenHeaders(headers: http$1.IncomingHttpHeaders): Record<string, string>;
declare function generateId(prefix?: string): string;
declare function generateToolCallId(): string;
declare function generateMessageId(): string;
declare function generateToolUseId(): string;
declare function isTextResponse(r: FixtureResponse): r is TextResponse;
declare function isToolCallResponse(r: FixtureResponse): r is ToolCallResponse;
declare function isContentWithToolCallsResponse(r: FixtureResponse): r is ContentWithToolCallsResponse;
declare function isErrorResponse(r: FixtureResponse): r is ErrorResponse;
declare function isEmbeddingResponse(r: FixtureResponse): r is EmbeddingResponse;
declare function isImageResponse(r: FixtureResponse): r is ImageResponse;
declare function isAudioResponse(r: FixtureResponse): r is AudioResponse;
/**
 * Map audio format shorthand to MIME content types.
 * Shared between speech, ElevenLabs, and fal audio handlers.
 */
declare const FORMAT_TO_CONTENT_TYPE: Record<string, string>;
/**
 * Resolve a format string (e.g. "mp3", "opus") to its MIME content type.
 * Falls back to "application/octet-stream" for unknown formats.
 */
declare function formatToMime(format: string): string;
declare function isTranscriptionResponse(r: FixtureResponse): r is TranscriptionResponse;
declare function isVideoResponse(r: FixtureResponse): r is VideoResponse;
declare function extractOverrides(response: TextResponse | ToolCallResponse | ContentWithToolCallsResponse): ResponseOverrides;
declare function buildTextChunks(content: string, model: string, chunkSize: number, reasoning?: string, overrides?: ResponseOverrides): SSEChunk[];
declare function buildToolCallChunks(toolCalls: ToolCall[], model: string, chunkSize: number, overrides?: ResponseOverrides): SSEChunk[];
declare function buildTextCompletion(content: string, model: string, reasoning?: string, overrides?: ResponseOverrides): ChatCompletion;
declare function buildToolCallCompletion(toolCalls: ToolCall[], model: string, overrides?: ResponseOverrides): ChatCompletion;
declare function buildContentWithToolCallsChunks(content: string, toolCalls: ToolCall[], model: string, chunkSize: number, reasoning?: string, overrides?: ResponseOverrides): SSEChunk[];
declare function buildContentWithToolCallsCompletion(content: string, toolCalls: ToolCall[], model: string, reasoning?: string, overrides?: ResponseOverrides): ChatCompletion;
/**
 * Generate a deterministic embedding vector from input text.
 * Hashes the input with SHA-256 and spreads the hash bytes across
 * the requested number of dimensions, producing values in [-1, 1].
 */
declare function generateDeterministicEmbedding(input: string, dimensions?: number): number[];
interface EmbeddingAPIResponse {
  object: "list";
  data: {
    object: "embedding";
    index: number;
    embedding: number[];
  }[];
  model: string;
  usage: {
    prompt_tokens: number;
    total_tokens: number;
  };
}
/**
 * Build an OpenAI-format embeddings API response for one or more inputs.
 */
declare function buildEmbeddingResponse(embeddings: number[][], model: string): EmbeddingAPIResponse;
//# sourceMappingURL=helpers.d.ts.map

//#endregion
export { EmbeddingAPIResponse, FORMAT_TO_CONTENT_TYPE, buildContentWithToolCallsChunks, buildContentWithToolCallsCompletion, buildEmbeddingResponse, buildTextChunks, buildTextCompletion, buildToolCallChunks, buildToolCallCompletion, extractOverrides, flattenHeaders, formatToMime, generateDeterministicEmbedding, generateId, generateMessageId, generateToolCallId, generateToolUseId, isAudioResponse, isContentWithToolCallsResponse, isEmbeddingResponse, isErrorResponse, isImageResponse, isTextResponse, isToolCallResponse, isTranscriptionResponse, isVideoResponse };
//# sourceMappingURL=helpers.d.cts.map