import type OpenAI from "openai"; import type { NativeChatRequestArgs } from "@use-crux/core/adapter"; import type { GenerationSettings } from "@use-crux/core"; import type { OpenAIChatRequest, OpenAIExtra } from "./types"; /** * The JSON Schema behavior OpenAI's structured-output (strict) mode accepts. * * OpenAI strict mode requires every property in `required`, rejects extra * properties, and expresses optionality with a `null` union. Core lowers the * authored schema against these capabilities and supplies the result to the * request builder. */ export declare const openAIStructuredCapabilities: { id: string; supportsJsonSchema: true; requiresAllProperties: true; supportsOptionalProperties: false; supportsNullable: true; supportsBooleanSchemas: false; supportsReferences: true; supportsUnions: true; supportsRecursiveSchemas: true; additionalProperties: "must-be-false"; unsupportedKeywords: never[]; }; /** Build the OpenAI chat-completion request body from canonical Crux args. */ export declare function openAIRequest(args: NativeChatRequestArgs): OpenAIChatRequest; /** Add OpenAI's streaming flag to an already assembled request body. */ export declare function openAIStreamRequest(request: OpenAIChatRequest): OpenAIChatRequest; /** Map canonical generation settings onto OpenAI chat-completion fields. */ export declare function openAISettings(settings: GenerationSettings): Record; /** Narrow OpenAI request body for non-streaming create/parse SDK calls. */ export declare function asOpenAINonStreamingParams(request: OpenAIChatRequest): OpenAI.ChatCompletionCreateParamsNonStreaming; /** Narrow OpenAI request body for streaming create SDK calls. */ export declare function asOpenAIStreamingParams(request: OpenAIChatRequest): OpenAI.ChatCompletionCreateParamsStreaming;