diff --git a/litellm/proxy/proxy_config.yaml b/litellm/proxy/proxy_config.yaml index c464deaeb..5b87ab775 100644 --- a/litellm/proxy/proxy_config.yaml +++ b/litellm/proxy/proxy_config.yaml @@ -11,6 +11,17 @@ model_list: output_cost_per_token: 0.00003 max_tokens: 4096 base_model: gpt-3.5-turbo + - model_name: gpt-vision + litellm_params: + model: azure/gpt-4-vision + base_url: https://gpt-4-vision-resource.openai.azure.com/openai/deployments/gpt-4-vision/extensions + api_key: os.environ/AZURE_VISION_API_KEY + api_version: "2023-09-01-preview" + dataSources: + - type: AzureComputerVision + parameters: + endpoint: os.environ/AZURE_VISION_ENHANCE_ENDPOINT + key: os.environ/AZURE_VISION_ENHANCE_KEY - model_name: BEDROCK_GROUP litellm_params: model: bedrock/cohere.command-text-v14 @@ -50,14 +61,14 @@ litellm_settings: # setting callback class # callbacks: custom_callbacks.proxy_handler_instance # sets litellm.callbacks = [proxy_handler_instance] -general_settings: - master_key: sk-1234 - database_type: "dynamo_db" - database_args: { # 👈 all args - https://github.com/BerriAI/litellm/blob/befbcbb7ac8f59835ce47415c128decf37aac328/litellm/proxy/_types.py#L190 - "billing_mode": "PAY_PER_REQUEST", - "region_name": "us-west-2", - "ssl_verify": False - } +# general_settings: + # master_key: sk-1234 + # database_type: "dynamo_db" + # database_args: { # 👈 all args - https://github.com/BerriAI/litellm/blob/befbcbb7ac8f59835ce47415c128decf37aac328/litellm/proxy/_types.py#L190 + # "billing_mode": "PAY_PER_REQUEST", + # "region_name": "us-west-2", + # "ssl_verify": False + # } diff --git a/litellm/tests/test_router_init.py b/litellm/tests/test_router_init.py index 36470d239..ec15cdd6e 100644 --- a/litellm/tests/test_router_init.py +++ b/litellm/tests/test_router_init.py @@ -337,6 +337,15 @@ def test_router_init_gpt_4_vision_enhancements(): "model": "azure/gpt-4-vision", "api_key": os.getenv("AZURE_API_KEY"), "base_url": "https://gpt-4-vision-resource.openai.azure.com/openai/deployments/gpt-4-vision/extensions/", + "dataSources": [ + { + "type": "AzureComputerVision", + "parameters": { + "endpoint": "os.environ/AZURE_VISION_ENHANCE_ENDPOINT", + "key": "os.environ/AZURE_VISION_ENHANCE_KEY", + }, + } + ], }, } ] @@ -351,6 +360,20 @@ def test_router_init_gpt_4_vision_enhancements(): == "https://gpt-4-vision-resource.openai.azure.com/openai/deployments/gpt-4-vision/extensions/" ) # set in env + assert ( + router.model_list[0]["litellm_params"]["dataSources"][0]["parameters"][ + "endpoint" + ] + == os.environ["AZURE_VISION_ENHANCE_ENDPOINT"] + ) + + assert ( + router.model_list[0]["litellm_params"]["dataSources"][0]["parameters"][ + "key" + ] + == os.environ["AZURE_VISION_ENHANCE_KEY"] + ) + azure_client = router._get_client( deployment=router.model_list[0], kwargs={"stream": True, "model": "gpt-4-vision-enhancements"},