export type CodexReasoningEffort = 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';
export type CodexServiceTier = 'fast';
export interface CodexReasoningModelMap {
    opusModel?: string;
    sonnetModel?: string;
    haikuModel?: string;
    defaultModel?: string;
}
export interface CodexReasoningProxyConfig {
    upstreamBaseUrl: string;
    verbose?: boolean;
    timeoutMs?: number;
    modelMap: CodexReasoningModelMap;
    defaultEffort?: CodexReasoningEffort;
    traceFilePath?: string;
    /** Skip TLS certificate validation for self-signed remote HTTPS proxies */
    allowSelfSigned?: boolean;
    /**
     * Path prefix to strip from incoming requests before forwarding to upstream.
     * Used for remote proxy mode where upstream expects /v1/messages, not /api/provider/codex/v1/messages.
     * Example: '/api/provider/codex' will transform '/api/provider/codex/v1/messages' to '/v1/messages'
     */
    stripPathPrefix?: string;
    /** When true, skip reasoning effort injection entirely (thinking mode: off) */
    disableEffort?: boolean;
}
export declare function buildCodexModelEffortMap(models: CodexReasoningModelMap, defaultEffort?: CodexReasoningEffort): Map<string, CodexReasoningEffort>;
export declare function getEffortForModel(model: string | null, modelEffort: Map<string, CodexReasoningEffort>, defaultEffort: CodexReasoningEffort): CodexReasoningEffort;
export declare function injectReasoningEffortIntoBody(body: unknown, effort: CodexReasoningEffort): unknown;
export declare function injectCodexRequestTuningIntoBody(body: unknown, tuning: {
    effort: CodexReasoningEffort | null;
    serviceTier: CodexServiceTier | null;
}): unknown;
export declare class CodexReasoningProxy {
    private server;
    private port;
    private readonly config;
    private readonly modelEffort;
    private readonly sessionFallbackByModel;
    private readonly recent;
    private readonly counts;
    constructor(config: CodexReasoningProxyConfig);
    private getRememberedFallback;
    private rememberFallback;
    private buildForwardBody;
    private sendBufferedResponse;
    /**
     * Treat trailing effort tokens and "-fast" as Codex tuning aliases
     * only for known codex models.
     * Prevents stripping legitimate upstream model IDs that happen to end with those tokens.
     */
    private parseTuningAlias;
    private log;
    private trace;
    private record;
    start(): Promise<number>;
    stop(): void;
    private readBody;
    private handleRequest;
    private buildForwardHeaders;
    /**
     * Get the appropriate request function based on protocol.
     * Uses https.request for HTTPS URLs, http.request for HTTP.
     */
    private getRequestFn;
    private startResponseTimeout;
    private buildRequestOptions;
    private forwardRaw;
    private forwardJson;
}
//# sourceMappingURL=codex-reasoning-proxy.d.ts.map