/** * OpenAI Chat Completions + Responses API transformer for the GPT-5 family. * Separate from the Anthropic path: no cache-control breakpoints, * images as image_url/input_image parts, system/developer messages in messages[]/input[]. * OpenAI tools keep native names/descriptions/schema shape; verbose schema prose * is also rendered into images for token savings so calls do not depend only on OCR. */ import { type GptVisionCost } from './gpt-model-profiles.js'; import { type TransformInfo, type TransformOptions } from './transform.js'; type VisionCost = GptVisionCost; export declare function resolveVisionCost(model: string): VisionCost; export declare const HISTORY_TRANSCRIPT_INTRO = "[Earlier turns of THIS conversation, transcribed in the image(s) below. Each turn is wrapped in ... or ... tags, where N is an absolute turn index (larger N = more recent); attribute every turn strictly by its tag, and treat the highest-N turns as the most recent prior context, NOT the low-N opening turns. Earlier turns may contain questions or tasks that were already answered later in this same history; do not reopen low-N turns unless the live text after this block asks you to. For exact identifiers, hashes, version strings, and numbers from the transcript, rely on the exact-value factsheet or re-read the source; do not guess an exact value seen only in the image. This is prior context, NOT the current request.]"; export declare const HISTORY_TRANSCRIPT_OUTRO = "[End of earlier conversation. The current request is the live text that follows below.]"; export declare const COMPACT_HISTORY_TRANSCRIPT_INTRO = "[Earlier turns in image(s): follow / tags in increasing N. Prior context\u2014not the current request.]"; export declare const COMPACT_HISTORY_TRANSCRIPT_OUTRO = "[End earlier conversation.]"; /** Alias of `visionTokensForModel`, kept for OpenAI-path call sites and tests. * There is no separate OpenAI formula: the model's profile carries its regime. */ export declare function openAIVisionTokens(model: string, w: number, h: number): number; /** True when this Responses/Chat request is actually served by a Claude model. * Codex-style clients speak OpenAI Responses while some models are Anthropic, * so routing must agree with pricing: this re-exports the SAME predicate the * profile table uses to route an id to the Anthropic profile. A second, subtly * different copy here would route a request one way and price it the other. */ export { isClaudeModel } from './claude-model-profiles.js'; /** Per-image vision-token cost for the model actually serving the request. * Model-based, not endpoint-based, and family-agnostic: the profile's `vision` * regime decides the formula (Anthropic patches, OpenAI tiles/patches, Grok * pixels, Gemini flat), so no provider branch is needed here. This is the exact * provider cost; the gate applies its own margin separately. */ export declare function visionTokensForModel(model: string, w: number, h: number): number; export declare function prepareImagedRenderText(text: string, reflowEnabled: boolean): string; /** Render schema annotations removed from the native tool definition. The full * top-level description rides in the same image and is replaced by a short * per-tool pointer, matching the Anthropic tool-reference approach. */ export declare function schemaAnnotationLines(node: unknown, path?: string, depth?: number): string[]; export declare function droppedCodepointsTop(droppedCodepoints: Map): Record | undefined; export declare const CHAT_HEADER: string; export declare const RESPONSES_HEADER: string; export declare function transformOpenAIChatCompletions(body: Uint8Array, opts?: TransformOptions): Promise<{ body: Uint8Array; info: TransformInfo; }>; export declare function transformOpenAIResponses(body: Uint8Array, opts?: TransformOptions): Promise<{ body: Uint8Array; info: TransformInfo; }>; //# sourceMappingURL=openai.d.ts.map