import { PrivacyConfig } from "../core/privacy.js";
import { AmplitudeLike, AmplitudeOrAI, ChatCompletionResponse, OpenAIResponse, TrackFn } from "../types.js";
import { BaseAIProvider, ProviderTrackOptions } from "./base.js";

//#region src/providers/openai.d.ts

declare const OPENAI_AVAILABLE: boolean;
declare const _OpenAIModule: Record<string, unknown> | null;
interface OpenAIOptions {
  amplitude: AmplitudeOrAI;
  apiKey?: string;
  baseUrl?: string;
  privacyConfig?: PrivacyConfig | null;
  propagateContext?: boolean;
  /** Pass the `openai` module directly to bypass `tryRequire` (required in bundler environments). */
  openaiModule?: unknown;
}
declare class OpenAI<TClient extends Record<string, unknown> = Record<string, unknown>> extends BaseAIProvider {
  private _client;
  readonly chat: WrappedChat;
  readonly responses: WrappedResponses;
  private _propagateContext;
  constructor(options: OpenAIOptions);
  get client(): TClient;
}
declare class WrappedChat {
  readonly completions: WrappedCompletions;
  constructor(client: unknown, trackFn: TrackFn, amplitude: AmplitudeLike, privacyConfig: PrivacyConfig | null, propagateContext: boolean);
}
declare class WrappedCompletions {
  _original: Record<string, unknown>;
  private _trackFn;
  private _amplitude;
  private _privacyConfig;
  private _propagateContext;
  private _providerName;
  constructor(completions: Record<string, unknown>, trackFn: TrackFn, amplitude: AmplitudeLike, privacyConfig: PrivacyConfig | null, propagateContext: boolean, providerName?: string);
  create(params: Record<string, unknown>, amplitudeOverrides?: ProviderTrackOptions): Promise<ChatCompletionResponse | AsyncIterable<unknown>>;
  parse(params: Record<string, unknown>, amplitudeOverrides?: ProviderTrackOptions): Promise<ChatCompletionResponse | AsyncIterable<unknown>>;
  private _wrapStream;
  private _withContextHeaders;
  private _trackInputMessages;
}
declare class WrappedResponses {
  _original: Record<string, unknown>;
  private _trackFn;
  private _amplitude;
  private _privacyConfig;
  private _propagateContext;
  private _providerName;
  constructor(client: unknown, trackFn: TrackFn, amplitude: AmplitudeLike, privacyConfig: PrivacyConfig | null, propagateContext: boolean, providerName?: string);
  create(params: Record<string, unknown>, amplitudeOverrides?: ProviderTrackOptions): Promise<OpenAIResponse | AsyncIterable<unknown>>;
  stream(params: Record<string, unknown>, amplitudeOverrides?: ProviderTrackOptions): Promise<AsyncIterable<unknown>>;
  private _wrapStream;
  private _withContextHeaders;
  private _trackInputMessages;
}
declare function extractSystemPrompt(params: Record<string, unknown>): string | undefined;
declare function extractToolDefinitions(params: Record<string, unknown>): Array<Record<string, unknown>> | undefined;
//#endregion
export { OPENAI_AVAILABLE, OpenAI, OpenAIOptions, WrappedChat, WrappedCompletions, WrappedResponses, _OpenAIModule, extractSystemPrompt, extractToolDefinitions };
//# sourceMappingURL=openai.d.ts.map