The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
docs(vertex.md): add vertex global safety settings to doc
Krrish Dholakiaf310ce541f3e
diff --git a/docs/my-website/docs/providers/vertex.md b/docs/my-website/docs/providers/vertex.mdindex 95dac9fc09e..b8dad6ccdcb 100644--- a/docs/my-website/docs/providers/vertex.md+++ b/docs/my-website/docs/providers/vertex.md@@ -661,6 +661,7 @@ Here's how to use Vertex AI with the LiteLLM Proxy Server## Specifying Safety SettingsIn certain use-cases you may need to make calls to the models and pass [safety settigns](https://ai.google.dev/docs/safety_setting_gemini) different from the defaults. To do so, simple pass the `safety_settings` argument to `completion` or `acompletion`. For example:+### Set per model/request<Tabs>@@ -752,6 +753,65 @@ response = client.chat.completions.create(</TabItem></Tabs>+### Set Globally++<Tabs>++<TabItem value="sdk" label="SDK">++```python+import litellm++litellm.set_verbose = True 👈 See RAW REQUEST/RESPONSE++litellm.vertex_ai_safety_settings = [+ {+ "category": "HARM_CATEGORY_HARASSMENT",+ "threshold": "BLOCK_NONE",+ },+ {+ "category": "HARM_CATEGORY_HATE_SPEECH",+ "threshold": "BLOCK_NONE",+ },+ {+ "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",+ "threshold": "BLOCK_NONE",+ },+ {+ "category": "HARM_CATEGORY_DANGEROUS_CONTENT",+ "threshold": "BLOCK_NONE",+ },+ ]+response = completion(+ model="vertex_ai/gemini-pro",+ messages=[{"role": "user", "content": "write code for saying hi from LiteLLM"}]+)+```+</TabItem>+<TabItem value="proxy" label="Proxy">++```yaml+model_list:+ - model_name: gemini-experimental+ litellm_params:+ model: vertex_ai/gemini-experimental+ vertex_project: litellm-epic+ vertex_location: us-central1++litellm_settings:+ vertex_ai_safety_settings:+ - category: HARM_CATEGORY_HARASSMENT+ threshold: BLOCK_NONE+ - category: HARM_CATEGORY_HATE_SPEECH+ threshold: BLOCK_NONE+ - category: HARM_CATEGORY_SEXUALLY_EXPLICIT+ threshold: BLOCK_NONE+ - category: HARM_CATEGORY_DANGEROUS_CONTENT+ threshold: BLOCK_NONE+```+</TabItem>+</Tabs>+## Set Vertex Project & Vertex LocationAll calls using Vertex AI require the following parameters:* Your Project ID