lmrouter  by LMRouter

AI API router for unified access to diverse model providers

Created 4 months ago
266 stars

Top 96.3% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

LMRouter is an open-source AI API router providing developers a unified interface to connect with diverse AI model providers and services. It simplifies integration by abstracting multiple API keys and accounts into a single access point for language, image, audio, and more.

How It Works

This project acts as an all-in-one API router, abstracting the complexity of interacting with various AI service providers. It routes requests through a single interface, supporting multiple modalities like chat completions, image generation, and speech-to-text. Its core advantage is consolidating access to numerous providers (e.g., OpenAI-compatible, Anthropic-compatible) under one API key, streamlining development.

Quick Start & Requirements

Requires Node.js and pnpm. Clone the repo (git clone https://github.com/LMRouter/lmrouter), install dependencies (pnpm i), and configure providers in config/config.yaml. Run locally with pnpm dev or build/start for production (pnpm build && pnpm start). Alternatively, use pnpx @lmrouter/cli /path/to/config.yaml.

Highlighted Details

  • API Compatibility: Drop-in support for OpenAI and Anthropic API endpoints (chat, image, audio, embeddings).
  • Multi-Provider Support: Integrates with OpenAI-compatible (OpenAI, Google, Perplexity, Groq) and Anthropic-compatible (Anthropic, Bedrock) services.
  • Multi-Runtime Deployment: Deployable via Node.js or as Cloudflare Workers.
  • Multi-Modal Support: Supports Language, Image, Audio, with planned additions for Video, Search, and Code execution.

Maintenance & Community

LMRouter fosters community-driven development, encouraging contributions via pull requests. A Kanban board outlines the roadmap. Open issues labeled "good first issue" are available for new contributors.

Licensing & Compatibility

Licensed under the MIT License, permitting commercial use and integration into closed-source applications.

Limitations & Caveats

Features like video generation, web search APIs, and code execution are marked "coming soon." The README does not detail specific performance benchmarks or known bugs.

Health Check
Last Commit

2 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
26 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.