import { AmplitudeAI } from "./client.js";

//#region src/patching.d.ts

declare function patchedProviders(): string[];
declare function patchOpenAI(options: {
  amplitudeAI: AmplitudeAI;
  trackCompletions?: boolean;
  module?: unknown;
}): void;
declare function patchAnthropic(options: {
  amplitudeAI: AmplitudeAI;
  module?: unknown;
}): void;
declare function patchAzureOpenAI(options: {
  amplitudeAI: AmplitudeAI;
  module?: unknown;
}): void;
declare function patchGemini(options: {
  amplitudeAI: AmplitudeAI;
  module?: unknown;
  /** The new `@google/genai` module (injectable for tests). */
  genAiModule?: unknown;
}): void;
declare function patchMistral(options: {
  amplitudeAI: AmplitudeAI;
  module?: unknown;
}): void;
declare function patchBedrock(options: {
  amplitudeAI: AmplitudeAI;
  module?: unknown;
}): void;
/**
 * Auto-detects installed provider SDKs and patches each supported surface.
 *
 * Returns the list of provider names that were successfully patched.
 * Ownership conflicts (same provider patched by a different `AmplitudeAI` instance)
 * throw immediately to prevent ambiguous instrumentation state.
 *
 * In bundler environments where `tryRequire` cannot resolve modules, pass them
 * explicitly via `modules`:
 * ```ts
 * import OpenAI from 'openai';
 * import Anthropic from '@anthropic-ai/sdk';
 * patch({ amplitudeAI: ai, modules: { openai: OpenAI, anthropic: Anthropic } });
 * ```
 */
declare function patch(options: {
  amplitudeAI: AmplitudeAI;
  modules?: Record<string, unknown>;
  /**
   * Optional list of provider names the caller expects to be patched
   * (e.g. `['openai']`). When set, the SDK logs a one-time warning if
   * the runtime-patched set differs. Useful for catching drift between
   * declared configuration and what your code actually imports. No
   * enforcement — patching always runs to completion.
   */
  expectedProviders?: string[] | null;
  /**
   * Optional application key used to deduplicate provider-mismatch
   * warnings per application.
   */
  appKey?: string | null;
}): string[];
declare function unpatch(): void;
declare function unpatchOpenAI(): void;
declare function unpatchAnthropic(): void;
declare function unpatchGemini(): void;
declare function unpatchMistral(): void;
declare function unpatchBedrock(): void;
declare function unpatchAzureOpenAI(): void;
/** @internal Test-only: clear the tool latency registry. */
declare function _resetToolLatencyForTests(): void;
//#endregion
export { _resetToolLatencyForTests, patch, patchAnthropic, patchAzureOpenAI, patchBedrock, patchGemini, patchMistral, patchOpenAI, patchedProviders, unpatch, unpatchAnthropic, unpatchAzureOpenAI, unpatchBedrock, unpatchGemini, unpatchMistral, unpatchOpenAI };
//# sourceMappingURL=patching.d.ts.map