import type { Message, ProviderRequest, ProviderRequestOptions } from "@arnilo/prism"; /** `x-opencode-session` accepted length cap (OpenCode server session id). */ export declare const OPENCODE_SESSION_ID_MAX_LENGTH = 128; /** * Resolve the OpenCode session id from cache intent first (`cacheKey`), then the * runtime `sessionId`. Sanitized + clamped via the shared core helper so session * ids cannot carry credentials, raw prompts, or disallowed characters. */ export declare function opencodeSessionId(options: ProviderRequestOptions | undefined): string | undefined; /** * Provider-owned OpenCode headers. Applied after caller headers so callers cannot * replace `content-type` or the session id. `authorization` is added separately by * the provider after these. */ export declare function opencodeOwnedHeaders(options: ProviderRequestOptions | undefined): Record; /** * Whether Anthropic-route content `cache_control` markers may be emitted. Caching * is enabled unless explicitly disabled and the model opts in via * `ModelConfig.cache.kind: "cache_control"` (or the caller forces `cache.mode: * "on"` for an Anthropic-route model). The OpenAI-compatible chat route never * receives Anthropic `cache_control` fields. */ export declare function opencodeAnthropicCacheEnabled(request: ProviderRequest): boolean; /** * Apply Anthropic-style `cache_control` markers only to the caller-selected Prism * breakpoints on the Anthropic Messages route, using the shared `applyCacheControl` * helper. Markers land on the last content block of each selected message; with no * breakpoints, no markers are emitted and the server relies on implicit caching. */ export declare function applyOpencodeAnthropicCacheControl(request: ProviderRequest): readonly Message[];