/**
 * @license
 * Copyright 2025 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */
import type { Config } from '../config/config.js';
import type { IProvider } from '../providers/IProvider.js';
import type { ProviderManager } from '../providers/ProviderManager.js';
import { type ProviderRuntimeContext } from '../runtime/providerRuntimeContext.js';
import { SettingsService } from '../settings/SettingsService.js';
interface ProviderRuntimeOptions {
    settingsService?: SettingsService;
    config?: Config;
    runtimeId?: string;
    metadata?: Record<string, unknown>;
}
interface ProviderWithRuntimeResult<P> {
    provider: P;
    runtime: ProviderRuntimeContext;
    settingsService: SettingsService;
}
/**
 * Creates a provider instance while binding it to a fresh runtime context.
 * The runtime is only active during instantiation so the provider captures
 * the injected settings service without polluting global state.
 */
export declare function createProviderWithRuntime<P>(factory: (context: {
    runtime: ProviderRuntimeContext;
    settingsService: SettingsService;
}) => P, options?: ProviderRuntimeOptions): ProviderWithRuntimeResult<P>;
/**
 * Produces a lightweight Config stub sufficient for provider runtime tests.
 */
export declare function createRuntimeConfigStub(settingsService: SettingsService, overrides?: Partial<Record<string, unknown>>): Config;
interface TestRuntimeInitOptions {
    runtimeId?: string;
    metadata?: Record<string, unknown>;
    configOverrides?: Partial<Record<string, unknown>>;
}
/**
 * Initializes a lightweight provider runtime context for test environments.
 * Returns the created settings service, config stub, and runtime context.
 */
export declare function initializeTestProviderRuntime(options?: TestRuntimeInitOptions): {
    settingsService: SettingsService;
    config: Config;
    runtime: ProviderRuntimeContext;
};
declare function requireVi(): import("vitest").VitestUtils;
interface GeminiChatConfigShape {
    getSessionId: () => string;
    getTelemetryLogPromptsEnabled: () => boolean;
    getUsageStatisticsEnabled: () => boolean;
    getDebugMode: () => boolean;
    getContentGeneratorConfig: () => {
        authType?: string;
        model?: string;
    };
    getModel: ReturnType<ReturnType<typeof requireVi>['fn']>;
    setModel: ReturnType<ReturnType<typeof requireVi>['fn']>;
    getQuotaErrorOccurred: ReturnType<ReturnType<typeof requireVi>['fn']>;
    setQuotaErrorOccurred: ReturnType<ReturnType<typeof requireVi>['fn']>;
    flashFallbackHandler?: unknown;
    getEphemeralSettings: ReturnType<ReturnType<typeof requireVi>['fn']>;
    getEphemeralSetting: ReturnType<ReturnType<typeof requireVi>['fn']>;
    getProvider: ReturnType<ReturnType<typeof requireVi>['fn']>;
    setProvider: ReturnType<ReturnType<typeof requireVi>['fn']>;
    getProviderManager: ReturnType<ReturnType<typeof requireVi>['fn']>;
    getSettingsService: ReturnType<ReturnType<typeof requireVi>['fn']>;
}
interface GeminiChatRuntimeOptions {
    provider?: IProvider;
    providerManager?: Pick<ProviderManager, 'getActiveProvider'>;
    settingsService?: SettingsService;
    runtimeId?: string;
    metadata?: Record<string, unknown>;
    configOverrides?: Partial<GeminiChatConfigShape>;
}
interface GeminiChatRuntimeResult {
    config: Config;
    provider: IProvider;
    providerManager: Pick<ProviderManager, 'getActiveProvider'>;
    settingsService: SettingsService;
    runtime: ProviderRuntimeContext;
}
/**
 * Creates a Config stub and associated runtime wiring for GeminiChat tests.
 * The returned config exposes the minimal surface required by the class while
 * guaranteeing that runtime-aware helpers (e.g. getSettingsService) exist.
 */
export declare function createGeminiChatRuntime(options?: GeminiChatRuntimeOptions): GeminiChatRuntimeResult;
export {};
