litelm is a lightweight Python library that preserves the core routing and message-translation behavior of LiteLLM without its larger proxy and infrastructure layers. It supports provider/model routing, streaming, embeddings, text completions, tool calling, and the OpenAI Responses API. The package mirrors LiteLLM function names and response shapes so existing code can often switch with only an import change. It routes requests across 19 providers and can also target OpenAI-compatible local servers through a custom API base. Async variants are available for the major operations. Provider errors are normalized into a shared exception hierarchy. The project intentionally omits load-balancing routers, caching, budgets, token counting, agents, image generation, and other heavier features.

Features

  • Multi-provider LLM routing
  • Message format translation across providers
  • Streaming completions and embeddings
  • Function and tool calling support
  • OpenAI Responses API compatibility
  • Synchronous and asynchronous APIs

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow litelm

litelm Web Site

Other Useful Business Software
Ship Agents Faster Icon
Ship Agents Faster

Transform your applications and workflows into powerful agentic systems at global scale.

Gemini Enterprise Agent Platform lets you rapidly build, scale, govern and optimize production-ready agents grounded in your organization's data. The platform enables developers to build custom or pre-built agents for virtually any use case. New customers get $300 in free credits.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of litelm!

Additional Project Details

Programming Language

Python

Related Categories

Python Artificial Intelligence Software

Registered

29 minutes ago