@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
27 lines • 1.05 kB
TypeScript
import type { AIProviderConfig, AISDKCoreTool, LLMChatResponse, LLMClient, Message, 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): Promise<LLMChatResponse>;
clearContext(): Promise<void>;
}
//# sourceMappingURL=ai-sdk-client.d.ts.map