fix(deps): move pydantic-settings into the base dependencies - #35518
Merged
yuneng-berri merged 1 commit intoAug 1, 2026
Merged
Conversation
`import litellm` reaches litellm/integrations/otel/model/config.py via litellm_core_utils/litellm_logging.py, so pydantic-settings is needed at import time. It was declared only in the `proxy` extra, which left a plain `pip install litellm` unimportable on every platform. Adds tests/base_sdk_tests/check_base_sdk_install.py and a base_sdk_install CircleCI job that builds the wheel, installs it into a clean venv with no extras, and smoke-checks the import, a mock completion, a mock embedding, the bundled pricing metadata and the token counter. The check is stdlib-only on purpose; installing pytest into that venv would add packaging, pluggy and iniconfig and could mask the class of undeclared dependency it exists to catch. Previously the Windows job was the only one installing without extras, so this class of break was caught by accident rather than by design.
Contributor
Greptile SummaryThe PR promotes
Confidence Score: 5/5The PR appears safe to merge, with the dependency promotion and no-extras wheel validation aligned with the reported base-install failure. The manifest and lockfile consistently make the import-time dependency unconditional, while the new CI job validates the built artifact without installing proxy extras; no actionable regression remains.
|
| Filename | Overview |
|---|---|
| pyproject.toml | Moves the existing compatible pydantic-settings range into unconditional base dependencies. |
| uv.lock | Consistently promotes pydantic-settings from the proxy extra to the base package dependency metadata. |
| tests/base_sdk_tests/check_base_sdk_install.py | Adds a focused stdlib-only smoke test for a wheel installed without extras. |
| .circleci/config.yml | Adds the base-wheel build, installation, and smoke-check job to the primary workflow. |
Reviews (1): Last reviewed commit: "fix(deps): move pydantic-settings into t..." | Re-trigger Greptile
tin-berri
approved these changes
Aug 1, 2026
shin-berri
approved these changes
Aug 1, 2026
yuneng-berri
enabled auto-merge
August 1, 2026 22:39
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
Problem this solves:
pip install litellmthenimport litellmfailspydantic-settingsis declared only in theproxyextraHow it solves it:
pydantic-settingsinto[project].dependenciesRelevant issues
Linear ticket
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
@greptileaito re-request a review after pushing changes)Delays in PR merge?
If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).
Screenshots / Proof of Fix
Both runs build a wheel from the repo, install it into a clean venv with no extras, and make the same real Anthropic call. No mocks; the call costs real money
Before, at
b1fd20f4cdAfter, at
7447f9babcSame three commands against a wheel built at the fix commit:
The same break in a published artifact
The last two dev releases on PyPI carry it, so this is reproducible without building anything:
Current PyPI stable is 1.94.1 and imports fine, and the Docker images install
--extra proxy, so neither is affectedThe new CI job, run end to end in the pinned CI image
Red against
b1fd20f4cd, which is the tail of the log a reviewer would actually read:Green against
7447f9babc:Type
🐛 Bug Fix
✅ Test
Changes
import litellmreacheslitellm/integrations/otel/model/config.pythroughlitellm_core_utils/litellm_logging.py, which importsintegrations/agentops, which importsintegrations/opentelemetry, which imports a submodule of theotelpackage and therefore runs its__init__. Every link is unconditional and at module level, sopydantic-settingsis required to import the SDK at all. It was declared only in theproxyextra, which left the base install and every other extra unimportable on all platformstests/base_sdk_tests/check_base_sdk_install.pyis the guard. The CI job builds the wheel, installs it into a fresh venv with no extras, and runs the script with that venv's interpreter. It is stdlib-only on purpose: installing pytest into that venv would addpackaging,pluggyandiniconfigand could mask the class of undeclared dependency it exists to catch. Its first check assertsfastapi,boto3anduvicornare absent, so a job misconfiguration that installed extras fails loudly instead of passing as a no-op. It stops at the first failure because cascading import errors bury the real cause at the bottom of a CI logget_model_infois in the check for packaging rather than logic; it only passes when the bundled pricing JSON actually shipped inside the wheelFinal Attestation