import type { LanguageModelChat } from 'vscode'; import { IConfigurationService } from '../../configuration/common/configurationService'; import type { IChatEndpoint } from '../../networking/common/networking'; /** * Per-model capability override. Lets advanced users (and evals) alias an * unknown/preview model id to a known production family for capability * routing. Read once per endpoint in `ChatEndpoint`'s constructor from the * `chat.modelCapabilityOverrides` setting; the aliased family flows through * every family-prefix-based heuristic (Anthropic family detection, prompt * resolver, multi-replace tools, tool search, context editing, extended * cache TTL, memory, PDF support, …). * * The model id on the wire is unaffected; only our local capability layer * sees the alias. */ export interface IModelCapabilityOverride { /** * Alias the model's family for capability routing (e.g. set to * `"claude-opus-4.7"` to make a preview model receive every Anthropic * Claude Opus 4.7 capability). */ family?: string; } /** * Returns the capability override (if any) for the given model id, read * from the `chat.modelCapabilityOverrides` setting. */ export declare function getModelCapabilityOverride(modelId: string, configurationService: IConfigurationService): IModelCapabilityOverride | undefined; export declare function getModelId(model: LanguageModelChat | IChatEndpoint): string; export declare function isHiddenModelA(model: LanguageModelChat | IChatEndpoint): boolean; export declare function isHiddenModelB(model: LanguageModelChat | IChatEndpoint | string): boolean; export declare function isHiddenModelE(model: LanguageModelChat | IChatEndpoint): boolean; export declare function isHiddenModelF(model: LanguageModelChat | IChatEndpoint): boolean; export declare function isHiddenFamilyH(model: LanguageModelChat | IChatEndpoint): boolean; export declare function isHiddenModelK(model: LanguageModelChat | IChatEndpoint): boolean; export declare function isGpt54(model: LanguageModelChat | IChatEndpoint | string): boolean; export declare function isGpt55(model: LanguageModelChat | IChatEndpoint | string): boolean; export declare function isGpt56(model: LanguageModelChat | IChatEndpoint | string): boolean; export declare function isGpt53Codex(model: LanguageModelChat | IChatEndpoint | string): boolean; export declare function isKimiFamily(model: LanguageModelChat | IChatEndpoint | string): boolean; export declare function isVSCModelA(model: LanguageModelChat | IChatEndpoint): boolean; export declare function isVSCModelB(model: LanguageModelChat | IChatEndpoint): boolean; export declare function isVSCModelReplaceStringSet(model: LanguageModelChat | IChatEndpoint): boolean; export declare function isVSCModelC(model: LanguageModelChat | IChatEndpoint): boolean; export declare function isVSCModelD(model: LanguageModelChat | IChatEndpoint): boolean; export declare function isVSCModelE(model: LanguageModelChat | IChatEndpoint): boolean; export declare function isGpt52CodexFamily(model: LanguageModelChat | IChatEndpoint | string): boolean; export declare function isGpt52Family(model: LanguageModelChat | IChatEndpoint | string): boolean; /** * Returns whether the instructions should be given in a user message instead * of a system message when talking to the model. */ export declare function modelPrefersInstructionsInUserMessage(modelFamily: string): boolean; /** * Returns whether the instructions should be presented after the history * for the given model. */ export declare function modelPrefersInstructionsAfterHistory(modelFamily: string): boolean; /** * Model supports apply_patch as an edit tool. */ export declare function modelSupportsApplyPatch(model: LanguageModelChat | IChatEndpoint): boolean; /** * Model prefers JSON notebook representation. */ export declare function modelPrefersJsonNotebookRepresentation(model: LanguageModelChat | IChatEndpoint): boolean; /** * Model supports replace_string_in_file as an edit tool. */ export declare function modelSupportsReplaceString(model: LanguageModelChat | IChatEndpoint): boolean; /** * Model supports multi_replace_string_in_file as an edit tool. */ export declare function modelSupportsMultiReplaceString(model: LanguageModelChat | IChatEndpoint): boolean; /** * The model is capable of using replace_string_in_file exclusively, * without needing insert_edit_into_file. */ export declare function modelCanUseReplaceStringExclusively(model: LanguageModelChat | IChatEndpoint): boolean; /** * We should attempt to automatically heal incorrect edits the model may emit. * @note whether this is respected is currently controlled via EXP */ export declare function modelShouldUseReplaceStringHealing(model: LanguageModelChat | IChatEndpoint): boolean; /** * The model can accept image urls as the `image_url` parameter in mcp tool results. */ export declare function modelCanUseMcpResultImageURL(model: LanguageModelChat | IChatEndpoint): boolean; /** * The model can accept image urls as the `image_url` parameter in requests. */ export declare function modelCanUseImageURL(model: LanguageModelChat | IChatEndpoint): boolean; /** * The model supports native PDF document processing via document content parts. */ export declare function modelSupportsPDFDocuments(model: LanguageModelChat | IChatEndpoint): boolean; /** * The model supports explicit prompt cache breakpoints via the OpenAI * Responses API (`prompt_cache_breakpoint`). Scoped to OpenAI (GPT) models * only, since this is an OpenAI-specific Responses API feature. */ export declare function modelSupportCacheBreakPoints(model: LanguageModelChat | IChatEndpoint): boolean; /** * The model is capable of using apply_patch as an edit tool exclusively, * without needing insert_edit_into_file. */ export declare function modelCanUseApplyPatchExclusively(model: LanguageModelChat | IChatEndpoint): boolean; /** * Whether, when replace_string and insert_edit tools are both available, * verbiage should be added in the system prompt directing the model to prefer * replace_string. */ export declare function modelNeedsStrongReplaceStringHint(model: LanguageModelChat | IChatEndpoint): boolean; /** * Model can take the simple, modern apply_patch instructions. */ export declare function modelSupportsSimplifiedApplyPatchInstructions(model: LanguageModelChat | IChatEndpoint): boolean; export declare function isAnthropicFamily(model: LanguageModelChat | IChatEndpoint): boolean; export declare function isGeminiFamily(model: LanguageModelChat | IChatEndpoint | string): boolean; export declare function isMinimaxFamily(model: LanguageModelChat | IChatEndpoint): boolean; export declare function isXAiFamily(model: LanguageModelChat | IChatEndpoint): boolean; export declare function isGpt5PlusFamily(model: LanguageModelChat | IChatEndpoint | string | undefined): boolean; /** * Matches gpt-5-codex, gpt-5.1-codex, gpt-5.1-codex-mini, and any future models in this general family */ export declare function isGptCodexFamily(model: LanguageModelChat | IChatEndpoint | string | undefined): boolean; /** * GPT-5, -mini, -codex, not 5.1+ */ export declare function isGpt5Family(model: LanguageModelChat | IChatEndpoint | string | undefined): boolean; export declare function isGptFamily(model: LanguageModelChat | IChatEndpoint | string | undefined): boolean; /** * Any GPT-5.1+ model */ export declare function isGpt51Family(model: LanguageModelChat | IChatEndpoint | string | undefined): boolean; /** * This takes a sync shortcut and should only be called when a model hash would have already been computed while rendering the prompt. */ export declare function getVerbosityForModelSync(model: IChatEndpoint, responsesApiVerbosityEnabled?: boolean): 'low' | 'medium' | 'high' | undefined; /** * Tool search is supported by: * - Current-generation Claude models (4.5 and newer, including Haiku 4.5), so * new and future Claude models are picked up automatically. The pre-4.5 * generations are denied explicitly. * - OpenAI gpt-5.4 and gpt-5.5 (via Responses API client-side tool search) * * Accepts either an id string, a {@link LanguageModelChat}, or an * {@link IChatEndpoint} — when given an endpoint/chat the model **family** * is also checked, so a per-model family override (see * {@link IModelCapabilityOverride}) lights this up automatically. */ export declare function modelSupportsToolSearch(model: LanguageModelChat | IChatEndpoint | string): boolean; /** * Context editing is supported by: * - Claude Fable 5 * - Claude Haiku 4.5 * - Claude Sonnet 4 / 4.5 / 4.6 * - Claude Opus 4 / 4.1 / 4.5 / 4.6 / 4.7 / 4.8 * * Accepts either an id string, a {@link LanguageModelChat}, or an * {@link IChatEndpoint} — when given an endpoint/chat the model **family** * is also checked, so a per-model family override (see * {@link IModelCapabilityOverride}) lights this up automatically. * * Provider-agnostic: add additional model prefixes here as other providers * adopt context editing. */ export declare function modelSupportsContextEditing(model: LanguageModelChat | IChatEndpoint | string): boolean; //# sourceMappingURL=chatModelCapabilities.d.ts.map