import type { LlmApiKeys } from "./generate-text-types.js";
import type { LlmProvider } from "./model-id.js";
import type { ModelRequestOptions } from "./model-options.js";
import type { Prompt } from "./prompt.js";
import type { LlmTokenUsage } from "./types.js";
export { streamTextWithContext } from "./generate-text-stream.js";
export type { LlmApiKeys } from "./generate-text-types.js";
export type OpenRouterOptions = {
    providers: string[] | null;
};
export type { LlmTokenUsage } from "./types.js";
type RetryNotice = {
    attempt: number;
    maxRetries: number;
    delayMs: number;
    error: unknown;
};
export declare function generateTextWithModelId({ modelId, apiKeys, prompt, temperature, maxOutputTokens, timeoutMs, fetchImpl, forceOpenRouter, openaiBaseUrlOverride, anthropicBaseUrlOverride, googleBaseUrlOverride, xaiBaseUrlOverride, zaiBaseUrlOverride, ollamaBaseUrlOverride, forceChatCompletions, requestOptions, retries, onRetry, }: {
    modelId: string;
    apiKeys: LlmApiKeys;
    prompt: Prompt;
    temperature?: number;
    maxOutputTokens?: number;
    timeoutMs: number;
    fetchImpl: typeof fetch;
    forceOpenRouter?: boolean;
    openaiBaseUrlOverride?: string | null;
    anthropicBaseUrlOverride?: string | null;
    googleBaseUrlOverride?: string | null;
    xaiBaseUrlOverride?: string | null;
    zaiBaseUrlOverride?: string | null;
    ollamaBaseUrlOverride?: string | null;
    forceChatCompletions?: boolean;
    requestOptions?: ModelRequestOptions;
    retries?: number;
    onRetry?: (notice: RetryNotice) => void;
}): Promise<{
    text: string;
    canonicalModelId: string;
    provider: LlmProvider;
    usage: LlmTokenUsage | null;
}>;
export declare function streamTextWithModelId({ modelId, apiKeys, prompt, temperature, maxOutputTokens, timeoutMs, fetchImpl, forceOpenRouter, openaiBaseUrlOverride, anthropicBaseUrlOverride, googleBaseUrlOverride, xaiBaseUrlOverride, ollamaBaseUrlOverride, forceChatCompletions, requestOptions, }: {
    modelId: string;
    apiKeys: LlmApiKeys;
    prompt: Prompt;
    temperature?: number;
    maxOutputTokens?: number;
    timeoutMs: number;
    fetchImpl: typeof fetch;
    forceOpenRouter?: boolean;
    openaiBaseUrlOverride?: string | null;
    anthropicBaseUrlOverride?: string | null;
    googleBaseUrlOverride?: string | null;
    xaiBaseUrlOverride?: string | null;
    ollamaBaseUrlOverride?: string | null;
    forceChatCompletions?: boolean;
    requestOptions?: ModelRequestOptions;
}): Promise<{
    textStream: AsyncIterable<string>;
    canonicalModelId: string;
    provider: LlmProvider;
    usage: Promise<LlmTokenUsage | null>;
    finalText: Promise<string | null>;
    lastError: () => unknown;
}>;
