The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
proxy_store_model_in_db_tests
Ishaan Jaffer7e738c8ac48a
diff --git a/.circleci/config.yml b/.circleci/config.ymlindex 0d1e6b6ea97..e785e19ed8c 100644--- a/.circleci/config.yml+++ b/.circleci/config.yml@@ -2409,6 +2409,25 @@ jobs:pip install "pytest-mock==3.12.0"pip install "pytest-asyncio==0.21.1"pip install "assemblyai==0.37.0"+ - run:+ name: Install dockerize+ command: |+ wget https://github.com/jwilder/dockerize/releases/download/v0.6.1/dockerize-linux-amd64-v0.6.1.tar.gz+ sudo tar -C /usr/local/bin -xzvf dockerize-linux-amd64-v0.6.1.tar.gz+ rm dockerize-linux-amd64-v0.6.1.tar.gz+ - run:+ name: Start PostgreSQL Database+ command: |+ docker run -d \+ --name postgres-db \+ -e POSTGRES_USER=postgres \+ -e POSTGRES_PASSWORD=postgres \+ -e POSTGRES_DB=circle_test \+ -p 5432:5432 \+ postgres:14+ - run:+ name: Wait for PostgreSQL to be ready+ command: dockerize -wait tcp://localhost:5432 -timeout 1m- run:name: Build Docker imagecommand: docker build -t my-app:latest -f ./docker/Dockerfile.database .@@ -2419,10 +2438,11 @@ jobs:command: |docker run -d \-p 4000:4000 \- -e DATABASE_URL=$CLEAN_STORE_MODEL_IN_DB_DATABASE_URL \+ -e DATABASE_URL=postgresql://postgres:[email protected]:5432/circle_test \-e STORE_MODEL_IN_DB="True" \-e LITELLM_MASTER_KEY="sk-1234" \-e LITELLM_LICENSE=$LITELLM_LICENSE \+ --add-host host.docker.internal:host-gateway \--name my-app \-v $(pwd)/litellm/proxy/example_config_yaml/store_model_db_config.yaml:/app/config.yaml \my-app:latest \@@ -2452,7 +2472,16 @@ jobs:python -m pytest -vv tests/store_model_in_db_tests -x --junitxml=test-results/junit.xml --durations=5no_output_timeout:120m- # Clean up first container+ - run:+ name: Stop and remove containers+ command: |+ docker stop my-app || true+ docker rm my-app || true+ docker stop postgres-db || true+ docker rm postgres-db || true+ when: always+ - store_test_results:+ path: test-resultsproxy_build_from_pip_tests:# Change from docker to machine executor