import type { Api, Model, ModelSpec, RemoteCompactionConfig } from "@oh-my-pi/pi-ai/types"; import { type ConfigHeaderResolver, type ConfigHeaderSource } from "./resolve-config-value.js"; import { type ModelPatch } from "./model-patch.js"; import type { ModelOverride, ProviderAuthMode } from "./models-config-schema.js"; export interface CustomModelDefinitionLike extends ModelPatch { id: string; api?: Api; baseUrl?: string; cost?: Model["cost"]; } export interface CustomModelBuildOptions { useDefaults: boolean; } export interface CustomModelOverlay extends ModelPatch { id: string; provider: string; api: Api; baseUrl: string; cost?: Model["cost"]; isOAuth?: boolean; } export declare function mergeAuthHeaderSources(sources: readonly ConfigHeaderSource[], authHeader: boolean | undefined, apiKeyConfig: string | undefined): ConfigHeaderResolver | undefined; export declare function buildCustomModelOverlay(providerName: string, providerBaseUrl: string, providerApi: Api | undefined, providerHeaders: Record | undefined, providerApiKey: string | undefined, authHeader: boolean | undefined, providerCompat: ModelSpec["compat"] | undefined, providerAuth: ProviderAuthMode | undefined, providerRemoteCompaction: RemoteCompactionConfig | undefined, modelDef: CustomModelDefinitionLike): CustomModelOverlay | undefined; export declare function finalizeCustomModel(resolvedModel: CustomModelOverlay, options: CustomModelBuildOptions): Model; export declare function normalizeSuppressedSelector(selector: string, hasLiveModel?: (provider: string, id: string) => boolean): string; /** * Look up a model's override, falling back to entries keyed by retired * effort-tier variant ids (models.yml authored before collapsing). A raw key * only re-binds when no live model holds that id. */ export declare function resolveModelOverrideWithAliases(overrides: Map, model: Model, hasLiveModel: (provider: string, id: string) => boolean): ModelOverride | undefined;