v1.91.0 - MCP OAuth v2、Rust OCR Gateway 與 Realtime 效能
部署此版本
- Docker
- Pip
docker run \
-e STORE_MODEL_IN_DB=True \
-p 4000:4000 \
docker.litellm.ai/berriai/litellm:1.91.0
pip install litellm==1.91.0
主要亮點
- MCP Gateway OAuth 2.0 v2 resolver - 一個新的共用 OAuth token 基礎,具備跨複本 single-flight refresh、帶有型別化結果的 outbound-credentials 套件,以及首個遷移到 v2 resolver 的 authorization_code。
- Rust OCR gateway - 一個新的 LiteLLM Rust 工作區,推出以 async-first 為核心的 Mistral OCR bridge,直接封裝進 LiteLLM wheel,並附帶一個以 Axum 為基礎的 experimental realtime AI gateway。
- Realtime API 效能 - upstream connection-pool 預熱與 client-disconnect 取消機制,縮短 session 建立延遲並停止浪費 upstream 工作。
- 最小權限 MCP 預設值 - team keys 現在可預設為最小權限 MCP 存取、透過 sentinel 範圍限定為零個 MCP servers,並以受信任的 X-Forwarded-For hop counts 強化 client-IP 解析。
- 約 48 個新模型 - 大批 Cloudflare Workers AI、Gemini 3 image models、Mistral Medium 3.5 / OCR 3 與 4、GLM/zai、SambaNova,以及 AI/ML image models。
新提供者與端點
新提供者(2 個新提供者)
| 提供者 | 支援的 LiteLLM 端點 | 描述 |
|---|---|---|
Amazon Bedrock Mantle (bedrock_mantle) | 聊天補全 | 透過 api_base 的 VPC endpoint routing 提供 Bedrock Mantle 支援,並作為其自身的 Add Model 提供者曝光 - PR #31034, PR #31141 |
OpenSandbox (opensandbox) | Sandbox / code interpreter | 新的 sandbox 提供者,供 code-interpreter loop 使用 - PR #31024 |
新的 LLM API 端點
| 功能 | 描述 | 文件 |
|---|---|---|
| Rust OCR (Mistral) | 一個新的 LiteLLM Rust 工作區推出以 async-first 為核心的 Mistral OCR bridge,封裝進 LiteLLM wheel - PR #31033, PR #31253, PR #31267 | OCR |
| Code interpreter | Responses API 上的 Sandbox code-interpreter interceptor,以及 chat-completions code-interpreter loop - PR #30905, PR #31027 | Sandbox |
新模型 / 更新模型
新模型支援(約 48 個新模型)
| 提供者 | 模型 | 上下文 | 輸入($/100萬) | 輸出($/100萬) | 功能 |
|---|---|---|---|---|---|
| Gemini / Vertex AI | gemini-3-pro-image, gemini-3.1-flash-image(+ gemini/、vertex_ai/ variants) | 1M | 每張影像 | 每張影像 | 影像生成、GA pricing |
| AI/ML | aiml/openai/gpt-image-2 | - | 每張影像 | 每張影像 | 影像生成 |
| Cloudflare Workers AI | 約 28 個文字生成模型(Llama 3.x/4、Qwen 2.5/3/QwQ、GLM 4.7/5.2、Kimi K2.6/K2.7、gpt-oss 20b/120b、Gemma、Granite、Nemotron、DeepSeek-R1 distill、Mistral、Llama Guard) | 視情況而定 | 視情況而定 | 視情況而定 | 透過 OpenAI-compatible endpoint 的原生 Workers AI |
| Mistral | mistral-medium-2508, mistral-medium-2604, mistral-medium-latest(Medium 3.5), mistral-ocr-2512(OCR 3), mistral-ocr-4-0(OCR 4) | 視情況而定 | 視情況而定 | 視情況而定 | Chat、OCR |
| SambaNova | sambanova/DeepSeek-V3.2, sambanova/gemma-4-31B-it | 視情況而定 | 視情況而定 | 視情況而定 | 聊天 |
| zai / OpenRouter | zai/glm-4.7-flash, zai/glm-5.1, openrouter/z-ai/glm-5.1 | 視情況而定 | 視情況而定 | 視情況而定 | 聊天 |
| Bedrock | amazon.titan-embed-g1-text-02 | - | embedding | - | 嵌入 |
| Darkbloom | darkbloom/gemma-4-26b, darkbloom/gpt-oss-20b | 視情況而定 | 視情況而定 | 視情況而定 | 聊天 |
各模型精確的 context window 與價格列於 model_prices_and_context_window.json。
功能
- Fireworks AI
- 與完整 Fireworks API surface 同步的 chat completions endpoint - PR #30885
- Cloudflare
- Mistral
- AI/ML
- 新增
openai/gpt-image-2image model - PR #31323
- 新增
- Rerank
- 約 15 個提供者的 rerank transformation 更新(Cohere v1/v2、Voyage、Jina、Vertex、Bedrock、Hugging Face、hosted vLLM、DashScope、DeepInfra、NVIDIA NIM、Fireworks、Watsonx)- PR #31185
- DeepSeek / GitHub Copilot / Moonshot
- Chat transformation 更新 - PR #31185
錯誤修正
- Anthropic
- Bedrock
- 僅展開來自設定來源的 AWS credential references - PR #30867
- 防止 key-level
metadata.tags洩漏到 Bedrock passthrough body - PR #30985 - 在
InvalidIdentityToken上顯示 web-identity tokenaud/iss- PR #31412 - 移除 Claude Opus 4.7/4.8 的 Converse 不支援
toolSpec.strict欄位 - PR #31582 - 符合
tool_configcache injection points 的 cache TTL - PR #31929
- Vertex AI
LLM API 端點
功能
- Responses API
- Realtime API
- OCR
- Batches
- 將 OpenAI 串流到 Vertex batch JSONL 上傳 - PR #31036
- 轉送
- 網路搜尋
錯誤
- Realtime API
- 一般
管理端點 / UI
功能
- 虛擬金鑰與團隊
- SCIM
- Proxy CLI / Auth
- 在
lite login上鑄造每個 session 的代理程式憑證 - PR #31072
- 在
- 設定與外掛
- UI
錯誤
- UI
- Auth 與 Management
- 在 auth 接縫處一次性將呼叫者身分解析為 Principal - PR #30887
- 將 auth-path team 物件快取在 canonical
team_idkey 下 - PR #31418 - 在管理物件快取寫入時遵守
user_api_key_cache_ttl- PR #31504 - 拒絕 proxy body 中的
model_list,並管制 advisor client credentials - PR #30585 - 從
key/infoclient 錯誤訊息中隱藏 API 金鑰 - PR #31342 - 停止在
get_config中對 email/slack alerting env vars 進行雙重解密 - PR #31117 - 將團隊
budget_limits序列化為jsonify_team_object中的 JSON - PR #31045 - 阻止伺服器憑證洩漏到呼叫者提供的
api_base- PR #30682 - 恢復無 team 的金鑰存取所有團隊模型 - PR #32032
AI 整合
記錄
- Prometheus
- OpenTelemetry
- 一般
- 新增
POST /v1/callbacks/logs,讓回放記錄酬載透過回呼傳遞 - PR #31134
- 新增
防護欄
- Bedrock Guardrails
- 在
apply_guardrail中依原始角色選取最新的使用者訊息 - PR #30482
- 在
- 一般
支出追蹤、預算與速率限制
- 成本追蹤
- 在支出記錄上儲存
litellm_call_id,以便 DB-to-trace 對應 - PR #31344 - 在成本追蹤中保留 Anthropic
server_tool_useweb-search 用量 - PR #31355 - 恢復每次查詢的 Gemini 3.x web-search 計費 - PR #31363
- 在成本追蹤中保留 Gemini Embedding 2
usageMetadata- PR #31354 - 更正區域處理加成僅適用於 gpt-5.4/5.5 系列 - PR #31136
- 將所有每個 deployment 的定價覆寫與同層 deployment 分離 - PR #31021
- 在支出記錄上儲存
- 支出 UI 與端點
MCP 閘道
- OAuth 2.0 v2 解析器
- 共用 OAuth 權杖基礎:challenge、store seam、具到期感知的快取、single-flight 重新整理 - PR #31275
- 以型別化的 Result 建立
outbound_credentials套件骨架 - PR #31047 - 新增
resolve_credentials派發骨架 - PR #31056 - 將 v2 解析器嫁接到
_create_mcp_client(none + api_key static family)- PR #31058 - 將 authorization_code MCP 遷移到 v2 解析器(單副本)[1/2] - PR #31473
- 跨副本的單飛重新整理,用於 v2 每位使用者 OAuth 儲存庫 [2/2] - PR #31493
- 使用上游
resource_metadata來 challenge delegate-auth OAuth 伺服器 - PR #31255 - 支援上游 OAuth 權杖端點的
client_secret_basic- PR #31635
- 存取控制
- X-Forwarded-For 強化
- 錯誤修正
- 停止在 AI Hub 與公開 hub API 上公開 MCP 伺服器 URL - PR #30902
- 停止將
/mcp路徑上的驗證失敗顯示為已取消的工具請求 - PR #31011 - 依伺服器已知前綴解析 toolset 工具 - PR #31254
- 停止在 MCP 用戶端中記錄 tool-call 輸入 - PR #31393
- 持久化來自 on-create MCP OAuth Authorize & Fetch 的 DCR
client_id- PR #31920 - 持久化 DCR
client_id,使互動式 OAuth 權杖重新整理能正常運作 - PR #31912 - 將
tools/list401 驗證失敗在單伺服器路由上顯示為 challenge - PR #31921
效能 / 負載平衡 / 可靠性改善
- 串流與即時
- 路由與逾時
- 快取與 proxy
- 將 Redis 命名空間套用到所有金鑰操作 - PR #31288
- 迴圈範圍內的非同步 Lua script 註冊 - PR #31501
- 針對每個請求重新建構的
_get_all_llm_api_params進行記憶化 - PR #31430 - 預先計算 service-tier cost-key 後綴 - PR #31431
- 限制超大請求造成的 event loop 阻塞 - PR #31497
- 停止每次重新載入時都增長的 pass-through route registry - PR #31314
- 只在存在時移除
safe_dumps中的 NUL 位元組 - PR #31424 - Semantic-caching(Redis/Qdrant)與 embedding-router 更新 - PR #31305
- 供應鏈與建置
文件更新
- 新增 MCP 伺服器變更指南 - PR #31038
新貢獻者
此版本僅包含既有維護者的變更;在此期間沒有新貢獻者。