documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Tutorial: Use litellm with shift

Open Sytten opened this issue 1 month ago • 0 comments

  1. Docker compose
services:
litellm:
  build:
    context: .
    args:
      target: runtime
  image: ghcr.io/berriai/litellm:main-stable
  ports:
    - '4000:4000'
  environment:
    LITELLM_MASTER_KEY: sk-admin-key-1234567890
    DATABASE_URL: 'postgresql://llmproxy:dbpassword9090@db:5432/litellm'
    STORE_MODEL_IN_DB: 'True'
    STORE_PROMPTS_IN_SPEND_LOGS: 'True'
  depends_on:
    - db

db:
  image: postgres:16
  restart: always
  container_name: litellm_db
  environment:
    POSTGRES_DB: litellm
    POSTGRES_USER: llmproxy
    POSTGRES_PASSWORD: dbpassword9090
  ports:
    - '5439:5432'
  volumes:
    - postgres_data:/var/lib/postgresql/data

volumes:
postgres_data:
  name: litellm_postgres_data
  1. Setup a model provider in litellm
  2. Create a virtual key
  3. In caido, use the virtual key + litellm url as "openai"
  4. In shift v2 (currently not released), in "models", create a new model for openai (make sure the alias is openai/)
  5. Then you will be able to use that model in agents (it will show as an openai model but it works)

Sytten avatar Nov 19 '25 20:11 Sytten