/** * Mid-conversation reasoning effort via `configuration_update` input items * (GPT-6 Astra; `model.compat.supportsConfigurationUpdate`). * * The request-level `reasoning.effort` is pinned to the value of the session's * first request so the cached prompt prefix survives an effort change. Each * later change is carried as a `configuration_update` item inserted at the * tail of the transcript — before the user message it takes effect on, or * after the latest tool result when the level changes inside a tool loop — and * replayed at that position on every subsequent request until another update * overrides it. Mirrors the Anthropic provider's stable `output_config.effort` * planning. * * Used by both the platform Responses provider and the Codex provider; the * state lives in each provider's session state, keyed per conversation. * * Wire constraints (verified against the Codex backend): only `gpt-6-astra` * accepts the item type, consecutive updates are rejected, and * `/responses/compact` rejects histories containing them — compaction * requests are built outside this planner and never carry the items. */ /** `configuration_update` input item; only `reasoning.effort` is updatable. */ export interface ConfigurationUpdateItem { type: "configuration_update"; reasoning: { effort: string; }; } interface EffortTransition { /** Input-array position the item is spliced into (before `input[index]`). */ index: number; /** Fingerprint of `input[index - 1]` at record time; a mismatch means the history was rewritten. */ anchor: string; effort: TEffort; } /** Per-conversation effort baseline and recorded transitions. */ export interface OpenAIEffortControlState { baseEffort?: TEffort; currentEffort?: TEffort; transitions: EffortTransition[]; } export declare function createOpenAIEffortControlState(): OpenAIEffortControlState; /** * Fetch (or create) the control state for one conversation from a provider's * bounded per-session map, refreshing its LRU slot. */ export declare function getOpenAIEffortControlState(states: Map>, key: string): OpenAIEffortControlState; interface AnchorableItem { type?: string | null; role?: string; id?: string | null; status?: string | null; } /** * Pin the request-level effort to the session baseline and splice pending * `configuration_update` items into `input` (mutated in place). * * `input` is the freshly built transcript for this request, without any * `configuration_update` items. `requested` is the wire effort the caller * would otherwise send at the request level. Returns the effort to send at the * request level (`requested` on the first request, the baseline afterwards). */ export declare function planStableOpenAIEffort(state: OpenAIEffortControlState, input: Array, requested: TEffort): TEffort; export {};