安全公告 — 恶意 litellm 版本 1.82.7 与 1.82.8 已从 PyPI 移除(存在 API 密钥外泄风险)。请卸载、轮换已暴露凭据,并升级至安全版本(如 1.82.9+)。运行 pip show litellm 以确认。 PyPI · README

Multi-Protocol Gateway Runbook

Set to off / 0 / false to disable a protocol without redeploying binaries.

Multi-Protocol Gateway Runbook

Feature flags

EnvDefaultEffect
GATEWAY_INBOUND_CLAUDEonMount POST /v1/messages
GATEWAY_INBOUND_GEMINIonMount Gemini generateContent routes
GATEWAY_INBOUND_RESPONSESonMount POST /v1/responses (minimal set)
GATEWAY_RELAY_THINKING_TO_CONTENToffseparate / merge thinking stream modes

Set to off / 0 / false to disable a protocol without redeploying binaries.

Prerequisites

  • Channel relay enabled (GATEWAY_CHANNEL_REGISTRY=on + channels configured)
  • PAT or JWT with workspace:chat scope
  • Upstream channels with correct providerType (openai, claude, gemini)

Smoke checks

bash
1# Claude Messages inbound -> OpenAI upstream (replace token/model)
2curl -sS -H "Authorization: Bearer $AGX_PAT" -H "Content-Type: application/json" \
3 -d '{"model":"deepseek-chat","max_tokens":64,"stream":false,"messages":[{"role":"user","content":"ping"}]}' \
4 http://127.0.0.1:8088/v1/messages
5
6# Gemini generateContent
7curl -sS -H "Authorization: Bearer $AGX_PAT" -H "Content-Type: application/json" \
8 -d '{"contents":[{"role":"user","parts":[{"text":"hi"}]}]}' \
9 "http://127.0.0.1:8088/v1beta/models/gemini-1.5-pro:generateContent"

Troubleshooting

SymptomCheck
404 on /v1/messagesGATEWAY_INBOUND_CLAUDE=off or old binary
500 channel relay requiredNo active channels / registry off
Empty streamUpstream SSE format; verify channel providerType
Rate limit mapped wrongSee adaptor/errors_map.go

Audit fields

Cross-protocol calls add inbound_protocol, outbound_protocol, reasoning_effort, thinking_mode on gateway_audit_events JSON payloads.

Made-with: Damon Li