import type { SystemModelMessage, ToolSet } from 'ai'; import type { SdkId } from '../sdk-registry.js'; export type PromptCacheProviderOptions = { openai?: Record; }; export type PromptCacheRetention = 'in_memory' | '24h'; export interface PromptCacheApplyInput { enabled: boolean; sdk?: SdkId | string; cacheKey?: string; retention?: PromptCacheRetention; } export declare function supportsPromptCacheSdk(sdk?: string): sdk is SdkId; /** Stable routing key for OpenAI `prompt_cache_key` (not per-session). */ export declare function buildPromptCacheKey(parts: { label: string; provider: string; modelId: string; prefix?: string; }): string; export declare function wrapSystemForPromptCache(system: string | undefined, input: PromptCacheApplyInput | boolean): string | SystemModelMessage | undefined; export declare function applyPromptCacheToTools(tools: ToolSet | undefined, input: PromptCacheApplyInput | boolean): ToolSet | undefined; /** OpenAI / compatible:`prompt_cache_key` + optional retention(自动前缀缓存,无需 cache_control)。 */ export declare function buildPromptCacheProviderOptions(input: PromptCacheApplyInput): PromptCacheProviderOptions | undefined; export declare function resolvePromptCacheApplyInput(enabled: boolean, sdk: string | undefined, options?: Pick): PromptCacheApplyInput; /** Stream 层默认启用 prompt cache;仅显式 `promptCache: false` 关闭。 */ export declare function isStreamPromptCacheEnabled(promptCache?: boolean): boolean; export interface StreamPromptCacheOptions { promptCache?: boolean; promptCacheKey?: string; promptCacheRetention?: PromptCacheRetention; } //# sourceMappingURL=ai-sdk-prompt-cache.d.ts.map