litellm/docs/my-website/docs/proxy/ui.md
2024-02-07 11:38:27 -08:00

2.3 KiB

import Image from '@theme/IdealImage'; import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';

[BETA] Admin UI

:::info

This is in beta, so things may change. If you have feedback, let us know

:::

Create + delete keys through a UI

<Image img={require('../../img/ui_3.gif')} />

Quick Start

  • Requires proxy master key to be set
  • Requires db connected

Follow setup

1. Start the proxy

litellm --config /path/to/config.yaml

#INFO: Proxy running on http://0.0.0.0:8000

2. Go to UI

http://0.0.0.0:8000/ui # <proxy_base_url>/ui

3. Create Key

<Image img={require('../../img/litellm_ui_create_key.png')} />

Setup SSO/Auth for UI

Set the following in your .env on the Proxy

UI_USERNAME=ishaan-litellm
UI_PASSWORD=langchain

On accessing the LiteLLM UI, you will be prompted to enter your username, password

Required .env variables on your Proxy

# for Google SSO Login
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
  • Set Redirect URL on your Oauth 2.0 Client on https://console.cloud.google.com/
    • Set a redirect url = <your proxy base url>/sso/callback
    https://litellm-production-7002.up.railway.app/sso/callback
    

Required .env variables on your Proxy

MICROSOFT_CLIENT_ID="84583a4d-"
MICROSOFT_CLIENT_SECRET="nbk8Q~"
MICROSOFT_TENANT="5a39737
  • Set Redirect URI on your App Registration on https://portal.azure.com/
    • Set a redirect url = <your proxy base url>/sso/callback
    http://localhost:4000/sso/callback
    

2. Start Proxy Server

litellm --config proxy_config.yaml --port 4000

# start proxy on port 4000

Your Proxy Swagger is available on the root of the Proxy: http://localhost:4000/

<Image img={require('../../img/ui_link.png')} />