@nanocollective/nanocoder
Version:
A local-first CLI coding agent that brings the power of agentic coding tools like Claude Code and Gemini CLI to local models or controlled APIs like OpenRouter
28 lines • 1.14 kB
TypeScript
import type { AIProviderConfig, AISDKCoreTool, LLMChatResponse, LLMClient, Message, ModeOverrides, StreamCallbacks } from '../types/index.js';
export declare class AISDKClient implements LLMClient {
private provider;
private currentModel;
private availableModels;
private providerConfig;
private undiciAgent;
private cachedContextSize;
private maxRetries;
constructor(providerConfig: AIProviderConfig);
/**
* Fetch and cache context size from models.dev
*/
private updateContextSize;
static create(providerConfig: AIProviderConfig): Promise<AISDKClient>;
setModel(model: string): void;
getCurrentModel(): string;
getContextSize(): number;
getMaxRetries(): number;
getAvailableModels(): Promise<string[]>;
/**
* Stream chat with real-time token updates
*/
chat(messages: Message[], tools: Record<string, AISDKCoreTool>, callbacks: StreamCallbacks, signal?: AbortSignal, modeOverrides?: ModeOverrides): Promise<LLMChatResponse>;
clearContext(): Promise<void>;
getTimeout(): number | undefined;
}
//# sourceMappingURL=ai-sdk-client.d.ts.map