/** * Auto-update models from iFlow API * Fetches available models from https://apis.iflow.cn/v1/models */ export interface IFlowModel { id: string; name: string; context_window: number; max_tokens: number; modalities: { input: string[]; output: string[]; }; supports_thinking?: boolean; variants?: Record; } export interface IFlowModelsResponse { data: IFlowModel[]; last_updated: string; } /** * Fetch models from iFlow API * @param apiKey - API key or OAuth token * @param authType - 'oauth' | 'apikey' */ export declare function fetchModelsFromAPI(apiKey: string, authType?: 'oauth' | 'apikey'): Promise; /** * Fetch models from web scraping (fallback) * Note: This is a fallback method if API fails */ export declare function fetchModelsFromWeb(): Promise; /** * Transform iFlow models to OpenCode format */ export declare function transformModelsToOpenCode(models: IFlowModel[]): Record; /** * Get cached models or fetch new ones */ export declare function getModels(apiKey: string | undefined, authType: 'oauth' | 'apikey' | undefined): Promise>;