Repository navigation
chore: move scripts and runtime sources under litellm - #51006
yassin-berriai merged 1 commit into
Conversation
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
|
a988d44 to
6a6593c
Compare
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
0854308 to
2a80ccd
Compare
Merging this PR will not alter performance1 warning
Comparing |
7e4a80b to
6f23f88
Compare
2e6cea3 to
bf7afaa
Compare
51be626 to
372cdae
Compare
372cdae to
6ce00fc
Compare
|
bugbot run |
b1a06eb to
312bcd9
Compare
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
1 issue from previous review remains unresolved.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 312bcd9. Configure here.
…oving (#380) cost-map-guard.yml runs this script from the PR's base-branch tip for tamper-resistance, so an in-flight sync PR that relocates ci_cd/cost_map_pins.json under litellm/ (upstream's own restructuring, BerriAI#51006) gets evaluated by this unaware, pre-move copy and reports the pins file missing even though it only moved. Backports upstream's own multi-path fallback for the cost map, its backup, and the pins file so this script finds them wherever a later sync puts them, landing this fix on main first so the in-flight sync PR's base picks it up without needing a chicken-and-egg workaround. Co-authored-by: Claude <noreply@anthropic.com>
|
The quickstart link is broken, pointing to no longer available (404) https://raw.githubusercontent.com/BerriAI/litellm/main/scripts/quickstart.sh instead of https://raw.githubusercontent.com/BerriAI/litellm/main/litellm/scripts/quickstart.sh on: https://docs.litellm.ai/docs/proxy/docker_quick_start |
|
Hey @adamsiemion thanks for flagging this, should be fixed now |
* ci(lint): run lint scripts from the paths the PR head has The lint workflow checks out the PR head but runs main's steps, so every PR branched before #51006 failed on litellm/scripts and .github/linters paths its head does not have. The steps now pick litellm/scripts or scripts, and the old or new ruff-tests.toml and Claude Code version resolver, from what the head carries * ci(lint): keep the merge-ref code-quality job on main's script path The code-quality job checks out the PR merge ref, which always carries litellm/scripts, so only the python job that checks out the PR head needs the fallback * ci(lint): run the lint tools from the paths the PR head carries The python and typecheck jobs check out the PR head, so a head branched before the 2026-11-12 move of scripts/ to litellm/scripts and of ruff-tests.toml to .github/linters could not open the gate scripts and failed lint passed until it merged main * test(ci): run the lint jobs that check out the PR head on old and current tool layouts --------- Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>

Handwritten 1-3 sentence description
[insert handwritten description here]
Details
TLDR
Problem this solves:
scripts/,backend/,migrations/andschema.prismastill sit at the repo rootHow it solves it:
litellm/scripts/, the backend and migration runner sources move tolitellm/runtime/, and the canonical schema moves tolitellm/schema.prismascripts/quickstart.shandscripts/quickstart.ps1move tolitellm/scripts/with their URL readers updated.scripts/ci_cd/baseline_db.pyis deletedThe schema compatibility check accepts historical schemas at either location. The trusted-checkout guards try the new path first and fall back to the older layouts, because they run scripts from the base commit. The gateway sources move under
litellm/runtime/gateway. The Docker runtime copies them to/app/gateway, so worker imports retain their standalone namespace and cheap startup. The gateway launcher still imports the originallitellm_cli.mainlazy entrypoint.Linear ticket
Resolves LIT-10616
Screenshots / Proof of Fix
Restacked at
5df7e1cc1351eeddbf1649d32bf7658cd58d68d8onto main801e139c35af5eca132e8761cb11be19621218c4. Original authorship and one commit per layer are preserved. The only manual conflict resolution carries the new dashboard logo into its moved directory. Main content and existing path adaptations are retained. Focused cost-map and spend-log tests at the top tip passed 115 tests. The fresh top checkout has 14 root entries and all three required JSON files. Required CI remains with the separate CI session.E2E exception at 6ce00fc. Prior proof below was run at 6a6593c61619d960383fbf956f7fd61ae188f930. Later changes carry main content into moved paths and preserve original CLI imports. Required CI on the restacked tip is still pending. The diff is path moves, deletions and reader updates.
uv lock --checkresolves 480 packages,import litellmworks and the coverage census is OK. The focused helper tests pass 94 and 112, and actionlint adds no diagnostics over the base. The broader focused run also had failures that reproduce on the parent commit. The three lint-base-count tests need a GitHub origin in the checkout. The gateway isolation failure is fixed in the layer below. I didn't run distribution or deploy checks.The focused type-discipline helper and gate checks pass 145 tests. Actionlint reports no diagnostics for the image scan and root limit workflows.
Current reader verification at
26609921e9f0b69f0a8aa66003cca845a3362a0b. The approval guard watcheslitellm/schema.prismaand retains historical paths. Its focused suite passes 29 tests, including spend-log changes in every schema copy. The health-check examples use the moved paths. Both quickstart scripts are preserved underlitellm/scriptsrather than deleted, and their self-download URLs and migration guide agree. Shell syntax validation and the original saved updater fetch and refresh checks pass. PowerShell execution was not checked.Type
🧹 Refactoring
Caveats (if any)
Medium
Link to Devin session: https://app.devin.ai/sessions/294f6aba393343d998baaa7978294638
Open in Devin Desktop: https://app.devin.ai/desktop/session/294f6aba393343d998baaa7978294638?variant=devin
Requested by: @yassin-berriai
Note
Medium Risk
Touches CI, Docker entrypoints, schema sync, and path fallbacks across the repo; miswired paths could break installs or image builds until caches and saved quickstart scripts are updated.
Overview
Relocates repository tooling and componentized runtime code into the
litellmpackage tree and makeslitellm/schema.prismathe canonical Prisma schema. Root-levelscripts/,backend/,migrations/, andschema.prismagive way tolitellm/scripts/,litellm/runtime/(backend, migrations, gateway), andlitellm/schema.prisma, with docs, Makefile, AGENTS.md, and helper paths updated to match.CI and local dev follow the new layout: GitHub Actions, path filters, and guards (cost map, spend logs, schema sync, lint gates) call
litellm/scripts/..., often with legacy fallbacks until main has the move.setup-uv-with-retriesruns.github/scripts/setup_rust_environment.sh(toolchain fromlitellm/rust/rust-toolchain.toml). Rust workflows and Makefile exports alignRUSTUP_TOOLCHAIN/SQLX_OFFLINEwith that. Some.agents/skillsguides are removed, and AGENTS.md drops the database-access skill reference.Docker and packaging keep compatibility: the image still exposes
/app/schema.prismaand/app/gatewaywhile building fromlitellm/runtime. The backend entry becomeslitellm.runtime.backend.main.litellm-corepackaging excludesscripts,runtime, and schema from wheels. quickstart URLs and one-time overrides point atlitellm/scripts/.Reviewed by Cursor Bugbot for commit 312bcd9. Bugbot is set up for automated code reviews on this repo. Configure here.
Current reader fixes
Gateway child environments include the moved runtime, source tests and checkout before the effective inherited or explicit PYTHONPATH. The 105 process and gateway tests pass. Branch installer examples and autoroute error text now use litellm/scripts. The 26 autoroute command tests pass. Image scan paths include the packaging backend helpers.