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
(Tutorial) Onboard Users for AI Exploration (#11955)
Krish Dholakia3224b0f4fee3
diff --git a/docs/my-website/docs/tutorials/default_team_self_serve.md b/docs/my-website/docs/tutorials/default_team_self_serve.mdnew file mode 100644index 00000000000..601f20fc720--- /dev/null+++ b/docs/my-website/docs/tutorials/default_team_self_serve.md@@ -0,0 +1,77 @@+import Image from '@theme/IdealImage';+import Tabs from '@theme/Tabs';+import TabItem from '@theme/TabItem';++# Onboard Users for AI Exploration++v1.73.0 introduces the ability to assign new users to Default Teams. This makes it much easier to enable experimentation with LLMs within your company, by allowing users to sign in and create $10 keys for AI exploration.+++### 1. Create a team++Create a team called `internal exploration` with:+- `models`: access to specific models (e.g. `gpt-4o`, `claude-3-5-sonnet`)+- `max budget`: The team max budget will ensure spend for the entire team never exceeds a certain amount.+- `reset budget`: Set this to monthly. LiteLLM will reset the budget at the start of each month.+- `team member max budget`: The team member max budget will ensure spend for an individual team member never exceeds a certain amount.++<Image img={require('../../img/create_default_team.png')} style={{ width: '600px', height: 'auto' }} />++### 2. Update team member permissions++Click on the team you just created, and update the team member permissions under `Member Permissions`.++This will allow all team members, to create keys.++<Image img={require('../../img/team_member_permissions.png')} style={{ width: '600px', height: 'auto' }} />+++### 3. Set team as default team++Go to `Internal Users` -> `Default User Settings` and set the default team to the team you just created.++Let's also set the default models to `no-default-models`. This means a user can only create keys within a team.++<Image img={require('../../img/default_user_settings_with_default_team.png')} style={{ width: '1000px', height: 'auto' }} />++### 4. Test it!++Let's create a new user and test it out.++#### a. Create a new user++Create a new user with email `[email protected]`.++<Image img={require('../../img/create_user.png')} style={{ width: '600px', height: 'auto' }} />++Once you click `Create User`, you will get an invitation link, save it for later.++#### b. Verify user is added to the team++Click on the created user, and verify they are added to the team.++We can see the user is added to the team, and has no default models.++<Image img={require('../../img/user_info_with_default_team.png')} style={{ width: '1000px', height: 'auto' }} />++#### c. Login as user++Now use the invitation link from 4a. to login as the user.++<Image img={require('../../img/new_user_login.png')} style={{ width: '600px', height: 'auto' }} />++#### d. Verify you can't create keys without specifying a team++You should see a message saying you need to select a team.++<Image img={require('../../img/create_key_no_team.png')} style={{ width: '1000px', height: 'auto' }} />++#### e. Verify you can create a key when specifying a team++<Image img={require('../../img/create_key_with_default_team.png')} style={{ width: '1000px', height: 'auto' }} />++Success!++You should now see the created key++<Image img={require('../../img/create_key_with_default_team_success.png')} style={{ width: '600px', height: 'auto' }} />\ No newline at end of filediff --git a/docs/my-website/img/create_default_team.png b/docs/my-website/img/create_default_team.pngnew file mode 100644index 00000000000..0b3354c9f34Binary files /dev/null and b/docs/my-website/img/create_default_team.png differdiff --git a/docs/my-website/img/create_key_no_team.png b/docs/my-website/img/create_key_no_team.pngnew file mode 100644index 00000000000..63df5867455Binary files /dev/null and b/docs/my-website/img/create_key_no_team.png differdiff --git a/docs/my-website/img/create_key_with_default_team.png b/docs/my-website/img/create_key_with_default_team.pngnew file mode 100644index 00000000000..d83605f5638Binary files /dev/null and b/docs/my-website/img/create_key_with_default_team.png differdiff --git a/docs/my-website/img/create_key_with_default_team_success.png b/docs/my-website/img/create_key_with_default_team_success.pngnew file mode 100644index 00000000000..39cc30cc0c9Binary files /dev/null and b/docs/my-website/img/create_key_with_default_team_success.png differdiff --git a/docs/my-website/img/create_user.png b/docs/my-website/img/create_user.pngnew file mode 100644index 00000000000..abb2ff6a9ffBinary files /dev/null and b/docs/my-website/img/create_user.png differdiff --git a/docs/my-website/img/default_user_settings_with_default_team.png b/docs/my-website/img/default_user_settings_with_default_team.pngnew file mode 100644index 00000000000..3e19c557322Binary files /dev/null and b/docs/my-website/img/default_user_settings_with_default_team.png differdiff --git a/docs/my-website/img/new_user_login.png b/docs/my-website/img/new_user_login.pngnew file mode 100644index 00000000000..497cb47c25dBinary files /dev/null and b/docs/my-website/img/new_user_login.png differdiff --git a/docs/my-website/img/team_member_permissions.png b/docs/my-website/img/team_member_permissions.pngnew file mode 100644index 00000000000..3719e14f484Binary files /dev/null and b/docs/my-website/img/team_member_permissions.png differdiff --git a/docs/my-website/img/user_info_with_default_team.png b/docs/my-website/img/user_info_with_default_team.pngnew file mode 100644index 00000000000..b442bc9006bBinary files /dev/null and b/docs/my-website/img/user_info_with_default_team.png differdiff --git a/docs/my-website/sidebars.js b/docs/my-website/sidebars.jsindex cca9d2a7fa1..ece07984d34 100644--- a/docs/my-website/sidebars.js+++ b/docs/my-website/sidebars.js@@ -519,6 +519,7 @@ const sidebars = {"tutorials/openweb_ui","tutorials/openai_codex","tutorials/anthropic_file_usage",+ "tutorials/default_team_self_serve","tutorials/msft_sso","tutorials/prompt_caching","tutorials/tag_management",diff --git a/ui/litellm-dashboard/src/components/SSOSettings.tsx b/ui/litellm-dashboard/src/components/SSOSettings.tsxindex bbcb9598de8..fe1519c70c0 100644--- a/ui/litellm-dashboard/src/components/SSOSettings.tsx+++ b/ui/litellm-dashboard/src/components/SSOSettings.tsx@@ -69,7 +69,13 @@ const SSOSettings: React.FC<SSOSettingsProps> = ({ accessToken, possibleUIRoles,setSaving(true);try {- const updatedSettings = await updateInternalUserSettings(accessToken, editedValues);+ // Convert empty strings to null+ const processedValues = Object.entries(editedValues).reduce((acc, [key, value]) => {+ acc[key] = value === "" ? null : value;+ return acc;+ }, {} as Record<string, any>);++ const updatedSettings = await updateInternalUserSettings(accessToken, processedValues);setSettings({...settings, values: updatedSettings.settings});setIsEditing(false);} catch (error) {@@ -273,6 +279,7 @@ const SSOSettings: React.FC<SSOSettingsProps> = ({ accessToken, possibleUIRoles,onChange={(value) => handleTextInputChange(key, value)}className="mt-2">+ <Option value="no-default-models">No Default Models</Option>{availableModels.map((model: string) => (<Option key={model} value={model}>{getModelDisplayName(model)}