/** * Vision capability + image-attachment detection. * * Two jobs: * 1. isVisionModel(id) — does this gateway model accept image input? * 2. messageNeedsVision(text) — does this user message reference an image? * * Source of truth: a hand-curated allowlist below. The gateway exposes a * 'vision' category on /v1/models, but resolving it at routing time would * make routeRequest async and gate sync proxy paths on a network call. The * allowlist is small (~18 entries) and changes only when models do, which * already touches the router + pricing tables — updating one more file is * the right tradeoff vs. async fan-out across every routing callsite. * * Background: prior to this module, Auto routing could pick a text-only model * (e.g. deepseek-v4-pro) on an image-bearing turn. The Read tool would still * inline image bytes, the gateway would tokenize the base64 as text, and the * model — having no vision pathway — would hallucinate based on the * `Image file: ` description string. Expensive AND wrong. */ /** Does this concrete gateway model accept image input? */ export declare function isVisionModel(modelId: string | undefined | null): boolean; /** * Pick a vision-capable replacement closest to the user's chosen model. * Prefers same provider family (so the user's intent — "I want Claude" vs * "I want Gemini" — survives the swap), then falls back to a sensible * vision default (Sonnet 4.6 — agent-tuned, mid-tier price). */ export declare function pickVisionSibling(modelId: string): string; /** * Does this user-typed message reference an image file? Used by the router * to bump Auto mode to a vision-capable tier, and by the manual-mode guard * to swap a text-only model for one turn. * * Detection is intentionally a regex over file extensions rather than a * filesystem stat — the user may type a path that doesn't yet exist * (about to wget it) or a glob; what we care about is "does the model need * eyes for this turn?" The false-positive risk is benign (we route to a * slightly stronger model than strictly needed). */ export declare function messageNeedsVision(text: string | undefined | null): boolean; /** * Messages-array variant: scans OpenAI- and Anthropic-format content blocks * for explicit image parts (image / image_url / input_image) and for image * paths embedded in text parts. Used by the proxy router which receives a * fully-formed messages[] payload, not a single string. */ export declare function messagesNeedVision(messages: Array<{ role?: string; content?: unknown; }> | undefined | null): boolean;