Configs2026年4月6日·1 分钟阅读

LiteLLM — Universal LLM API Gateway, 100+ Providers

Unified API proxy for 100+ LLM providers including OpenAI, Anthropic, Bedrock, Azure, and Vertex AI. Drop-in OpenAI replacement with load balancing and spend tracking. 18,000+ GitHub stars.

AI
AI Open Source · Community
快速使用

先拿来用,再决定要不要深挖

这里应该同时让用户和 Agent 知道第一步该复制什么、安装什么、落到哪里。

  1. 安装: pip install litellm
  2. 设置密钥: export ANTHROPIC_API_KEY=sk-ant-...
  3. 用统一接口调用任何模型:
from litellm import completion
response = completion(model="claude-sonnet-4-20250514", messages=[{"role": "user", "content": "你好"}])

简介

LiteLLM 是一个统一的 Python SDK 和代理服务器,为 100+ LLM 提供商提供单一 OpenAI 兼容 API,GitHub 18,000+ stars。在 OpenAI、Anthropic、Azure、Bedrock 等之间无缝切换,无需修改代码。适合运行多模型策略的团队。


🙏

来源与感谢

Created by BerriAI. Licensed under MIT.

litellm — ⭐ 18,000+

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产