(Tutorial) Onboard Users for AI Exploration (#11955)

* fix: allow setting no-default-models and unsetting max budget

* docs(sso_self_serve.md): add e2e tutorial of onboarding users for ai exploration

* docs: rename doc
This commit is contained in:
Krish Dholakia 2025-06-21 16:54:23 -07:00 committed by GitHub
parent 1b43ba9426
commit 3224b0f4fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 86 additions and 1 deletions

View file

@ -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 `test_default_team_user@xyz.com`.
<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' }} />

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

View file

@ -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",

View file

@ -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)}