diff --git a/.circleci/config.yml b/.circleci/config.yml index 13fe3d973..1ab163653 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -29,12 +29,16 @@ jobs: pip install pytest-asyncio pip install mypy pip install -q google-generativeai + pip install google-cloud-aiplatform pip install "boto3>=1.28.57" pip install appdirs pip install langchain + pip install langfuse pip install numpydoc pip install traceloop-sdk==0.0.69 pip install openai + pip install prisma + pip install langfuse - save_cache: paths: - ./venv @@ -44,7 +48,7 @@ jobs: command: | cd litellm python -m pip install types-requests types-setuptools types-redis - if ! python -m mypy . --ignore-missing-imports --explicit-package-bases; then + if ! python -m mypy . --ignore-missing-imports; then echo "mypy detected errors" exit 1 fi @@ -57,7 +61,7 @@ jobs: command: | pwd ls - python -m pytest -vv litellm/tests/ -x --junitxml=test-results/junit.xml --durations=5 + python -m pytest -vv litellm/tests/ -x --junitxml=test-results/junit.xml --durations=5 no_output_timeout: 120m # Store test results @@ -74,6 +78,11 @@ jobs: steps: - checkout + + - run: + name: Copy model_prices_and_context_window File to model_prices_and_context_window_backup + command: | + cp model_prices_and_context_window.json litellm/model_prices_and_context_window_backup.json - run: name: Check if litellm dir was updated or if pyproject.toml was modified diff --git a/.circleci/requirements.txt b/.circleci/requirements.txt index b7291c9c6..148749e4b 100644 --- a/.circleci/requirements.txt +++ b/.circleci/requirements.txt @@ -10,4 +10,5 @@ anthropic boto3 appdirs orjson -pydantic \ No newline at end of file +pydantic +google-cloud-aiplatform \ No newline at end of file diff --git a/.gitignore b/.gitignore index 088996ddd..294fcb2a0 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,6 @@ litellm/proxy/_secret_config.yaml litellm/tests/aiologs.log litellm/tests/exception_data.txt litellm/tests/config_*.yaml +litellm/tests/langfuse.log +litellm/tests/test_custom_logger.py +litellm/tests/langfuse.log diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8bda916bc..9352959fe 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,6 +3,15 @@ repos: rev: 3.8.4 # The version of flake8 to use hooks: - id: flake8 - exclude: ^litellm/tests/|^litellm/proxy/|^litellm/integrations/ + exclude: ^litellm/tests/|^litellm/proxy/proxy_server.py|^litellm/proxy/proxy_cli.py|^litellm/integrations/ additional_dependencies: [flake8-print] - files: litellm/.*\.py \ No newline at end of file + files: litellm/.*\.py +- repo: local + hooks: + - id: mypy + name: mypy + entry: python3 -m mypy --ignore-missing-imports + language: system + types: [python] + files: ^litellm/ + exclude: ^litellm/tests/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index da7bb7223..217daccec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,6 +34,9 @@ COPY --from=builder /app/wheels /app/wheels RUN pip install --no-index --find-links=/app/wheels -r requirements.txt +# Trigger the Prisma CLI to be installed +RUN prisma -v + EXPOSE 4000/tcp # Start the litellm proxy, using the `litellm` cli command https://docs.litellm.ai/docs/simple_proxy diff --git a/README.md b/README.md index 7fad2d9da..82cdceed5 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@
Call all LLM APIs using the OpenAI format [Bedrock, Huggingface, Cohere, TogetherAI, Azure, OpenAI, etc.]