import type { Api, Model } from "../../types"; /** Reasoning replay scope for the Codex Responses API (`reasoning.context`). */ export type CodexReasoningContext = "auto" | "current_turn" | "all_turns"; export interface ReasoningConfig { effort: "none" | "minimal" | "low" | "medium" | "high" | "xhigh"; summary?: "auto" | "concise" | "detailed"; context?: CodexReasoningContext; } export interface CodexRequestOptions { reasoningEffort?: ReasoningConfig["effort"]; reasoningSummary?: ReasoningConfig["summary"] | null; /** Explicit `reasoning.context` override; defaults to `all_turns` when unset. The `all_turns` value is gated to gpt-5.4+ Codex models — older ids reject it, so it is suppressed and `context` omitted. */ reasoningContext?: CodexReasoningContext; textVerbosity?: "low" | "medium" | "high"; include?: string[]; /** Responses Lite transport contract: strips image detail and disables parallel tool calling, mirroring codex-rs. */ responsesLite?: boolean; } export interface InputItem { id?: string | null; type?: string | null; role?: string; content?: unknown; call_id?: string | null; name?: string; output?: unknown; arguments?: unknown; } export interface RequestBody { model: string; store?: boolean; stream?: boolean; instructions?: string; input?: InputItem[]; tools?: unknown; tool_choice?: unknown; reasoning?: Partial; text?: { verbosity?: "low" | "medium" | "high"; }; include?: string[]; prompt_cache_key?: string; prompt_cache_retention?: "in_memory" | "24h"; client_metadata?: Record; max_output_tokens?: number; max_completion_tokens?: number; service_tier?: "auto" | "default" | "flex" | "scale" | "priority" | null; [key: string]: unknown; } /** Returns whether a Codex request can use the text-only Responses Lite transport. */ export declare function shouldUseCodexResponsesLite(body: RequestBody, requested: boolean | undefined): boolean; export declare function transformRequestBody(body: RequestBody, model: Model, options?: CodexRequestOptions, prompt?: { developerMessages: string[]; }): Promise;