litellm - 💡(How to fix) Fix [Bug]: Vector stores from config.yaml are not added [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#25947Fetched 2026-04-18 05:52:58
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×3

Code Example

services:
  litellm:
    image: docker.litellm.ai/berriai/litellm:v1.83.3-stable
    volumes:
      - ./litellm-config.yaml:/app/config.yaml
    command:
      - "--config=/app/config.yaml"
    ports:
      - "4000:4000"
    environment:
      DATABASE_URL: "postgresql://llmproxy:dbpassword9090@db:5432/litellm"
      STORE_MODEL_IN_DB: "True"  # allows adding models to proxy via UI
      PGVECTOR_DATABASE_URL: "postgresql://pgvector_user:pgvector_pass@pgvector:5432/pgvector_db"
    env_file:
      - .env-litellm
    depends_on:
      db:
        condition: service_healthy
    restart: unless-stopped

  db:
    # Main PostgreSQL database used by LiteLLM for proxy state
    image: postgres:16
    restart: always
    container_name: litellm_db
    environment:
      POSTGRES_DB: litellm
      POSTGRES_USER: llmproxy
      POSTGRES_PASSWORD: dbpassword9090
    ports:
      - "5432:5432"
    #volumes:
    #  - postgres_data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -d litellm -U llmproxy"]
      interval: 1s
      timeout: 5s
      retries: 10

  # - # pgvector_litellm

  pgvector:
    # PostgreSQL + pgvector extension — used for semantic / vector search
    # (embeddings, RAG pipelines, etc.)
    image: pgvector/pgvector:pg16
    restart: always
    container_name: litellm_pgvector_db
    environment:
      POSTGRES_DB: pgvector_db
      POSTGRES_USER: pgvector_user
      POSTGRES_PASSWORD: pgvector_pass
    ports:
      - "5434:5432"
    volumes:
      - pgvector_data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -d pgvector_db -U pgvector_user"]
      interval: 1s
      timeout: 5s
      retries: 10

  prisma-migrate: # Needed for once migration, initContainer in k8s.
    build:
      context: ../litellm-pgvector
      dockerfile: Dockerfile
    container_name: litellm_pgvector_prisma_migrate
    depends_on:
      pgvector:
        condition: service_healthy
    environment:
      DATABASE_URL: "postgresql://pgvector_user:pgvector_pass@pgvector:5432/pgvector_db"
    command: >
      sh -c "psql $$DATABASE_URL -c 'CREATE EXTENSION IF NOT EXISTS vector;' && python -m prisma db push --skip-generate"
    restart: "no"

  llmpgvector:
    # LiteLLM pgvector app — uses the pgvector DB above for embeddings / RAG
    build:
        context: ../litellm-pgvector
        dockerfile: Dockerfile
    restart: always
    container_name: litellm_pgvector
    image: litellm-pgvector:latest
    depends_on:
      pgvector:
        condition: service_healthy
      prisma-migrate:
        condition: service_completed_successfully
      litellm:
        condition: service_started
    environment:
      DATABASE_URL: "postgresql://pgvector_user:pgvector_pass@pgvector:5432/pgvector_db"
      # API Configuration
      SERVER_API_KEY: "your-api-key-here"

      # Server Configuration
      HOST: "0.0.0.0"
      PORT: 8000

      # LiteLLM Proxy Configuration
      EMBEDDING__MODEL: "text-embedding-ada-002"
      EMBEDDING__BASE_URL: "http://litellm:4000" # terug naar de proxy voor embeddings.
      EMBEDDING__API_KEY: "sk-1234" # Login key, same as admin.
      EMBEDDING__DIMENSIONS: 1536

      # Database Field Configuration (optional)
      DB_FIELDS__ID_FIELD: "id"
      DB_FIELDS__CONTENT_FIELD: "content"
      DB_FIELDS__METADATA_FIELD: "metadata"
      DB_FIELDS__EMBEDDING_FIELD: "embedding"
      DB_FIELDS__VECTOR_STORE_ID_FIELD: "vector_store_id"
      DB_FIELDS__CREATED_AT_FIELD: "created_at"
    ports:
      - "8000:8000"

volumes:
  pgvector_data:
    name: litellm_pgvector_data_bug1

---

model_list:
  - model_name: text-embedding-ada-002
    litellm_params:
        model: azure/text-embedding-ada-002
        api_base: os.environ/AZURE_API_BASE
        api_key: os.environ/AZURE_API_KEY
        base_model: text-embedding-ada-002
        region_name: swedencentral
    model_info:
        id: text-embedding-ada-002
        mode: embedding
        disable_background_health_check: true
  - model_name: gpt-4o
    litellm_params:
        model: azure/gpt-4o
        api_base: os.environ/AZURE_API_BASE
        api_key: os.environ/AZURE_API_KEY
        region_name: swedencentral
    model_info:
        id: gpt-4o
        disable_background_health_check: false


# This block does not work.
vector_store_registry:
  - vector_store_name: 899bd99d-6696-4ea1-8076-53ca94dba443
    litellm_params:
      custom_llm_provider: pg_vector
      api_base: http://llmpgvector:8000
      api_key: "your-api-key-here"
      vector_store_id: 899bd99d-6696-4ea1-8076-53ca94dba443
      embedding_model: text-embedding-ada-002
      vector_store_description: "A pgvector-based vector store for testing and development purposes."

general_settings:
  completion_model: text-embedding-ada-002

environment_variables:
  # Authentication & Authorization
  UI_ACCESS_MODE: "admin_only"

---

.
RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

What happened?

When configuring vector stores through the config.yaml

Steps to Reproduce

  1. Docker compose file:
services:
  litellm:
    image: docker.litellm.ai/berriai/litellm:v1.83.3-stable
    volumes:
      - ./litellm-config.yaml:/app/config.yaml
    command:
      - "--config=/app/config.yaml"
    ports:
      - "4000:4000"
    environment:
      DATABASE_URL: "postgresql://llmproxy:dbpassword9090@db:5432/litellm"
      STORE_MODEL_IN_DB: "True"  # allows adding models to proxy via UI
      PGVECTOR_DATABASE_URL: "postgresql://pgvector_user:pgvector_pass@pgvector:5432/pgvector_db"
    env_file:
      - .env-litellm
    depends_on:
      db:
        condition: service_healthy
    restart: unless-stopped

  db:
    # Main PostgreSQL database used by LiteLLM for proxy state
    image: postgres:16
    restart: always
    container_name: litellm_db
    environment:
      POSTGRES_DB: litellm
      POSTGRES_USER: llmproxy
      POSTGRES_PASSWORD: dbpassword9090
    ports:
      - "5432:5432"
    #volumes:
    #  - postgres_data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -d litellm -U llmproxy"]
      interval: 1s
      timeout: 5s
      retries: 10

  # - # pgvector_litellm

  pgvector:
    # PostgreSQL + pgvector extension — used for semantic / vector search
    # (embeddings, RAG pipelines, etc.)
    image: pgvector/pgvector:pg16
    restart: always
    container_name: litellm_pgvector_db
    environment:
      POSTGRES_DB: pgvector_db
      POSTGRES_USER: pgvector_user
      POSTGRES_PASSWORD: pgvector_pass
    ports:
      - "5434:5432"
    volumes:
      - pgvector_data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -d pgvector_db -U pgvector_user"]
      interval: 1s
      timeout: 5s
      retries: 10

  prisma-migrate: # Needed for once migration, initContainer in k8s.
    build:
      context: ../litellm-pgvector
      dockerfile: Dockerfile
    container_name: litellm_pgvector_prisma_migrate
    depends_on:
      pgvector:
        condition: service_healthy
    environment:
      DATABASE_URL: "postgresql://pgvector_user:pgvector_pass@pgvector:5432/pgvector_db"
    command: >
      sh -c "psql $$DATABASE_URL -c 'CREATE EXTENSION IF NOT EXISTS vector;' && python -m prisma db push --skip-generate"
    restart: "no"

  llmpgvector:
    # LiteLLM pgvector app — uses the pgvector DB above for embeddings / RAG
    build:
        context: ../litellm-pgvector
        dockerfile: Dockerfile
    restart: always
    container_name: litellm_pgvector
    image: litellm-pgvector:latest
    depends_on:
      pgvector:
        condition: service_healthy
      prisma-migrate:
        condition: service_completed_successfully
      litellm:
        condition: service_started
    environment:
      DATABASE_URL: "postgresql://pgvector_user:pgvector_pass@pgvector:5432/pgvector_db"
      # API Configuration
      SERVER_API_KEY: "your-api-key-here"

      # Server Configuration
      HOST: "0.0.0.0"
      PORT: 8000

      # LiteLLM Proxy Configuration
      EMBEDDING__MODEL: "text-embedding-ada-002"
      EMBEDDING__BASE_URL: "http://litellm:4000" # terug naar de proxy voor embeddings.
      EMBEDDING__API_KEY: "sk-1234" # Login key, same as admin.
      EMBEDDING__DIMENSIONS: 1536

      # Database Field Configuration (optional)
      DB_FIELDS__ID_FIELD: "id"
      DB_FIELDS__CONTENT_FIELD: "content"
      DB_FIELDS__METADATA_FIELD: "metadata"
      DB_FIELDS__EMBEDDING_FIELD: "embedding"
      DB_FIELDS__VECTOR_STORE_ID_FIELD: "vector_store_id"
      DB_FIELDS__CREATED_AT_FIELD: "created_at"
    ports:
      - "8000:8000"

volumes:
  pgvector_data:
    name: litellm_pgvector_data_bug1

config.yaml:

model_list:
  - model_name: text-embedding-ada-002
    litellm_params:
        model: azure/text-embedding-ada-002
        api_base: os.environ/AZURE_API_BASE
        api_key: os.environ/AZURE_API_KEY
        base_model: text-embedding-ada-002
        region_name: swedencentral
    model_info:
        id: text-embedding-ada-002
        mode: embedding
        disable_background_health_check: true
  - model_name: gpt-4o
    litellm_params:
        model: azure/gpt-4o
        api_base: os.environ/AZURE_API_BASE
        api_key: os.environ/AZURE_API_KEY
        region_name: swedencentral
    model_info:
        id: gpt-4o
        disable_background_health_check: false


# This block does not work.
vector_store_registry:
  - vector_store_name: 899bd99d-6696-4ea1-8076-53ca94dba443
    litellm_params:
      custom_llm_provider: pg_vector
      api_base: http://llmpgvector:8000
      api_key: "your-api-key-here"
      vector_store_id: 899bd99d-6696-4ea1-8076-53ca94dba443
      embedding_model: text-embedding-ada-002
      vector_store_description: "A pgvector-based vector store for testing and development purposes."

general_settings:
  completion_model: text-embedding-ada-002

environment_variables:
  # Authentication & Authorization
  UI_ACCESS_MODE: "admin_only"

1: Run/build the docker compose stack from the provided files. 2. Go to the vector stores page: http://localhost:4000/ui/?login=success&page=vector-stores Observed behavior: The vector stores page does not list any vector store. Also no vector store is found in the database. Desired behavior: The vector stores page lists the vector store configured in the config.yaml And the configured vector store is found in the database.

Relevant log output

.

What part of LiteLLM is this about?

Proxy

What LiteLLM version are you on ?

v1.83.3-stable

Twitter / LinkedIn details

No response

extent analysis

TL;DR

The issue is likely due to the vector store configuration not being properly registered or synced with the database, and a workaround may involve manually checking the database connection and the vector store configuration in the config.yaml file.

Guidance

  • Check the vector_store_registry section in the config.yaml file to ensure that the vector_store_name and litellm_params are correctly configured.
  • Verify that the pgvector service is healthy and running by checking the Docker Compose logs and the pgvector container status.
  • Check the database connection by running a query to verify that the vector store is properly configured and synced with the database.
  • Ensure that the llmpgvector service is properly configured and running, as it is responsible for handling vector store requests.

Example

No code example is provided as the issue seems to be related to configuration and not code.

Notes

The issue may be related to the version of LiteLLM being used (v1.83.3-stable), and it's possible that there are known issues or limitations with vector store configuration in this version.

Recommendation

Apply a workaround by manually checking the database connection and the vector store configuration in the config.yaml file, and ensure that all services are properly configured and running. This is recommended as the issue seems to be related to configuration and not a bug that requires an upgrade.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING