import type { KlawConfig } from "../config/types.klaw.js"; import type { ModelCatalogEntry } from "./model-catalog.types.js"; import { type ModelManifestNormalizationContext, type ModelRef } from "./model-selection-normalize.js"; type ModelManifestPlugins = ModelManifestNormalizationContext["manifestPlugins"]; export type ModelAliasIndex = { byAlias: Map; byKey: Map; }; export declare function inferUniqueProviderFromConfiguredModels(params: { cfg: KlawConfig; model: string; } & ModelManifestNormalizationContext): string | undefined; export declare function inferUniqueProviderFromCatalog(params: { catalog: readonly ModelCatalogEntry[]; model: string; }): string | undefined; export declare function resolveBareModelDefaultProvider(params: { cfg: KlawConfig; catalog: readonly ModelCatalogEntry[]; model: string; defaultProvider: string; } & ModelManifestNormalizationContext): string; export declare function resolveConfiguredOpenRouterCompatAlias(params: { cfg?: KlawConfig; raw: string; defaultProvider: string; allowManifestNormalization?: boolean; allowPluginNormalization?: boolean; } & ModelManifestNormalizationContext): ModelRef | null; export declare function resolveAllowlistModelKey(params: { cfg?: KlawConfig; raw: string; defaultProvider: string; } & ModelManifestNormalizationContext): string | null; export declare function buildConfiguredAllowlistKeys(params: { cfg: KlawConfig | undefined; defaultProvider: string; } & ModelManifestNormalizationContext): Set | null; export declare function buildModelAliasIndex(params: { cfg: KlawConfig; defaultProvider: string; allowManifestNormalization?: boolean; allowPluginNormalization?: boolean; } & ModelManifestNormalizationContext): ModelAliasIndex; export declare function resolveModelRefFromString(params: { cfg?: KlawConfig; raw: string; defaultProvider: string; aliasIndex?: ModelAliasIndex; allowManifestNormalization?: boolean; allowPluginNormalization?: boolean; } & ModelManifestNormalizationContext): { ref: ModelRef; alias?: string; } | null; export declare function resolveConfiguredModelRef(params: { cfg: KlawConfig; defaultProvider: string; defaultModel: string; allowManifestNormalization?: boolean; allowPluginNormalization?: boolean; } & ModelManifestNormalizationContext): ModelRef; export declare function buildAllowedModelSetWithFallbacks(params: { cfg: KlawConfig; catalog: ModelCatalogEntry[]; defaultProvider: string; defaultModel?: string; fallbackModels: readonly string[]; allowManifestNormalization?: boolean; allowPluginNormalization?: boolean; } & ModelManifestNormalizationContext): { allowAny: boolean; allowedCatalog: ModelCatalogEntry[]; allowedKeys: Set; }; export type ModelRefStatus = { key: string; inCatalog: boolean; allowAny: boolean; allowed: boolean; }; export type ResolveAllowedModelRefResult = { ref: ModelRef; key: string; } | { error: string; }; export declare function getModelRefStatusWithFallbackModels(params: { cfg: KlawConfig; catalog: ModelCatalogEntry[]; ref: ModelRef; defaultProvider: string; defaultModel?: string; fallbackModels: readonly string[]; } & ModelManifestNormalizationContext): ModelRefStatus; export declare function resolveAllowedModelRefFromAliasIndex(params: { cfg: KlawConfig; raw: string; defaultProvider: string; aliasIndex: ModelAliasIndex; getStatus: (ref: ModelRef) => ModelRefStatus; } & ModelManifestNormalizationContext): ResolveAllowedModelRefResult; export declare function hasConfiguredProviderModelRows(cfg: KlawConfig): boolean; export declare function buildConfiguredModelCatalog(params: { cfg: KlawConfig; workspaceDir?: string; manifestPlugins?: ModelManifestPlugins; }): ModelCatalogEntry[]; export declare function resolveHooksGmailModel(params: { cfg: KlawConfig; defaultProvider: string; } & ModelManifestNormalizationContext): ModelRef | null; export declare function normalizeModelSelection(value: unknown): string | undefined; export declare function parseConfiguredModelVisibilityEntries(params: { cfg?: KlawConfig; }): { exactModelRefs: string[]; providerWildcards: Set; hasEntries: boolean; }; export declare function providerWildcardModelKey(provider: string): string; export declare function isModelKeyAllowedBySet(allowedKeys: ReadonlySet, key: string): boolean; export declare function resolveAllowedModelSelection(params: { provider: string; model: string; allowAny: boolean; allowedKeys: ReadonlySet; allowedCatalog: readonly ModelCatalogEntry[]; } & ModelManifestNormalizationContext): ModelRef | null; export type ModelVisibilityPolicy = { allowAny: boolean; allowedCatalog: ModelCatalogEntry[]; allowedKeys: Set; exactModelRefs: readonly string[]; providerWildcards: ReadonlySet; hasConfiguredEntries: boolean; hasProviderWildcards: boolean; allowsKey: (key: string) => boolean; allows: (ref: { provider: string; model: string; }) => boolean; resolveSelection: (ref: { provider: string; model: string; }) => ModelRef | null; visibleCatalog: (params: { catalog: readonly ModelCatalogEntry[]; defaultVisibleCatalog: readonly ModelCatalogEntry[]; view?: "default" | "configured" | "all"; }) => ModelCatalogEntry[]; }; export declare function createModelVisibilityPolicyWithFallbacks(params: { cfg: KlawConfig; catalog: ModelCatalogEntry[]; defaultProvider: string; defaultModel?: string; fallbackModels: readonly string[]; } & ModelManifestNormalizationContext): ModelVisibilityPolicy; export {};