Open source2025 to 2026Author
bot-client
Multi-provider AI client: OpenAI, Anthropic, Gemini, Ollama, LM Studio. Zero-config for local; API keys for cloud. Includes Ollama API + CLI (pull, list, rm, show, ps, run) and an npx CLI for models and API keys.
Problem
Five model providers means five SDKs, five auth conventions and five response shapes. Swapping one for another, or falling back to a local model when a key is missing, becomes a refactor instead of a config change.
Approach
One factory behind a single generate call, with a provider per backend: OpenAI, Anthropic, Gemini, Ollama and LM Studio. Local models need no configuration at all, which makes the zero-key path the default rather than the fallback. An npx CLI manages Ollama models and API keys without a project to install into.
Outcome
- Published to npm as @tanvoid0/bot-client and consumed in production by portal-web.
- Ollama and LM Studio work with no API key, so the library runs offline out of the box.
- Unit and integration suites, plus a CI pipeline that gates the release.
- MIT licensed, with worked examples for plain TypeScript, React and multi-provider setups.
Stack
TypeScriptJavaScript