Skip to content

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]

(Docs) connect litellm to open web ui (#9040)

Ishaan Jaff958e71b90694
diff --git a/docs/my-website/docs/tutorials/litellm_proxy_aporia.md b/docs/my-website/docs/tutorials/litellm_proxy_aporia.md
index 3b5bada2bce..143512f99c2 100644
--- a/docs/my-website/docs/tutorials/litellm_proxy_aporia.md
+++ b/docs/my-website/docs/tutorials/litellm_proxy_aporia.md
@@ -2,9 +2,9 @@ import Image from '@theme/IdealImage';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
-# Use LiteLLM AI Gateway with Aporia Guardrails
+# Aporia Guardrails with LiteLLM Gateway
-In this tutorial we will use LiteLLM Proxy with Aporia to detect PII in requests and profanity in responses
+In this tutorial we will use LiteLLM AI Gateway with Aporia to detect PII in requests and profanity in responses
## 1. Setup guardrails on Aporia
diff --git a/docs/my-website/docs/tutorials/openweb_ui.md b/docs/my-website/docs/tutorials/openweb_ui.md
new file mode 100644
index 00000000000..d020155e75c
--- /dev/null
+++ b/docs/my-website/docs/tutorials/openweb_ui.md
@@ -0,0 +1,73 @@
+import Image from '@theme/IdealImage';
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
+# OpenWeb UI with LiteLLM
+
+This guide walks you through connecting OpenWeb UI to LiteLLM. Using LiteLLM with OpenWeb UI allows teams to
+- Access 100+ LLMs on OpenWeb UI
+- Track Spend / Usage, Set Budget Limits
+- Send Request/Response Logs to logging destinations like langfuse, s3, gcs buckets, etc.
+- Set access controls eg. Team 1 can only access gpt-4o, Team 2 can only access o1-preview
+
+## Quickstart
+
+- Make sure to setup LiteLLM with the [LiteLLM Getting Started Guide](https://docs.litellm.ai/docs/proxy/docker_quick_start)
+
+
+### 1. Connect OpenWeb UI to LiteLLM
+
+- OpenWebUI starts running on [http://localhost:3000](http://localhost:3000)
+- LiteLLM starts running on [http://localhost:4000](http://localhost:4000)
+
+### 2. Create a Virtual Key on LiteLLM
+
+Navigate to [http://localhost:4000/ui](http://localhost:4000/ui) and create a new virtual Key.
+
+LiteLLM allows you to specify what models are available on OpenWeb UI (by specifying the models the key will have access to).
+
+<Image img={require('../../img/litellm_make_key_openweb.gif')} />
+
+### 3. Connect OpenWeb UI to LiteLLM
+
+On OpenWeb UI, navigate to Settings -> Connections and create a new connection to LiteLLM
+
+Enter the following details:
+- URL: `http://localhost:4000` (your litellm proxy base url)
+- Key: `your-virtual-key` (the key you created in the previous step)
+
+<Image img={require('../../img/litellm_setup_openweb.gif')} />
+
+### 4. Test it
+
+On the top left corner, select models you should only see the models you gave the key access to in Step 2.
+
+Once you selected a model, enter your message content and click on `Submit`
+
+<Image img={require('../../img/basic_litellm.gif')} />
+
+## Render `thinking` content on OpenWeb UI
+
+OpenWebUI requires reasoning/thinking content to be rendered with `<think></think>` tags. In order to render this for specific models, you can use the `merge_reasoning_content_in_choices` litellm parameter.
+
+Example litellm config.yaml:
+
+```yaml
+model_list:
+ - model_name: thinking-anthropic-claude-3-7-sonnet
+ litellm_params:
+ model: bedrock/us.anthropic.claude-3-7-sonnet-20250219-v1:0
+ thinking: {"type": "enabled", "budget_tokens": 1024}
+ max_tokens: 1080
+ merge_reasoning_content_in_choices: true
+```
+
+### Test it on OpenWeb UI
+
+On the models dropdown select `thinking-anthropic-claude-3-7-sonnet`
+
+<Image img={require('../../img/litellm_thinking_openweb.gif')} />
+
+
+
+
diff --git a/docs/my-website/img/basic_litellm.gif b/docs/my-website/img/basic_litellm.gif
new file mode 100644
index 00000000000..d4cf9fd52af
Binary files /dev/null and b/docs/my-website/img/basic_litellm.gif differ
diff --git a/docs/my-website/img/litellm_make_key_openweb.gif b/docs/my-website/img/litellm_make_key_openweb.gif
new file mode 100644
index 00000000000..13b1a814533
Binary files /dev/null and b/docs/my-website/img/litellm_make_key_openweb.gif differ
diff --git a/docs/my-website/img/litellm_setup_openweb.gif b/docs/my-website/img/litellm_setup_openweb.gif
new file mode 100644
index 00000000000..5618660d6c4
Binary files /dev/null and b/docs/my-website/img/litellm_setup_openweb.gif differ
diff --git a/docs/my-website/img/litellm_thinking_openweb.gif b/docs/my-website/img/litellm_thinking_openweb.gif
new file mode 100644
index 00000000000..385db583a42
Binary files /dev/null and b/docs/my-website/img/litellm_thinking_openweb.gif differ
diff --git a/docs/my-website/sidebars.js b/docs/my-website/sidebars.js
index 40e8b2c6ff7..6d649e6f78e 100644
--- a/docs/my-website/sidebars.js
+++ b/docs/my-website/sidebars.js
@@ -256,7 +256,6 @@ const sidebars = {
"completion/batching",
"completion/mock_requests",
"completion/reliable_completions",
- 'tutorials/litellm_proxy_aporia',
]
},
@@ -357,23 +356,6 @@ const sidebars = {
label: "LangChain, LlamaIndex, Instructor Integration",
items: ["langchain/langchain", "tutorials/instructor"],
},
- {
- type: "category",
- label: "Tutorials",
- items: [
-
- 'tutorials/azure_openai',
- 'tutorials/instructor',
- "tutorials/gradio_integration",
- "tutorials/huggingface_codellama",
- "tutorials/huggingface_tutorial",
- "tutorials/TogetherAI_liteLLM",
- "tutorials/finetuned_chat_gpt",
- "tutorials/text_completion",
- "tutorials/first_playground",
- "tutorials/model_fallbacks",
- ],
- },
],
},
{
@@ -431,6 +413,31 @@ const sidebars = {
"observability/opik_integration",
],
},
+ {
+ type: "category",
+ label: "Tutorials",
+ items: [
+ "tutorials/openweb_ui",
+ 'tutorials/litellm_proxy_aporia',
+ {
+ type: "category",
+ label: "LiteLLM Python SDK Tutorials",
+ items: [
+
+ 'tutorials/azure_openai',
+ 'tutorials/instructor',
+ "tutorials/gradio_integration",
+ "tutorials/huggingface_codellama",
+ "tutorials/huggingface_tutorial",
+ "tutorials/TogetherAI_liteLLM",
+ "tutorials/finetuned_chat_gpt",
+ "tutorials/text_completion",
+ "tutorials/first_playground",
+ "tutorials/model_fallbacks",
+ ],
+ },
+ ]
+ },
{
type: "category",
diff --git a/litellm/proxy/proxy_config.yaml b/litellm/proxy/proxy_config.yaml
index 6341b3f74a2..388040dbdb1 100644
--- a/litellm/proxy/proxy_config.yaml
+++ b/litellm/proxy/proxy_config.yaml
@@ -20,13 +20,8 @@ general_settings:
primary_secret_name: "litellm_secrets"
- model_name: bedrock/us.anthropic.claude-3-7-sonnet-20250219-v1:0
litellm_params:
-
model: bedrock/us.anthropic.claude-3-7-sonnet-20250219-v1:0
thinking: {"type": "enabled", "budget_tokens": 1024}
max_tokens: 1080
merge_reasoning_content_in_choices: true
-
-general_settings:
- store_model_in_db: true
- store_prompts_in_spend_logs: true