[Preview] v1.81.6 - 使用 Tool Call Tracing 的 Logs v2
已知問題 - CPU 使用量
此版本存在已知的 CPU 使用量問題。此問題已在 v1.81.9-stable 中修正。
我們建議改用 v1.81.9-stable。
部署此版本
- Docker
- Pip
docker run \
-e STORE_MODEL_IN_DB=True \
-p 4000:4000 \
docker.litellm.ai/berriai/litellm:main-v1.81.6
pip install litellm==1.81.6
主要亮點
帶有 Tool Call Tracing 的 Logs View v2 - 重新設計的 logs 介面,具備側邊面板、結構化工具視覺化,以及錯誤訊息搜尋,可更快速除錯。
讓我們開始。
帶有 Tool Call Tracing 的 Logs View v2
此版本透過 LiteLLM 重新設計的 Logs View v2 引入完整的 tool call tracing,讓開發者能在正式環境中無縫除錯並監控 AI 代理程式工作流程。
這表示您現在可以導入像是追蹤複雜的多步驟代理程式互動、除錯工具執行失敗,以及監控 MCP server 呼叫等使用案例,同時透過語法高亮保有請求/回應 payload 的完整可見性。
開發者可以透過 LiteLLM 的 UI 存取新的 Logs View,以結構化格式檢視 tool call、依錯誤訊息或請求模式搜尋 logs,並透過可摺疊的側邊面板檢視跨 session 關聯代理程式活動。
新模型 / 已更新模型
新模型支援
| 提供者 | 模型 | 上下文視窗 | 輸入 ($/100 萬 tokens) | 輸出 ($/100 萬 tokens) | 功能 |
|---|---|---|---|---|---|
| AWS Bedrock | amazon.nova-2-pro-preview-20251202-v1:0 | 1M | $2.19 | $17.50 | Chat completions、vision、video、PDF、function calling、prompt caching、reasoning |
| Google Vertex AI | gemini-robotics-er-1.5-preview | 1M | $0.30 | $2.50 | Chat completions、multimodal(文字、圖片、影片、音訊)、function calling、reasoning |
| OpenRouter | openrouter/xiaomi/mimo-v2-flash | 262K | $0.09 | $0.29 | Chat completions、function calling、reasoning |
| OpenRouter | openrouter/moonshotai/kimi-k2.5 | - | - | - | 聊天補全 |
| OpenRouter | openrouter/z-ai/glm-4.7 | 202K | $0.40 | $1.50 | Chat completions、vision、function calling、reasoning |
功能
-
- 新增 Gemini Robotics-ER 1.5 預覽支援 - PR #19845
- 支援在 GoogleAIStudioFilesHandle 中檔案擷取 - PR #20018
- 新增 /delete 端點支援 - PR #20055
- 將 custom_llm_provider 新增為 gemini 翻譯 - PR #19988
- 從 text_tokens 扣除隱含的快取 tokens,以正確計算成本 - PR #19775
- 移除 vertex ai 不支援的 prompt-caching-scope-2026-01-05 標頭 - PR #20058
- 為 anthropic gemini 快取翻譯新增停用旗標 - PR #20052
- 對 Vertex AI 上的 Anthropic,將工具訊息中的圖片 URL 轉為 base64 - PR #19896
-
- 將 imageUrl 序列化為 OCI GenAI API 的物件 - PR #19661
-
- 為 volcengine models 新增 context(deepseek-v3-2、glm-4-7、kimi-k2-thinking)- PR #19335
-
- 為 MiniMax、GLM、Xiaomi 新增 prompt caching 與 reasoning 支援 - PR #19924
-
- 新增 embeddings 支援 - PR #19660
錯誤修正
LLM API 端點
功能
-
- 新增 LiteLLM x Claude Agent SDK 整合 - PR #20035
-
- 新增支援的輸入格式文件 - PR #20073
-
Passthrough Endpoints (/{provider}_passthrough)
- 為 OpenAI passthrough 請求新增 /openai_passthrough 路由 - PR #19989
- 新增透過環境變數設定 role_mappings 的支援 - PR #19498
- 新增 Vertex AI LLM 憑證敏感關鍵字「vertex_credentials」以供遮罩 - PR #19551
- 修正回應中避免洩漏帶有提供者前綴的模型名稱 - PR #19943
- 修正 Google Vertex generateContent 模型名稱中斜線的 proxy 支援 - PR #19737, PR #19753
- 支援 Vertex AI passthrough URLs 中帶有斜線的模型名稱 - PR #19944
- 修正 router 模型在 Vertex AI passthroughs 中的回歸問題 - PR #19967
- 為 Vertex AI passthrough 模型名稱新增回歸測試 - PR #19855
錯誤
- 一般
- 修正 token 計算並重構 - PR #19696
管理端點 / UI
功能
-
Proxy CLI 驗證
-
虛擬金鑰
-
記錄檢視
- 具有側邊面板與改善 UX 的 v2 記錄檢視 - PR #20091
- 在記錄檢視中渲染「Tools」的新檢視 - PR #20093
- 新增請求/回應的漂亮列印檢視 - PR #20096
- 在 Spend Logs 端點中新增 error_message 搜尋 - PR #19960
- UI:在 ui spend logs 中新增錯誤訊息搜尋 - PR #19963
- Spend Logs:設定視窗 - PR #19918
- 修正 Spend Logs metadata 中的 error_code - PR #20015
- Spend Logs:顯示目前儲存區與保留狀態 - PR #20017
- 允許動態設定 store_prompts_in_spend_logs - PR #19913
- 文件:UI Spend Logs 設定 - PR #20197
-
模型 + 端點
-
用量與分析
-
UI 改善
-
團隊與使用者管理
-
AI Gateway 功能
錯誤
- 修正備援期間的模型名稱 - PR #20177
- 修正已定義回呼物件時的健康端點 - PR #20182
- 修正無法將使用者最大預算重設為無限 - PR #19796
- 修正非 ASCII 字元的密碼比對 - PR #19568
- 修正 DISABLE_ADMIN_ENDPOINTS 的錯誤訊息 - PR #19861
- 在編輯 guardrail 時避免清除內容過濾規則 - PR #19671
- 修正 Prompt Studio 歷史記錄以載入工具與系統訊息 - PR #19920
- 將 WATSONX_ZENAPIKEY 新增至 WatsonX 憑證 - PR #20086
- UI:Vector Store:允許選取依設定定義的模型 - PR #20031
記錄 / 防護欄 / 提示管理整合
功能
-
- 為 Langfuse、Langfuse Otel 與其他 Otel 提供者新增 litellm_callback_logging_failures_metric - PR #19636
-
一般記錄
防護欄
支出追蹤、預算與速率限制
- 新增事件驅動的全域支出查詢協調,以防止快取驚群 - PR #20030
效能 / 負載平衡 / 可靠性改善
- 修正 DB 中 router_settings 時的高 CPU 使用率 - 透過避免在 PrometheusServicesLogger 中呼叫 REGISTRY.collect() - PR #20087
- 在 Presidio 中重用 HTTP 連線 - 以防止效能下降 - PR #19964
- 全域支出查詢的事件驅動協調 - 防止快取驚群 - PR #20030
- 修正遞迴 Pydantic 驗證問題 - PR #19531
- 將參數處理重構為輔助函式以減少程式碼膨脹 - PR #19720
- 最佳化 logo 取得並解決 MCP 匯入阻礙 - PR #19719
- 使用非同步 HTTP 用戶端改善 logo 下載效能 - PR #20155
- 修正伺服器 root path 設定 - PR #19790
- 重構:將 transport context 建立擷取到獨立方法中 - PR #19794
- 新增 native_background_mode 設定,以針對特定模型覆寫 polling_via_cache - PR #19899
- 在匯入時初始化 tiktoken 環境,以啟用離線使用 - PR #19882
- 在延遲載入中使用本機快取改善 tiktoken 效能 - PR #19774
- 修正聊天完成請求中的逾時錯誤,使其能在失敗回呼中正確回報 - PR #19842
- 修正 NUM_RETRIES 的環境變數型別處理 - PR #19507
- 在 silent experiment kwargs 中使用 safe_deep_copy 以防止變動 - PR #20170
- 透過在所有其他 policy type 之後檢查 BadRequestError 來改善錯誤處理 - PR #19878
資料庫變更
Schema 更新
| 資料表 | 變更類型 | 說明 | PR | 移轉 |
|---|---|---|---|---|
LiteLLM_ManagedVectorStoresTable | 新增欄位 | 新增 team_id 和 user_id 欄位用於權限管理 | PR #19972 | Migration |
Migration 改善
- 修正 Docker:為 Prisma 產生使用正確的 schema path - PR #19631
- 解決 setup_database 中的「relation does not exist」migration 錯誤 - PR #19281
- 修正 migration 問題並改善 Docker image 穩定性 - PR #19843
- 在非 root Docker container 中以 nobody 使用者執行 Prisma generate 以提升安全性 - PR #20000
- 將 litellm-proxy-extras 版本升級至 0.4.28 - PR #20166
文件更新
- 新增 Claude Agents SDK x LiteLLM 指南 - PR #20036
- 新增食譜:將 Claude Agent SDK + MCP 與 LiteLLM 搭配使用 - PR #20081
- 修正文件中的 A2A Python SDK URL - PR #19832
- 新增 Sarvam 使用文件 - PR #19844
- 新增 embeddings 的支援輸入格式 - PR #20073
- UI 支出記錄設定文件 - PR #20197
- 在 README 的 OSS 採用者清單中新增 OpenAI Agents SDK - PR #19820
- 更新文件:移除防護欄監控的企業版需求 - PR #19833
- 新增缺少的環境變數文件 - PR #20138
- 改善文件 blog index 頁面 - PR #20188
基礎架構 / 測試改善
- 為 Router.get_valid_args 新增測試涵蓋並改善程式碼涵蓋率回報 - PR #19797
- 將 model cost map 驗證新增為 CI job - PR #19993
- 新增 Realtime API 基準測試 - PR #20074
- 在社群 helm chart 中新增 Init Containers 支援 - PR #19816
- 將 libsndfile 新增至主 Dockerfile 以支援 ARM64 音訊處理 - PR #19776
新貢獻者
- @ruanjf 首次貢獻於 https://github.com/BerriAI/litellm/pull/19551
- @moh-dev-stack 首次貢獻於 https://github.com/BerriAI/litellm/pull/19507
- @formorter 首次貢獻於 https://github.com/BerriAI/litellm/pull/19498
- @priyam-that 首次貢獻於 https://github.com/BerriAI/litellm/pull/19516
- @marcosgriselli 首次貢獻於 https://github.com/BerriAI/litellm/pull/19550
- @natimofeev 首次貢獻於 https://github.com/BerriAI/litellm/pull/19232
- @zifeo 首次貢獻於 https://github.com/BerriAI/litellm/pull/19805
- @pragyasardana 首次貢獻於 https://github.com/BerriAI/litellm/pull/19816
- @ryewilson 首次貢獻於 https://github.com/BerriAI/litellm/pull/19833
- @lizhen921 首次貢獻於 https://github.com/BerriAI/litellm/pull/19919
- @boarder7395 首次貢獻於 https://github.com/BerriAI/litellm/pull/19666
- @rushilchugh01 首次貢獻於 https://github.com/BerriAI/litellm/pull/19938
- @cfchase 首次貢獻於 https://github.com/BerriAI/litellm/pull/19893
- @ayim 首次貢獻於 https://github.com/BerriAI/litellm/pull/19872
- @varunsripad123 首次貢獻於 https://github.com/BerriAI/litellm/pull/20018
- @nht1206 首次貢獻於 https://github.com/BerriAI/litellm/pull/20046
- @genga6 首次貢獻於 https://github.com/BerriAI/litellm/pull/20009
完整變更記錄: https://github.com/BerriAI/litellm/compare/v1.81.3.rc...v1.81.6