Commit Graph

53 Commits

Author SHA1 Message Date
yuneng-jiang 1d95595522 Merge remote-tracking branch 'origin' into litellm_non_root_docker_logo_fix 2025-12-06 20:00:33 -08:00
Ishaan Jaffer 8af1be31eb fix build from pip 2025-12-06 16:09:27 -08:00
Ishaan Jaffer 3090197861 fix docker 2025-12-06 16:02:02 -08:00
Ishaan Jaffer bfdcfca8b0 fix test 2025-12-06 10:15:00 -08:00
Ishaan Jaffer 6358be3d0b fix build from PIP 2025-12-06 09:44:09 -08:00
Alexsander Hamir db40a38999 Add retry logic to apk package installation in Dockerfile.non_root (#17596)
- Add retry loop (3 attempts with 5s delay) to builder stage apk add command
- Add retry logic to runtime stage apk upgrade and apk add commands
- Improves resilience to transient network errors during package downloads
2025-12-06 08:17:50 -08:00
Alexsander Hamir 655e04f16c Fix: apply_guardrail method and improve test isolation (#17555)
* Fix Bedrock guardrail apply_guardrail method and test mocks

Fixed 4 failing tests in the guardrail test suite:

1. BedrockGuardrail.apply_guardrail now returns original texts when guardrail
   allows content but doesn't provide output/outputs fields. Previously returned
   empty list, causing test_bedrock_apply_guardrail_success to fail.

2. Updated test mocks to use correct Bedrock API response format:
   - Changed from 'content' field to 'output' field
   - Fixed nested structure from {'text': {'text': '...'}} to {'text': '...'}
   - Added missing 'output' field in filter test

3. Fixed endpoint test mocks to return GenericGuardrailAPIInputs format:
   - Changed from tuple (List[str], Optional[List[str]]) to dict {'texts': [...]}
   - Updated method call assertions to use 'inputs' parameter correctly

All 12 guardrail tests now pass successfully.

* fix: remove python3-dev from Dockerfile.build_from_pip to avoid Python version conflict

The base image cgr.dev/chainguard/python:latest-dev already includes Python 3.14
and its development tools. Installing python3-dev pulls Python 3.13 packages
which conflict with the existing Python 3.14 installation, causing file
ownership errors during apk install.

* fix: disable callbacks in vertex fine-tuning tests to prevent Datadog logging interference

The test was failing because Datadog logging was making an HTTP POST request
that was being caught by the mock, causing assert_called_once() to fail.
By disabling callbacks during the test, we prevent Datadog from making any
HTTP calls, allowing the mock to only see the Vertex AI API call.

* fix: ensure test isolation in test_logging_non_streaming_request

Add proper cleanup to restore original litellm.callbacks after test execution.
This prevents test interference when running as part of a larger test suite,
where global state pollution was causing async_log_success_event to be
called multiple times instead of once.

Fixes test failure where the test expected async_log_success_event to be
called once but was being called twice due to callbacks from previous tests
not being cleaned up.
2025-12-05 12:59:35 -08:00
Krish Dholakia 74ba18df55 Litellm chainguard fixes 12 02 2025 p1 (#17406)
* build: update dockerfile non root

* build: update build

* build: update non root

* build: dockerfile fixes

* build: ensure dockerfile + dockerfile.database also work
2025-12-02 22:50:13 -08:00
Krrish Dholakia 8ee298f9c9 fix: remove python3 headers 2025-12-02 16:06:06 -08:00
Krrish Dholakia 7fb2f4730b build: remove duplicate packages 2025-12-02 15:53:10 -08:00
yuneng-jiang 031677636a Add user writable file to non root docker for logo 2025-11-26 21:44:02 -08:00
yuneng-jiang e371ff454a Non root docker build fix (#17060) 2025-11-24 20:45:56 -08:00
Ishaan Jaffer be71138af3 fix build bad db url 2025-11-22 10:10:08 -08:00
Ishaan Jaffer c34d8af329 test fix 2025-11-22 10:02:15 -08:00
yuneng-jiang 4b25398afe [Infra] CI/CD Fixes (#16937)
* Attempt CI/CD Fix

* Adding test for coverage

* Adding max depth to copilot and vertex

* Fixing mypy lint and docker database

* Fixing UI build issues

* Update playwright test
2025-11-21 13:58:19 -08:00
Alexsander Hamir 454ffcd9c7 fix: install runtime node for prisma (#16410)
Prisma CLI recently started bootstrapping npm@10 inside the runtime image, which now fails with a sizeCalculation cache error on the slim Python base. Installing Debian's nodejs/npm (along with libatomic1) lets Prisma reuse the system binaries so prisma generate completes again.
2025-11-08 15:48:32 -08:00
Ishaan Jaff 9288c8543c fix docker (#16342) 2025-11-07 14:38:20 -08:00
yuneng-jiang 5d158775b1 [Fix] Litellm non root docker Model Hub Table fix (#16282)
* Fix model hub table 404 on non-root docker

* Adding test
2025-11-05 18:30:20 -08:00
Kowyo 858f557bce docs: use docker compose instead of docker-compose 2025-09-29 11:59:53 +00:00
Arthur 6c97a31c9c bug: add supervisor to non-root image 2025-08-24 15:43:57 +02:00
Jan Kessler 3eecff44c6 fix permission access on prisma migrate in non-root image 2025-08-21 09:00:55 +02:00
Ishaan Jaff a328ad56e3 [Bug Fix] Fixes for using Auto Router with LiteLLM Docker Image (#13788)
* fix install auto router.sh

* fixes for Docker IMG
2025-08-19 18:36:30 -07:00
Ishaan Jaff 76f1064229 [Bug Fix] litellm incompatible with newest release of openAI v1.100.0 (#13728)
* fix imports OpenAI SDK

* ResponseText fixes

* fixes ResponseText

* fix imports

* catch AttributeError

* fix import

* use openai==1.100.1

* fix build from PIP

* fix lint test

* Print OpenAI version

* fix Install dependencies
2025-08-18 18:26:17 -07:00
Parham Alvani 849c262a02 fix: we need to have project files for running migration using this image (#13379) 2025-08-07 13:31:10 -07:00
Jugal D. Bhatt 9aeca96c16 fix openshift (#13239) 2025-08-02 22:37:02 -07:00
Mateo Di Loreto 6e5fe51184 add openssl in apk install in runtime stage in dockerfile.non_root (#13168)
* add openssl in apk install in runtime stage in dockerfile.non_rootdocker-compose logs -f litellm

* Improve Docker-compose.yaml for local debugging

---------

Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>
2025-07-31 21:52:11 -07:00
Ishaan Jaff 106a298f0a [Feat] UI - Allow Adding LiteLLM Auto Router on UI (#12960)
* add router.json

* test_router_auto_router

* async_pre_routing_hook

* fixes for auto router

* add async_pre_routing_hook

* add LiteLLMRouterEncoder

* update test auto_router_embedding_model

* add auto_router_embedding_model

* add AutoRouter

* fix async_pre_routing_hook

* update async_pre_routing_hook

* fix auto router

* fix router.json

* working router init

* working embedding encoder

* working auto router

* test_router_auto_router

* test auto router

* add semantic-router as optional for litellm

* add extras

* semantic_router==0.1.10

* ruff fix

* use aiohttp==3.10.11

* python-dotenv==1.0.1

* test auto router

* test_router_auto_router

* semantic_router

* test_is_auto_router_deployment

* fix check

* fix docker build step

* add semantic_router

* UI  - Add auto router on litellm

* working utterances config

* fix route config builder

* kind of working add automodel router

* move loc of add deployment

* fixes for AutoRouter

* add auto_router_config in types.py

* fixes for init_auto_router_deployment

* fix adding auto router models

* working auto-router with dB

* Revert "add semantic_router"

This reverts commit 537b67288798731a119d811f643b682086377ee9.

* TestAutoRouter

* fix linting

* add semantic router to docker

* test fix

* fix router config builder

* remove export button
2025-07-24 19:58:49 -07:00
Jugal D. Bhatt aa1ebf37b2 pass in cmd args (#12871) 2025-07-22 14:10:23 -07:00
Mateo Di Loreto c65392cf81 Replace non-root Dockerfile base with Alpine multi-stage build; (#12707)
* Change Dockerfile.noon_root with alpine base image

* Improve non_root docker image

* Re add the build_admin_ui.sh script step

* Re add the build_admin_ui.sh script step

* Remove unnecessary workdir set

* Remove unnecessary workdir set

* Configure chainguard image

* A bit of optimization and improve comments

* delete extra build_ui script run

* Optimizie Dockerfile copy statements
2025-07-22 08:53:10 -07:00
Jugal D. Bhatt a112ec5b02 Health check app on separate port (#12718)
* add separate health app

* add new docs

* refactor

* fix colons

* Update config_settings.md

* refactor

* docs

* add unit test

* added supervisord

* remove app

* add supervisor conf

* Add markdown

* add video to md

* remove test

* docs build failure

* add to all docker files, change prod.md and add tests

* change dockerfiles

* remove extra file

* remove extra file

* remove extra file

* change apt->apk

* remove rdb file

* add fixed file
2025-07-18 11:17:15 -07:00
Ishaan Jaff 82a03fd163 fixes build from pip 2025-06-14 09:03:50 -07:00
Ishaan Jaff 9ebe47bee9 fix build from pip 2025-06-14 08:58:01 -07:00
Ishaan Jaff a32b372293 fix build from pip 2025-06-14 08:50:14 -07:00
Ishaan Jaff 95bf272832 fix build from pip 2025-06-14 08:46:44 -07:00
Ishaan Jaff b1e00b3724 build from pip RUN prisma generate 2025-06-14 08:37:47 -07:00
Ishaan Jaff 209362664f add Dockerfile.dev 2025-06-03 12:03:52 -07:00
Ishaan Jaff 2be334eeb1 fix build from pip test 2025-04-26 19:36:47 -07:00
Peter Dave Hello 6b67006b0c Remove redundant apk update in Dockerfiles (cc #5016) (#9055)
The `apk` commands can utilize the `--no-cache` option, making the
`update` step superfluous and ensuring the latest packages are used
without maintaining a local cache. An additional `apk update` in the
Dockerfile will just make the image larger with no benefits.
2025-04-08 09:03:25 -07:00
Tyler Hutcherson 7864cd1f76 update redisvl dependency 2025-03-24 08:42:11 -04:00
Peter Dave Hello c6026ea6f9 Optimize Alpine Dockerfile by removing redundant apk commands (#5016)
Remove unnecessary `apk update` and manual cache cleanup steps in the
Alpine Dockerfile. By using `apk add --no-cache`, we avoid manual cache
management, making the Dockerfile simpler and easier to maintain.
2025-02-15 08:55:12 -08:00
Ishaan Jaff 9b944ca60c (Fix + Testing) - Add dd-trace-run to litellm ci/cd pipeline + fix bug caused by dd-trace patching OpenAI sdk (#7820)
* add dd trace to e2e docker run tests

* update dd trace v

* fix entrypoint

* dd trace fixes

* proxy_build_from_pip_tests

* build python3.13

* use py 3.13

* fix build from pip

* dd trace fix

* proxy_build_from_pip_tests

* bump build from pip
2025-01-16 22:03:09 -08:00
Krish Dholakia d4ed985173 Add back in non root image fixes (#7781) (#7795)
* Add back in non root image fixes (#7781)

* Add back in non root image fixes

* Fix dockerfile

* Fix perms

* Add in container structure tests for the nonroot image (#7796)

* feat(helm): add securityContext and pull policy values to migration job (#7652)

* fix(helm): corrected indentation in migration-job.yaml

* feat(helm): add securityContext and pull policy values to migration job

* fix confusing save button label (#7778)

* [integrations/lunary] Improve Lunary documentaiton (#7770)

* update lunary doc

* better title

* tweaks

* Update langchain.md

* Update lunary_integration.md

* Fix wrong URL for internal user invitation (#7762)

* format

* done

* Update instructor tutorial (#7784)

* Add in container structure tests for the nonroot image

---------

Co-authored-by: Zackeus Bengtsson <32719220+Hexoplon@users.noreply.github.com>
Co-authored-by: yujonglee <yujonglee.dev@gmail.com>
Co-authored-by: Hugues Chocart <chocart.hugues@icloud.com>
Co-authored-by: Nikolaiev Dmytro <dima.nikol.99@gmail.com>

---------

Co-authored-by: Rajat Vig <rajatvig@users.noreply.github.com>
Co-authored-by: Zackeus Bengtsson <32719220+Hexoplon@users.noreply.github.com>
Co-authored-by: yujonglee <yujonglee.dev@gmail.com>
Co-authored-by: Hugues Chocart <chocart.hugues@icloud.com>
Co-authored-by: Nikolaiev Dmytro <dima.nikol.99@gmail.com>
2025-01-15 21:49:03 -08:00
Ishaan Jaff fd0a03f719 (feat) - allow building litellm proxy from pip package (#7633)
* fix working build from pip

* add tests for proxy_build_from_pip_tests

* doc clean up for deployment

* docs cleanup

* docs build from pip

* fix cd docker/build_from_pip
2025-01-08 16:36:57 -08:00
Ishaan Jaff 60c89a3e8a (Fix) security of base image (#7620)
* fix security of base images

* fix dockerfile
2025-01-07 20:35:57 -08:00
Ishaan Jaff 6125ba1e2b (Feat) - allow including dd-trace in litellm base image (#7587)
* introduce USE_DDTRACE=true

* update dd tracer

* update

* bump dd trace

* use og slim image

* DD tracing

* fix _init_dd_tracer
2025-01-06 17:27:09 -08:00
Ishaan Jaff 564ecc728d (security fix) - update base image for all docker images to python:3.13.1-slim (#7388)
* update base image for all docker files

* remove unused files

* fix sec vuln
2024-12-23 16:20:47 -08:00
Ishaan Jaff d1760b1b04 (fix) clean up root repo - move entrypoint.sh and build_admin_ui to /docker (#6110)
* fix move docker files to docker folders

* move check file length

* fix docker hub deploy

* fix clean up root

* fix circle ci config
2024-10-08 11:34:43 +05:30
Ishaan Jaff 5de69cb1b2 fix using Dockerfile 2024-10-08 08:45:40 +05:30
Ishaan Jaff d742e8cb43 (clean up) move docker files from root to docker folder (#6109)
* fix move docker files to docker folders

* move check file length

* fix docker hub deploy
2024-10-08 08:23:52 +05:30
ishaan-jaff 357c6c56bd Revert "build(Dockerfile): move prisma build to dockerfile"
This reverts commit 2741835605.
2024-01-06 09:51:44 +05:30