import { type CredentialValueSource, type JsonObject, type ModelConfig } from "@arnilo/prism"; export interface OpenAIModelConfig extends Omit { readonly provider?: "openai" | "openai-codex" | string; readonly compat?: JsonObject & { readonly api?: "openai-responses" | "openai-codex-responses" | string; /** Official Responses `reasoning` object (`effort`, `summary`, …). */ readonly reasoning?: JsonObject; }; } export interface ListOpenAIModelsOptions { readonly apiKey?: CredentialValueSource; readonly fetch?: typeof fetch; readonly baseUrl?: string; readonly signal?: AbortSignal; readonly headers?: Readonly>; /** Defaults to `"openai"`. Codex subscription models are not listed by `api.openai.com`. */ readonly provider?: string; } export interface OpenAIModelEntry { readonly id: string; readonly object?: string; readonly created?: number; readonly owned_by?: string; } export declare function defineOpenAIModel(config: OpenAIModelConfig): ModelConfig; /** * Caller-gated OpenAI model discovery via official `GET /models`. * Never invoked by `createOpenAIProviderPackage` — hosts call this and pass * results via `models:` (or register themselves). * @see https://developers.openai.com/api/reference/resources/models/methods/list */ export declare function listOpenAIModels(options?: ListOpenAIModelsOptions): Promise; /** * Map a sparse official `/models` entry to Prism `ModelConfig`. * Official payload is id/created/owned_by only — capabilities/cache are heuristic. */ export declare function mapOpenAIModel(entry: OpenAIModelEntry, options?: { readonly provider?: string; }): ModelConfig; /** Featured offline bootstrap aliases only — refresh via `listOpenAIModels()`. */ export declare const openAIModels: readonly [ModelConfig]; /** Codex subscription featured aliases — not returned by `api.openai.com/v1/models`. */ export declare const openAICodexModels: readonly [{ readonly provider: "openai-codex"; readonly model: "gpt-5.1-codex"; readonly displayName: "GPT-5.1 Codex"; readonly capabilities: { readonly input: readonly ["text"]; readonly output: readonly ["text"]; readonly reasoning: true; readonly tools: true; readonly streaming: true; readonly structuredOutput: "json_schema"; }; readonly limits: { readonly contextWindow: 400000; readonly maxOutputTokens: 128000; }; readonly compat: { readonly api: "openai-codex-responses"; }; }];