import { NanogptModel } from "../providers/nanogpt.js"; import { ConfigManager } from "../config-manager.js"; /** * API response structure from NanoGPT models endpoint */ interface ApiModel { id: string; name?: string; context_length?: number; max_output_tokens?: number; capabilities?: { reasoning?: boolean; vision?: boolean; }; pricing?: { prompt: number; completion: number; currency?: string; unit?: string; }; created?: number; } /** * Custom error class for NanoGPT API errors */ export declare class NanogptApiError extends Error { statusCode?: number | undefined; code: string; constructor(message: string, statusCode?: number | undefined, code?: string); } /** * Fetches available models from the NanoGPT API. * * @param apiKey - The NanoGPT API key for authentication * @returns Promise resolving to an array of NanogptModel objects * @throws NanogptApiError if the request fails */ export declare function fetchModels(apiKey: string): Promise; /** * Transforms an API model response into the OpenCode NanogptModel format. * * @param apiModel - The raw model data from the NanoGPT API * @returns A NanogptModel object configured for OpenCode */ export declare function transformApiModel(apiModel: ApiModel): NanogptModel; /** * Fetches models from the NanoGPT API and updates the configuration file. * * @param configManager - ConfigManager instance for surgical config edits * @param filePath - Path to the OpenCode configuration file * @param apiKey - The NanoGPT API key for authentication * @throws NanogptApiError if the API request fails * @throws Error if config update fails */ export declare function updateModelsFromApi(configManager: ConfigManager, filePath: string, apiKey: string): Promise; export {}; //# sourceMappingURL=nanogpt.d.ts.map