import type { Api, Model, StreamOptions } from "../types.js"; /** * HTTP header OpenCode uses for per-conversation routing and optimization. * Must be a stable identifier for the lifetime of one conversation (issue 500). */ export declare const OPENCODE_SESSION_HEADER = "x-opencode-session"; /** * Returns true when the model points at an OpenCode endpoint: either one of the * built-in OpenCode providers, or a custom provider whose base URL parses to * exactly the `opencode.ai` hostname. Hostname equality is exact (case-insensitive, * no substring matching) so lookalike domains never receive session IDs. */ export declare function isOpenCodeModel(model: Pick, "provider" | "baseUrl">): boolean; /** * Returns options with `x-opencode-session` added for OpenCode models when a * session ID is present. The input is never mutated; a new options object is * returned when the header is added. * * Precedence: an explicit header in `model.headers` or `options.headers` wins * case-insensitively, so no differently-cased duplicate of the generated header * can be sent. OpenCode models without a session ID, missing options, and * non-OpenCode models are returned unchanged. */ export declare function withOpenCodeSessionHeader(model: Pick, "provider" | "baseUrl" | "headers">, options: TOptions): TOptions; //# sourceMappingURL=opencode-headers.d.ts.map