/** * Centralized Provider Configuration (consumer facade) * * The single source of truth for each provider's models is its own * `src/llm/providers/.models.ts` descriptor. This module aggregates the * built-in descriptors into the shapes the rest of the codebase already consumes * (PROVIDER_REGISTRY + model lookups) so that no component hand-maintains a * second copy of model metadata. */ import type { ProviderDescriptor } from '../plugins/plugin-api.types.js'; import type { ModelPricing } from '../types/model.types.js'; import { BuiltinProviders, ModelName, ModelNameValue, ProviderName } from '../types/provider-names.types.js'; /** * Re-export for backward compatibility */ export { BuiltinProviders, ModelName }; export type { ModelNameValue, ProviderName }; export interface ModelMode { mode: string; model: string; } /** Provider metadata is the provider's descriptor plus its registry key. */ export type ProviderMetadata = ProviderDescriptor & { key: ProviderName; }; /** * Comprehensive provider registry, derived from the per-provider descriptors. */ export declare const PROVIDER_REGISTRY: Record; /** * Default context window size for unknown models */ export declare const DEFAULT_CONTEXT_WINDOW = 128000; /** * Get context window size for a model (accepts the registry alias or a resolved API id). */ export declare function getModelContextWindow(model: string): number; /** * Get pricing for a model (accepts the registry alias or a resolved API id). * Returns undefined when the model has no declared pricing. */ export declare function getModelPricing(model: string): ModelPricing | undefined; /** * Resolve a registry alias to the vendor's real API id (standard or Vertex form). * Returns the input unchanged when the provider declares no mapping (alias === API id). */ export declare function resolveApiModelId(model: string, useVertex?: boolean): string; /** * Provider keys as a type-safe array */ export declare const PROVIDER_KEYS: Array; /** * Get all provider keys */ export declare function getAllProviderKeys(): Array; /** * Get provider metadata by key */ export declare function getProviderMetadata(key: string): ProviderMetadata | undefined; /** * Get all providers that require API keys */ export declare function getProvidersRequiringApiKey(): Array; /** * Get all providers that don't require API keys */ export declare function getProvidersWithoutApiKey(): Array; /** * Check if a model exists for a provider */ export declare function hasModel(providerKey: string, model: string): boolean; /** * Get all unique models for a provider */ export declare function getProviderModels(providerKey: string): Array; /** * Get all unique models across all providers */ export declare function getAllModels(): Array; /** * Get default model for a provider */ export declare function getDefaultModel(providerKey: string): string | undefined; /** * Validate provider key */ export declare function isValidProvider(key: string): key is ProviderName; //# sourceMappingURL=providers.config.d.ts.map