import type { ProviderFn } from "./types.js"; export interface ResolvedModel { modelId: string; generate: ProviderFn; /** See `ProviderRegistration.maxInputImages`. */ maxInputImages?: number; /** See `ProviderRegistration.supportsTransparentBackground`. */ supportsTransparentBackground?: boolean; } /** * API keys per provider. Every field is optional: a provider whose key is * missing simply contributes no models. * * Keys are passed in explicitly rather than read from the environment so that * embedders (see lib.ts) can source them from their own config without having * to mutate `process.env`. Use `keysFromEnv()` for the standalone server's * historical env-var behaviour. */ export interface ProviderKeys { google?: string; openai?: string; flux?: string; reve?: string; } /** An immutable view over the models available for a given set of keys. */ export interface ImageRegistry { /** Friendly model names available, in registration order. */ readonly models: string[]; /** Preferred default model, or undefined when no keys were supplied. */ readonly defaultModel: string | undefined; /** Look up a friendly name. Throws when the model is unknown/unavailable. */ resolve(friendlyName: string): ResolvedModel; } /** * Read provider keys from an environment-like object (standalone server * behaviour). The provider-specific variable wins over the generic one for * every provider, as documented in the README — previously OpenAI alone had * this the other way round. */ export declare function keysFromEnv(env?: NodeJS.ProcessEnv): ProviderKeys; /** * Build a registry from the supplied keys. * * Never exits the process and never throws on missing keys — an empty registry * (`models.length === 0`) is a valid result that callers decide how to surface. */ export declare function createRegistry(keys: ProviderKeys): ImageRegistry; //# sourceMappingURL=registry.d.ts.map