import type { FallbackStrategy } from "@superblocksteam/library-shared/types";
import type { FileArtifact } from "../../types.js";
export type ProviderType = "vertex" | "bedrock" | "snowflake";
export type CoreModelType = "claude-sonnet-4-5" | "claude-sonnet-4-6" | "claude-opus-4-5" | "claude-opus-4-6" | "claude-opus-4-7";
export type { FallbackStrategy };
export interface RetryConfigOptions {
    maxAttempts?: number;
    maxAttemptsPerProvider?: number | Record<ProviderType, Record<CoreModelType, number> | number>;
    maxTotalTimeMs?: number;
    idleTimeoutMs?: number;
    initialDelayMs?: number;
    maxDelayMs?: number;
    backoffMultiplier?: number;
}
/**
 * Fallback configuration - controls multi-provider retry behavior.
 * When enabled, the system will try alternative providers on failure.
 * This is separate from provider selection.
 */
export interface FallbackConfigOptions {
    enabled?: boolean;
    strategy?: FallbackStrategy;
    fallbackProviders?: ProviderType[];
}
export interface LoggingConfigOptions {
    enabled?: boolean;
    conversationId?: string;
    saveArtifact?: (artifact: FileArtifact, stepId: string, runTimestamp: string) => Promise<void>;
    metadata?: Record<string, unknown>;
}
/**
 * Thinking knobs for the model. Stored on StreamConfig so the orchestrator
 * can rebuild provider-specific thinking options per attempt — the shape
 * differs between `claude-opus-4-7` (adaptive + effort) and other models
 * (enabled + budgetTokens), and the current model can change across retries.
 */
export interface ThinkingConfigOptions {
    enabled: boolean;
    budgetTokens: number;
    interleaved: boolean;
}
export interface StreamConfigOptions {
    retry?: RetryConfigOptions;
    provider: ProviderType;
    model: CoreModelType;
    fallback?: FallbackConfigOptions;
    logging?: LoggingConfigOptions;
    thinking?: ThinkingConfigOptions;
}
interface ResolvedRetryConfig {
    maxAttempts: number;
    maxAttemptsPerProvider: number | Record<ProviderType, Record<CoreModelType, number> | number>;
    maxTotalTimeMs: number;
    idleTimeoutMs: number;
    initialDelayMs: number;
    maxDelayMs: number;
    backoffMultiplier: number;
}
interface ResolvedProviderConfig {
    provider: ProviderType;
    model: CoreModelType;
}
interface ResolvedFallbackConfig {
    enabled: boolean;
    strategy: FallbackStrategy;
    fallbackProviders?: ProviderType[];
}
interface ResolvedLoggingConfig {
    enabled: boolean;
    conversationId?: string;
    saveArtifact?: (artifact: FileArtifact, stepId: string, runTimestamp: string) => Promise<void>;
    metadata: Record<string, unknown>;
}
export declare class StreamConfig {
    private readonly _retry;
    private readonly _provider;
    private readonly _fallback;
    private readonly _logging;
    private readonly _thinking?;
    private constructor();
    static create(options: StreamConfigOptions): StreamConfig;
    get retry(): Readonly<ResolvedRetryConfig>;
    get provider(): Readonly<ResolvedProviderConfig>;
    get fallback(): Readonly<ResolvedFallbackConfig>;
    get logging(): Readonly<ResolvedLoggingConfig>;
    get thinking(): Readonly<ThinkingConfigOptions> | undefined;
}
//# sourceMappingURL=config.d.ts.map