Skip to content

Commit

Permalink
Merge pull request #51 from mitodl/mb/fix_litellm
Browse files Browse the repository at this point in the history
Fix LiteLLM database reset issue
  • Loading branch information
mbertrand authored Feb 10, 2025
2 parents bb1dcd2 + 7b50d00 commit 1851d5c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions config/litellm_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ model_list:

general_settings:
master_key: os.environ/LITELLM_MASTER_KEY
database_url: os.environ/DATABASE_URL

litellm_settings:
# The following should set default customer budgets, but they are
Expand Down
2 changes: 2 additions & 0 deletions config/postgres/init-litellm.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CREATE DATABASE litellm;
GRANT ALL PRIVILEGES ON DATABASE litellm TO postgres;
2 changes: 1 addition & 1 deletion docker-compose.services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ services:
- path: .env
required: false
environment:
- DATABASE_URL=${DATABASE_URL:-postgres://postgres:postgres@db:5433/litellm}
- DATABASE_URL=${LITELLM_DATABASE_URL:-postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:${PGPORT}/litellm}
- OPENAI_API_KEY=${OPENAI_API_KEY}
- LITELLM_MASTER_KEY=${AI_PROXY_AUTH_TOKEN}
- LITELLM_SALT_KEY=${AI_PROXY_AUTH_TOKEN}
Expand Down
2 changes: 1 addition & 1 deletion env/backend.env
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ KEYCLOAK_DISCOVERY_URL=http://${KEYCLOAK_SVC_HOSTNAME}:${KEYCLOAK_PORT}/realms/o
KEYCLOAK_SCOPES="openid profile ol-profile"

# Channels settings
REDIS_DOMAIN=redis://redis:6379/0
REDIS_DOMAIN=redis://redis:6379/0
1 change: 1 addition & 0 deletions env/backend.local.example.env
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
# OPENAI_API_KEY=
# AI_DEFAULT_RECOMMENDATION_MODEL=
# AI_DEFAULT_SYLLABUS_MODEL=
# LITELLM_DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:${PGPORT}/litellm

#AWS settings
# AWS_DEFAULT_REGION=
Expand Down

0 comments on commit 1851d5c

Please sign in to comment.