/** * Free / freemium cloud providers that the wizard recommends setting up. * * Setting up as many as possible enables optimal provider rotation: * if one rate-limits (429), the router fails over to the next. */ import type { CloudProviderConfig } from './config-schema.js'; import type { ProviderModel, WorkerType } from './types.js'; export interface FreeProviderPreset { id: string; name: string; /** * Provider kind. 'local' presets register as local (offline-eligible) * providers and require no API key. Defaults to 'cloud' when omitted. */ type?: 'local' | 'cloud'; baseURL: string; headerName?: string; /** Where to get the API key. */ keyUrl: string; /** True = has a genuinely free tier. */ free: boolean; /** Recommended models per worker type, by id. */ recommended: Partial>; /** Known model catalog (used as fallback when /v1/models is unreachable). */ knownModels: Array & { id: string; }>; notes?: string; } export declare const FREE_PROVIDERS: FreeProviderPreset[]; /** * Local OpenAI-compatible servers the wizard can register. These speak the same * /v1/chat/completions + /v1/models API as the cloud providers but run on the * user's machine, so they need NO API key and register with type 'local' (which * makes the router apply its localBonus and include them in 'offline' mode). * * knownModels are intentionally empty: every one of these servers exposes the * currently loaded model(s) dynamically via /v1/models, so there is no fixed * catalog to hard-code. Unreachable servers are marked unhealthy by the health * check and simply skipped by the router. */ export declare const LOCAL_PROVIDERS: FreeProviderPreset[]; export declare function getProviderPreset(id: string): FreeProviderPreset | undefined; /** * Build ready-to-register config entries for every built-in local provider. * Used to register LM Studio / vLLM / SGLang / llama.cpp out of the box when the * user has not customized `config.localProviders`. */ export declare function localProviderConfigs(): CloudProviderConfig[]; export declare function toCloudProviderConfig(preset: FreeProviderPreset, apiKey: string): CloudProviderConfig;