Documentation
README
LLM Provider
Critical
-
All providers MUST implement the LLMProvider interface from src/llm/types.ts with three methods:
- call(options: LLMCallOptions): Promise — single non-streaming call returning text
- stream(options: LLMStreamOptions, callbacks: LLMStreamCallbacks): Promise — streaming call invoking callbacks
- listModels?(): Promise<string[]> — optional; list available models from the API
-
Initialize client in constructor and store defaultModel from config. Example:
this.client = new YourSDK({ apiKey: config.apiKey }). Never lazy-initialize on first call — providers are instantiated once and cached in src/llm/index.ts.
This is the opening of the README. Read the full README on GitHub.