[Discussion]: LiteLLM Proxy YAML Config v2.0 #1000
Replies: 6 comments 6 replies
-
from @PSU3D0 model_list:
models:
gpt-4-turbo-1106:
load_balancing:
strategy: "shuffle"
success_callback: ["langfuse"]
litellm_params:
api_version: "2023-05-15" // Overrides global scoped
providers:
azure_west_1:
litellm_params:
model: azure/gpt-4-turbo-1106
api_base: https://test1-1.openai.azure.com/
api_key: os.environ/AZURE_OAI_US_WEST_1_API_KEY
azure_east_2:
tpm: 45
metadata:
langfuse/continent: "north_america"
litellm_params:
model: azure/gpt-4-turbo-1106
api_version: "2023-03-21" //Overrides model scoped
api_base: https://test2-1.openai.azure.com/
api_key: os.environ/AZURE_OAI_US_EAST_2_API_KEY A few benefits here. Each provider is explicitly named, so if I have identical deployment names across regions in Azure, can still differentiate. Litellm params scoped to a specific litellm exposed model |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
cc @Manouchehri |
Beta Was this translation helpful? Give feedback.
-
Moving this to be a discussion for a future v2. |
Beta Was this translation helpful? Give feedback.
-
Alternative idea model_list:
- model_name: gpt-3.5-turbo # user-facing model alias
litellm_params: # all params accepted by litellm.completion() - https://docs.litellm.ai/docs/completion/input
model: azure/<your-deployment-name>
api_base: <your-azure-api-endpoint>
api_key: <your-azure-api-key>
model_info:
id: unique-123
- model_name: gpt-3.5-turbo
litellm_params:
model: azure/gpt-turbo-small-ca
api_base: https://my-endpoint-canada-berri992.openai.azure.com/
api_key: <your-azure-api-key>
model_info:
id: unique-456
- model_name: vllm-model
litellm_params:
model: openai/<your-model-name>
api_base: <your-api-base> # e.g. http://0.0.0.0:3000
model_info:
id: unique-789
router_settings: # router config
- model_group_list:
- model_group_name: "gpt-free-models" # user facing model group alias
models: ["unique-123", "unique-456"]
- model_group_name: "gpt-paid-models"
models: ["unique-789"]
- num_retries: 3
- fallbacks=[{"gpt-paid-models": ["gpt-free-models"]}]
|
Beta Was this translation helpful? Give feedback.
-
Hey @krrishdholakia, here is my take on a refactor models:
- id: unique-123
model: azure/<your-deployment-name>
api_base: <your-azure-api-endpoint>
api_key: <your-azure-api-key>
- id: unique-456
model: azure/gpt-turbo-small-ca
api_base: https://my-endpoint-canada-berri992.openai.azure.com/
api_key: <your-azure-api-key>
- id: unique-789
model: openai/<your-model-name>
api_key: <your-api-key>
router_settings:
groups:
- id: gpt-free-models
models: ["unique-123", "unique-456"]
- id: gpt-paid-models
models: ["unique-789"]
num_retries: 3
fallbacks:
- gpt-paid-models: ["gpt-free-models"]
Final YAML Structure:
These changes collectively improved the YAML specification by making it more concise, reducing unnecessary nesting, and focusing on unique identifiers for clarity and ease of configuration. Here is a real world example of how someone might use the spec models:
- id: azure-us-east-35-turbo
model: azure/gpt-3_5-turbo
api_base: https://berri-us-east.openai.azure.com/
api_key: some-key-12318231731723712
- id: azure-us-east-35-turbo
model: azure/gpt-3_5-turbo
api_base: https://berri-can-east.openai.azure.com/
api_key: some-key-5753736262525221
- id: openai-gpt-3_5_turbo
model: openai/gpt-3_5-turbo
api_key: some-key-31317123712631632
router_settings:
groups:
- id: gpt-3.5
models: ["azure-us-east-35-turbo", "azure-us-east-35-turbo", "openai-gpt-3_5_turbo"]
- id: azure-3.5
models: ["azure-can-east-35-turbo", "azure-us-east-35-turbo"]
- id: oai-3.5
models: ["openai-gpt-3_5_turbo"]
num_retries: 3
fallbacks:
- azure-3.5: ["oai-3.5"] |
Beta Was this translation helpful? Give feedback.
-
The Feature
Starting this issue to track how we can improve LiteLLM Proxy config for the next version
Motivation, pitch
Twitter / LinkedIn details
No response
Beta Was this translation helpful? Give feedback.
All reactions