nbonamy/multi-llm-ts
nbonamy/multi-llm-ts has 85 GitHub stars and 14 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-15 15:13 UTC. Last push 2026-10-17.
What you can do
- Universal API - Single interface for all providers
- Streaming - Real-time token-by-token responses
- Function Calling - Let models invoke tools and plugins
- Vision - Analyze images with vision-capable models
Measured star growth
- in 24h
- 0
- in 7 days
- Update delayed
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
About
A Typescript library to use LLM providers APIs in a unified way.
AIREADME.md
Originalmulti-llm-ts
A TypeScript library to use LLM provider APIs in a unified way.
Features
- Universal API - Single interface for all providers
- Streaming - Real-time token-by-token responses
- Function Calling - Let models invoke tools and plugins
- Vision - Analyze images with vision-capable models
- Structured Output - Type-safe JSON responses with Zod schemas
- Multi-turn Conversations - Build complex chat applications
- Abort Support - Cancel operations gracefully
- Usage Reporting - Track token consumption
Quick Start
npm install multi-llm-ts
import { igniteModel, loadModels, Message } from 'multi-llm-ts'
// Load models and create an instance
const config = { apiKey: process.env.OPENAI_API_KEY }
const models = await loadModels('openai', config)
const model = igniteModel('openai', models.chat[0], config)
// Generate a response
const messages = [
new Message('system', 'You are a helpful assistant'),
new Message('user', 'What is the capital of France?')
]
const response = await model.complete(messages)
console.log(response.content)
// Output: "The capital of France is Paris."
→ Continue with Quick Start Guide
Supported Providers
- Anthropic
- Azure AI
- Cerebras
- DeepSeek
- Groq
- Meta/Llama
- MistralAI
- Ollama
- OpenAI
- OpenRouter
- xAI
→ See detailed feature coverage
Examples
Check out the demo project for a real-world implementation.
# Run basic example
npm install
API_KEY=your-openai-api-key npm run example
# Run with different provider
API_KEY=your-anthropic-key ENGINE=anthropic npm run example
Contributing
Contributions are welcome! See CONTRIBUTING.md for guidelines.
Maintainers: see the npm publishing guide for the manual release workflow and credential-free trusted publishing setup.
License
MIT License - see LICENSE for details