fix(proxy): move gateway manifest into crate

This commit is contained in:
Devin AI 2026-10-27 22:53:37 +00:00
parent a029bf8fe4
commit b63f384a77
8 changed files with 17 additions and 14 deletions

View file

@ -167,7 +167,9 @@ def main(
capture_output=True,
text=True,
).stdout.strip()
project_directory: Final = Path(__file__).parents[2] / ("litellm-rust" if gateway else ".")
project_directory: Final = Path(__file__).parents[2] / (
"litellm-rust/crates/gateway" if gateway else "."
)
pyproject: Final = (project_directory / "pyproject.toml").read_text()
maturin_match: Final = re.search(r'"maturin==([^";]+)', pyproject)
if maturin_match is None:

View file

@ -42,7 +42,7 @@ jobs:
id: rust-bridge-key
if: steps.changes.outputs.decision != 'skip'
env:
RUST_BRIDGE_CACHE_KEY: ${{ runner.os }}-rust-bridge-editable-${{ hashFiles('litellm-rust/Cargo.lock', 'litellm-rust/Cargo.toml', 'litellm-rust/pyproject.toml', 'litellm-rust/crates/**', 'pyproject.toml') }}
RUST_BRIDGE_CACHE_KEY: ${{ runner.os }}-rust-bridge-editable-${{ hashFiles('litellm-rust/Cargo.lock', 'litellm-rust/Cargo.toml', 'litellm-rust/crates/gateway/pyproject.toml', 'litellm-rust/crates/**', 'pyproject.toml') }}
run: echo "key=$RUST_BRIDGE_CACHE_KEY" >> "$GITHUB_OUTPUT"
- name: Set up Python

View file

@ -76,7 +76,7 @@ ENV UV_PROJECT_ENVIRONMENT=/app/.venv \
COPY pyproject.toml uv.lock ./
COPY enterprise/pyproject.toml enterprise/
COPY litellm-proxy-extras/pyproject.toml litellm-proxy-extras/
COPY litellm-rust/pyproject.toml litellm-rust/
COPY litellm-rust/crates/gateway/pyproject.toml litellm-rust/crates/gateway/
# Install third-party dependencies (cached unless pyproject.toml/uv.lock change)
RUN uv sync --frozen --no-install-project --no-install-workspace --no-default-groups --no-editable \

View file

@ -75,7 +75,7 @@ ENV UV_PROJECT_ENVIRONMENT=/app/.venv \
COPY pyproject.toml uv.lock ./
COPY enterprise/pyproject.toml enterprise/
COPY litellm-proxy-extras/pyproject.toml litellm-proxy-extras/
COPY litellm-rust/pyproject.toml litellm-rust/
COPY litellm-rust/crates/gateway/pyproject.toml litellm-rust/crates/gateway/
# Install third-party dependencies (cached unless pyproject.toml/uv.lock change)
RUN uv sync --frozen --no-install-project --no-install-workspace --no-default-groups --no-editable \

View file

@ -77,7 +77,7 @@ ENV UV_PROJECT_ENVIRONMENT=/app/.venv \
COPY pyproject.toml uv.lock ./
COPY enterprise/pyproject.toml enterprise/
COPY litellm-proxy-extras/pyproject.toml litellm-proxy-extras/
COPY litellm-rust/pyproject.toml litellm-rust/
COPY litellm-rust/crates/gateway/pyproject.toml litellm-rust/crates/gateway/
# Install third-party dependencies (cached unless pyproject.toml/uv.lock change)
RUN --mount=type=cache,target=/app/.cache/uv,id=litellm-uv-cache \

View file

@ -13,7 +13,7 @@ requires = ["maturin==1.15.0"]
build-backend = "maturin"
[tool.maturin]
manifest-path = "crates/gateway/Cargo.toml"
manifest-path = "Cargo.toml"
bindings = "bin"
profile = "release"
strip = true
@ -22,15 +22,16 @@ strip = true
cache-keys = [
{ file = "pyproject.toml" },
{ file = "Cargo.toml" },
{ file = "Cargo.lock" },
{ file = "crates/**/*" },
{ file = "../rust-toolchain.toml" },
{ file = "../.cargo/config.toml" },
{ file = "../../Cargo.toml" },
{ file = "../../Cargo.lock" },
{ file = "../**/*" },
{ file = "../../../rust-toolchain.toml" },
{ file = "../../../.cargo/config.toml" },
]
[tool.commitizen]
version = "0.1.0"
version_files = [
"pyproject.toml:^version",
"../pyproject.toml:litellm-gateway==",
"../../../pyproject.toml:litellm-gateway==",
]

View file

@ -387,7 +387,7 @@ litellm-enterprise = { workspace = true }
litellm-gateway = { workspace = true }
[tool.uv.workspace]
members = ["enterprise", "litellm-proxy-extras", "litellm-rust"]
members = ["enterprise", "litellm-proxy-extras", "litellm-rust/crates/gateway"]
[tool.commitizen]
version = "1.108.0"

4
uv.lock generated
View file

@ -5235,7 +5235,7 @@ requires-dist = [
{ name = "keyring", marker = "extra == 'cli'", specifier = ">=25.6.0,<26.0" },
{ name = "langfuse", marker = "extra == 'proxy-runtime'", specifier = ">=4.7,<5.0" },
{ name = "litellm-enterprise", marker = "extra == 'proxy'", editable = "enterprise" },
{ name = "litellm-gateway", marker = "extra == 'proxy'", editable = "litellm-rust" },
{ name = "litellm-gateway", marker = "extra == 'proxy'", editable = "litellm-rust/crates/gateway" },
{ name = "litellm-proxy-extras", marker = "extra == 'proxy'", editable = "litellm-proxy-extras" },
{ name = "llm-sandbox", marker = "extra == 'proxy-runtime'", specifier = ">=0.3.39,<1.0" },
{ name = "mangum", marker = "extra == 'proxy-runtime'", specifier = ">=0.17.0,<1.0" },
@ -5438,7 +5438,7 @@ source = { editable = "enterprise" }
[[package]]
name = "litellm-gateway"
version = "0.1.0"
source = { editable = "litellm-rust" }
source = { editable = "litellm-rust/crates/gateway" }
[[package]]
name = "litellm-proxy-extras"