import type { LanguageModelV4Prompt } from "@ai-sdk/provider"; import type { Modality } from "./types.js"; /** * Scan a model-level prompt (`LanguageModelV4Prompt`, spec v4 — what the AI SDK * passes into `doGenerate`/`doStream`) and report which input modalities appear. * * V4 details that matter here: * - File input is a content part with `type: 'file'` (`LanguageModelV4FilePart`). * - The IANA media type lives in `part.mediaType` (NOT `mimeType`). * - `mediaType` may be a full `type/subtype` (e.g. `image/png`), a bare * top-level segment (e.g. `image`), or an `image/*` wildcard. We normalize * via `getTopLevelMediaType()` so all three forms work. * - PDF is `application/pdf` (top-level `application`), so it is special-cased * rather than matched by top-level prefix. * - `part.data` is a tagged union (`SharedV4FileData`); irrelevant for * modality routing — we only read `mediaType`. * - Only `user`/`assistant` messages carry input parts; `system` content is a * plain string (pure text). */ export declare function detectModalities(prompt: LanguageModelV4Prompt): Set; /** * True iff every modality in `required` is present in the entry's `supports`. * * An omitted (`undefined`) `supports` means the entry is a universal candidate * that matches ANY modality — it is never filtered out. */ export declare function supportsAll(supports: Modality[] | undefined, required: Set): boolean;