/**
 * Module: llm/gen/openai-compatible
 *
 * OpenAI Chat Completions compatible integration implementing streaming and batch generation.
 *
 * Rationale:
 * - Many "OpenAI-compatible" providers implement the Chat Completions API but not the newer
 *   Responses API. Dominds' `apiType: openai` uses the Responses API; this generator targets
 *   chat-completions-only providers and explicit provider quirks built on that transport shape.
 * - Isolation principle: this wrapper owns the `model_params.openai-compatible.*` namespace and
 *   must not inherit OpenAI Responses or Codex-specific request meanings.
 */
import type { ChatCompletion, ChatCompletionChunk, ChatCompletionMessageParam } from 'openai/resources/chat/completions';
import type { Team } from '../../team';
import type { FuncTool } from '../../tool';
import type { ChatMessage, ModelInfo, ProviderConfig } from '../client';
import { type LlmBatchOutput, type LlmBatchResult, type LlmFailureDisposition, type LlmGenerator, type LlmRequestContext, type LlmStreamReceiver, type LlmStreamResult } from '../gen';
type OpenAiCompatibleChatExtraParams = {
    thinking?: boolean | Record<string, unknown>;
    reasoning_effort?: NonNullable<Team.ModelParams['openai-compatible']>['reasoning_effort'];
    reasoning_split?: boolean;
    prompt_cache_key?: string;
};
export declare function resolveOpenAiCompatibleToolChoice(funcTools: readonly FuncTool[], requestContext: LlmRequestContext, modelInfo?: ModelInfo): 'none' | 'auto' | 'required' | undefined;
export declare function buildOpenAiCompatibleExtraParamsForTest(args: {
    providerConfig?: ProviderConfig;
    agent: Team.Member;
    openAiParams: NonNullable<Team.ModelParams['openai-compatible']>;
    requestContext?: LlmRequestContext;
}): OpenAiCompatibleChatExtraParams;
export declare function wrapOpenAiCompatibleRejectedRequestErrorForTest(args: {
    error: unknown;
    providerConfig: ProviderConfig;
    agent: Team.Member;
    requestContext: LlmRequestContext;
    genseq: number;
    requestKind: 'stream' | 'batch';
    payload: unknown;
}): Promise<unknown>;
export declare function buildOpenAiCompatibleRequestMessagesWrapper(systemPrompt: string, context: ChatMessage[], requestContextOrOptions?: LlmRequestContext | {
    providerConfig?: ProviderConfig;
}, optionsMaybe?: {
    providerConfig?: ProviderConfig;
}): Promise<ChatCompletionMessageParam[]>;
export declare function consumeOpenAiCompatibleChatCompletionStreamForTest(args: {
    stream: AsyncIterable<ChatCompletionChunk>;
    receiver: LlmStreamReceiver;
    genseq: number;
    abortSignal?: AbortSignal;
}): Promise<LlmStreamResult>;
export declare function chatCompletionToChatMessagesForTest(response: ChatCompletion, genseq: number): ChatMessage[];
export declare function chatCompletionToBatchOutputsForTest(response: ChatCompletion, genseq: number): LlmBatchOutput[];
export declare class OpenAiCompatibleGen implements LlmGenerator {
    get apiType(): string;
    classifyFailure(error: unknown): LlmFailureDisposition | undefined;
    genToReceiver(providerConfig: ProviderConfig, agent: Team.Member, systemPrompt: string, funcTools: FuncTool[], requestContext: LlmRequestContext, context: ChatMessage[], receiver: LlmStreamReceiver, genseq: number, abortSignal?: AbortSignal): Promise<LlmStreamResult>;
    genMoreMessages(providerConfig: ProviderConfig, agent: Team.Member, systemPrompt: string, funcTools: FuncTool[], requestContext: LlmRequestContext, context: ChatMessage[], genseq: number, abortSignal?: AbortSignal): Promise<LlmBatchResult>;
}
export {};
