import type { Api, AuthCheck, CredentialInfo, Model } from "@bastani/pi-ai"; import type { AuthStatus } from "./provider-composer.ts"; export interface ModelRuntimeSnapshot { all: readonly Model[]; available: readonly Model[]; configuredProviders: ReadonlySet; storedProviders: ReadonlySet; storedCredentialTypes: ReadonlyMap; auth: ReadonlyMap; } export declare function createEmptyModelRuntimeSnapshot(): ModelRuntimeSnapshot; export declare function createModelRuntimeSnapshot(all: readonly Model[], available: readonly Model[], checks: readonly (readonly [string, AuthCheck | undefined])[], credentials: readonly CredentialInfo[]): ModelRuntimeSnapshot; /** Identity of a model inside an availability projection. */ export declare function snapshotModelKey(model: Model): string; /** * Republish the model list without disturbing availability. Availability is a * per-model fact — a credential can entitle an account to a subset of a * provider's catalog — so it is carried over by model ID rather than recomputed * from the provider's configured status, which would widen a filtered provider * back to its whole catalog until the next availability pass lands. A provider * whose filtered result is empty stays empty for the same reason. */ export declare function updateSnapshotModels(snapshot: ModelRuntimeSnapshot, all: readonly Model[]): ModelRuntimeSnapshot; export declare function addRuntimeApiKeyProvider(snapshot: ModelRuntimeSnapshot, providerId: string): ModelRuntimeSnapshot; export declare function addStoredCredentialProvider(snapshot: ModelRuntimeSnapshot, providerId: string, type: CredentialInfo["type"]): ModelRuntimeSnapshot; export declare function replaceStoredCredentialProviders(snapshot: ModelRuntimeSnapshot, credentials: readonly CredentialInfo[]): ModelRuntimeSnapshot; export declare function removeStoredCredentialProvider(snapshot: ModelRuntimeSnapshot, providerId: string, remainingAuth?: AuthCheck): ModelRuntimeSnapshot; export declare function getSnapshotProviderAuthStatus(snapshot: ModelRuntimeSnapshot, providerId: string, hasRuntimeApiKey: boolean, configured: AuthStatus | undefined): AuthStatus; //# sourceMappingURL=model-runtime-snapshot.d.ts.map