換一個地址,SDK 照常用。
閘道器按各自的原生路徑提供 OpenAI、Anthropic 與 Gemini 協議。OpenAI SDK 的地址改為 https://llm.leaflow.cloud/v1,Anthropic SDK 用 https://llm.leaflow.cloud;Gemini 用同一地址和原生的 generateContent 路徑。請求除模型名與憑據外原樣轉發,閘道器不在協議之間轉換。只把模型發到它支援的介面。
OpenAI SDK
- 地址 https://llm.leaflow.cloud/v1
- 在 Authorization 頭裡放 Bearer 令牌
- Chat Completions、Responses 與向量嵌入
Anthropic 與 Gemini SDK
- 地址 https://llm.leaflow.cloud
- Anthropic 接受 x-api-key 或 Authorization
- Gemini 接受 x-goog-api-key 或 Authorization