공급자 할인
공급자 할인 (Provider Discounts)
특정 공급자에 백분율 기반 할인을 적용할 수 있어요. 공급자와 협상한 엔터프라이즈 가격에 유용해요.
출처: 문서
본문
LiteLLM Proxy 서버에서 사용하기
1단계: config.yaml에 할인 설정 추가
# Apply 5% discount to all Vertex AI and Gemini costs
litellm_settings:
cost_discount_config:
vertex_ai: 0.05 # 5% discount
gemini: 0.05 # 5% discount
openrouter: 0.05 # 5% discount
# openai: 0.10 # 10% discount (example)
2단계: 프록시 시작
litellm /path/to/config.yaml
할인은 설정된 공급자의 모든 비용 계산에 자동으로 적용돼요.
할인이 동작하는 방식
- 할인은 다른 모든 비용 계산(토큰, 캐싱, 도구 등) 이후에 적용돼요.
- 할인은 백분율이에요 (
0.05= 5%,0.10= 10% 등). - 할인은 설정된 공급자에만 적용돼요.
- 원래 비용, 할인 금액, 최종 비용이 비용 분해(cost breakdown) 로그에 기록돼요.
- 할인 정보는 응답 헤더로 반환돼요:
x-litellm-response-cost— 할인 적용 후 최종 비용x-litellm-response-cost-original— 할인 전 비용x-litellm-response-cost-discount-amount— USD로 표시된 할인 금액
지원되는 공급자 (Supported Providers)
LiteLLM이 지원하는 모든 공급자에 할인을 적용할 수 있어요. 흔한 예:
vertex_ai— Google Vertex AIgemini— Google Geminiopenai— OpenAIanthropic— Anthropicazure— Azure OpenAIbedrock— AWS Bedrockcohere— Cohereopenrouter— OpenRouter
전체 공급자 목록은 LlmProviders 열거형에서 확인할 수 있어요.