import type * as plugins from './plugins.js'; /** * ChatGPT's Codex backend requires top-level Responses API instructions. * * The system messages a prompt opens with become those instructions. A system message later in the * conversation keeps its place and is sent as a `developer` input item, the role the Codex backend reads * mid-conversation instructions in, so moving it would neither reorder the conversation nor change the * instructions prefix a prompt cache keys on. A caller's own `instructions` or `systemMessageMode` is kept. * * The backend never stores a response, so every call is sent with `store: false`. A stored call would * send earlier assistant items as references to stored items, and none of them exists. */ export declare function createOpenAiChatGptInstructionsMiddleware(): plugins.LanguageModelV4Middleware; /** * Apply the ChatGPT instruction dialect to an already serialized Responses request (for HTTP gateways). * Leading system/developer messages become the dynamic instructions prefix unless one was supplied. * A prefix item that is not a message (Codex opens with an `additional_tools` item) is no instruction: it * stays at the head of the input in its order. Later instructions keep their order as developer messages. * The Codex backend takes no output limit, so `max_output_tokens` is removed, as Codex never sends one and * OpenCode's ChatGPT plugin removes it. Other request fields are preserved. * This does not authenticate, choose a model, change storage/streaming policy, or mutate the input. */ export declare function normalizeOpenAiChatGptResponsesRequest(body: Readonly>): Record;