/** * Lazy provider module loading. * * Each provider module is loaded only when its stream function is first called. * This avoids eagerly importing heavy SDK dependencies (e.g., @anthropic-ai/sdk, * openai) at startup. The loaded module promise is cached so subsequent calls * reuse the same import. * * stream.ts imports its provider stream functions from this module (see the * lazy wrappers below), so this file IS the main streaming path's provider * loader: heavy SDKs stay out of the CLI startup parse graph. */ import type { AssistantMessageEventStream, Context, Model, OptionsForApi } from "../types"; import { AssistantMessageEventStream as EventStreamImpl } from "../utils/event-stream"; import type { BedrockOptions } from "./amazon-bedrock"; interface BedrockProviderModule { streamBedrock: (model: Model<"bedrock-converse-stream">, context: Context, options: BedrockOptions) => AssistantMessageEventStream; } export declare function setBedrockProviderModule(module: BedrockProviderModule): void; /** * Resolves the first-event timeout fallback for the outer lazy-stream watchdog. * A configured wrapper-specific fallback (from `LazyStreamLimits`) always wins; * otherwise providers known to have slow first events get a five-minute floor * matching their inner provider-level override. Returns `undefined` for * providers that should use the shared default. */ export declare function resolveLazyStreamFirstEventFallbackMs(provider: string, configuredFallbackMs?: number): number | undefined; export declare const streamAnthropic: (model: Model<"anthropic-messages">, context: Context, options: OptionsForApi<"anthropic-messages">) => EventStreamImpl; export declare const streamAzureOpenAIResponses: (model: Model<"azure-openai-responses">, context: Context, options: OptionsForApi<"azure-openai-responses">) => EventStreamImpl; export declare const streamGoogle: (model: Model<"google-generative-ai">, context: Context, options: OptionsForApi<"google-generative-ai">) => EventStreamImpl; export declare const streamGoogleGeminiCli: (model: Model<"google-gemini-cli">, context: Context, options: OptionsForApi<"google-gemini-cli">) => EventStreamImpl; export declare const streamGoogleVertex: (model: Model<"google-vertex">, context: Context, options: OptionsForApi<"google-vertex">) => EventStreamImpl; export declare const streamOpenAICodexResponses: (model: Model<"openai-codex-responses">, context: Context, options: OptionsForApi<"openai-codex-responses">) => EventStreamImpl; export declare const streamOpenAICompletions: (model: Model<"openai-completions">, context: Context, options: OptionsForApi<"openai-completions">) => EventStreamImpl; export declare const streamOpenAIResponses: (model: Model<"openai-responses">, context: Context, options: OptionsForApi<"openai-responses">) => EventStreamImpl; export declare const streamCursor: (model: Model<"cursor-agent">, context: Context, options: OptionsForApi<"cursor-agent">) => EventStreamImpl; export declare const streamOllama: (model: Model<"ollama-chat">, context: Context, options: OptionsForApi<"ollama-chat">) => EventStreamImpl; export declare const streamBedrock: (model: Model<"bedrock-converse-stream">, context: Context, options: OptionsForApi<"bedrock-converse-stream">) => EventStreamImpl; export {};