diff --git a/litellm/proxy/_new_secret_config.yaml b/litellm/proxy/_new_secret_config.yaml index 1a1258a419..81244f0fa0 100644 --- a/litellm/proxy/_new_secret_config.yaml +++ b/litellm/proxy/_new_secret_config.yaml @@ -1,9 +1,5 @@ model_list: - - model_name: azure-mistral + - model_name: groq-llama3 litellm_params: - model: azure_ai/mistral - api_key: os.environ/AZURE_AI_MISTRAL_API_KEY - api_base: os.environ/AZURE_AI_MISTRAL_API_BASE - -litellm_settings: - drop_params: true \ No newline at end of file + model: groq/llama3-groq-70b-8192-tool-use-preview + api_key: os.environ/GROQ_API_KEY diff --git a/litellm/utils.py b/litellm/utils.py index ef4daec5eb..5ec7b52f5d 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -3667,16 +3667,25 @@ def get_optional_params( + litellm.openai_compatible_providers ): # for openai, azure we should pass the extra/passed params within `extra_body` https://github.com/openai/openai-python/blob/ac33853ba10d13ac149b1fa3ca6dba7d613065c9/src/openai/resources/models.py#L46 - extra_body = passed_params.pop("extra_body", {}) - for k in passed_params.keys(): - if k not in default_params.keys(): - extra_body[k] = passed_params[k] - optional_params.setdefault("extra_body", {}) - optional_params["extra_body"] = {**optional_params["extra_body"], **extra_body} + if ( + _should_drop_param( + k="extra_body", additional_drop_params=additional_drop_params + ) + is False + ): + extra_body = passed_params.pop("extra_body", {}) + for k in passed_params.keys(): + if k not in default_params.keys(): + extra_body[k] = passed_params[k] + optional_params.setdefault("extra_body", {}) + optional_params["extra_body"] = { + **optional_params["extra_body"], + **extra_body, + } - optional_params["extra_body"] = _ensure_extra_body_is_safe( - extra_body=optional_params["extra_body"] - ) + optional_params["extra_body"] = _ensure_extra_body_is_safe( + extra_body=optional_params["extra_body"] + ) else: # if user passed in non-default kwargs for specific providers/models, pass them along for k in passed_params.keys():