Skip to content

[serve][llm] Enable LoRA for direct streaming aggregated and PD disaggregated deployments - #65680

Merged
jeffreywang88 merged 20 commits into
masterfrom
lora-direct-streaming
Sep 29, 2026
Merged

jeffreywang88 merged 20 commits into
masterfrom
lora-direct-streaming

Conversation

@jeffreywang88

@jeffreywang88 jeffreywang88 commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

Description

Enable LoRA multiplexing for direct streaming, including PD deployments.

How LoRA used to work with non-direct-streaming?

For normal, non-direct-streaming requests, OpenAIIngress calls LLMServer.chat() or completions(), which reach _run_request() and resolve the requested LoRA before submitting work to vLLM.

How LoRA now works with direct streaming?

Direct streaming instead has the ingress router select a replica, HAProxy proxy the request to that replica’s native vLLM ASGI application, and stream the response back to the client. That path bypasses LLMServer.chat(), completions(), and _run_request(), so LoRA was never resolved.

In this PR,

  • [Fix] Initialize vLLM’s OpenAI serving state once and share it with the native ASGI app. When the LoRA resolver registers an adapter, the /v1/completions, /v1/chat/completions, and /v1/models handlers now see that same adapter registry.
  • [Test] Add a direct-streaming LoRA test that sends a cold adapter request through HAProxy, verifies the adapter appears in /v1/models, and exercises base-model and adapter requests through completions and chat-completions, with and without streaming.
  • [Config and docs] Require request-body forwarding for direct-streaming multi-LoRA, enable it in the direct-streaming release test job, and document the required settings.
  • [Existing] For a LoRA-enabled direct-streaming application, LLMRouter reads the requested model from the forwarded request body. If it belongs to the configured base model, it selects through a multiplexed Serve handle and HAProxy injects the resulting trusted adapter header for the selected replica.
  • [Existing] LLMServer adds a LoRA-resolving ASGI middleware before vLLM handles the request.
  • [Existing] Serve’s multiplexed loader downloads and caches the adapter lazily on the selected replica.

For PD deployments, propagate the multiplexed model ID to the prefill handle and reject incompatible prefill/decode LoRA configuration.

Related issues

Stack: #65678 -> #65679 -> #66170 -> this PR -> KVAwareRouter LoRA support

Additional information

Optional: Add implementation details, API changes, usage examples, screenshots, etc.

@jeffreywang88 jeffreywang88 added the go add ONLY when ready to merge, run all tests label Aug 23, 2026
@jeffreywang88
jeffreywang88 marked this pull request as ready for review August 25, 2026 13:48
@jeffreywang88
jeffreywang88 requested review from a team as code owners August 25, 2026 13:48

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements support for LoRA multiplexing with direct streaming in Ray Serve, ensuring that requested adapter IDs are properly parsed, validated, and propagated across routing components (including prefill/decode engines and HAProxy). The feedback suggests two key improvements: implementing a FIFO eviction policy on the _multiplexed_handles cache in LLMRouter to prevent unbounded memory growth, and wrapping the multiplexed_model_id_headers loop in the HAProxy Jinja2 template with an existence check to avoid potential rendering errors.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@ray-gardener ray-gardener Bot added serve Ray Serve Related Issue llm labels Aug 25, 2026
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had
any activity for 14 days. It will be closed in another 14 days if no further activity occurs.
Thank you for your contributions.

You can always ask for help on our discussion forum or Ray's public slack channel.

If you'd like to keep this open, just leave any comment, and the stale label will be removed.

@github-actions github-actions Bot added the stale The issue is stale. It will be closed within 7 days unless there are further conversation label Sep 9, 2026
@eicherseiji
eicherseiji force-pushed the lora-direct-streaming branch from 6bbd31f to 80c624f Compare September 9, 2026 01:35

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 80c624f. Configure here.

@github-actions github-actions Bot added unstale A PR that has been marked unstale. It will not get marked stale again if this label is on it. and removed stale The issue is stale. It will be closed within 7 days unless there are further conversation labels Sep 10, 2026
@jeffreywang88
jeffreywang88 requested review from a team as code owners September 14, 2026 21:16
@jeffreywang88
jeffreywang88 removed this pull request from stack #65681 September 15, 2026 06:34
@jeffreywang88
jeffreywang88 changed the base branch from round-robin-multiplexing to serve-multiplex-retry September 15, 2026 06:35
@jeffreywang88
jeffreywang88 force-pushed the lora-direct-streaming branch 2 times, most recently from 3f7b5b9 to 7def60f Compare September 15, 2026 06:43
jeffreywang88 added a commit that referenced this pull request Sep 15, 2026
)

## Description
- Enable model multiplexing for direct-ingress deployments over both
HTTP and gRPC.
- Remove the deployment-time and runtime rejections that prevented a
multiplexed direct-ingress app from running.
- At the direct ASGI entry point, recognize both
`serve_multiplexed_model_id` and proxy-normalized
`serve-multiplexed-model-id`, then store the value in
`RequestMetadata.multiplexed_model_id`.
- At the direct gRPC entry point, read `multiplexed_model_id` from gRPC
invocation metadata and store it in
`RequestMetadata.multiplexed_model_id`.

### Client usage

```python
# HTTP
response = httpx.get(
    direct_ingress_url,
    headers={"serve_multiplexed_model_id": "multiplex-model-id"},
)
```

```python
# gRPC
response = stub.Method2(
    request,
    metadata=(
        ("application", "default"),
        ("multiplexed_model_id", "multiplex-model-id"),
    ),
)
```

## Related issues
Stack: This PR -> #65679 ->
#66170 ->
#65680 -> `KVAwareRouter` LoRA
support.

## Additional information
> Optional: Add implementation details, API changes, usage examples,
screenshots, etc.

---------

Signed-off-by: Jeffrey Wang <[email protected]>
Base automatically changed from serve-multiplex-retry to master September 21, 2026 19:42
jeffreywang88 added a commit that referenced this pull request Sep 21, 2026
## Problem
`choose_replica(_reserve=False)` previously called the routing policy
once and failed if it returned no candidates. Multiplexed routing can
temporarily return no candidates while model-location metadata
propagates, even when eligible replicas exist. Through an ingress
request router, this becomes a client-visible HTTP 503.

## Solution
Reuse the existing selection retry loop with the same pending request so
the policy can fall back to an eligible replica. Selection still skips
capacity reservations and queue-length probes. Explicitly close the
generator to clean up its backoff accounting on success and
cancellation.

Add a Serve-only HAProxy integration test emulating Serve LLM's separate
ingress router: select a backend replica with a multiplexed handle and
`_reserve=False`, then return its endpoint for HAProxy to forward the
original request. Hold the model-location index empty and require two
requests to succeed without client retries.

## Implication for LLM applications
When a LoRA adapter first loads, there’s a delay before its location
propagates through the controller to the router. An immediate subsequent
request can fail because the router
[remembers](https://github.com/ray-project/ray/blob/9634fa77aab2ece9759b380d20d315d4e27c912b/python/ray/serve/_private/request_router/request_router.py#L331)
that an earlier request was sent to a replica to load the adapter, but
it has not yet received metadata identifying a replica hosting it. In
this state, the multiplexed policy returns no candidates on the new
request’s first selection attempt. The old `_reserve=False`
[path](https://github.com/ray-project/ray/blob/9634fa77aab2ece9759b380d20d315d4e27c912b/python/ray/llm/_internal/serve/core/ingress/router.py#L314-L319)
fails immediately instead of retrying, producing HTTP 503.

With the retry mechanism, selection runs again using the same pending
request, preserving its fallback state. The policy can then select an
eligible replica even before the metadata arrives, so this propagation
delay alone no longer causes a client-visible failure.

## Stack

#65678 → #65679 → this PR → #65680

---------

Signed-off-by: Jeffrey Wang <[email protected]>
eicherseiji added a commit that referenced this pull request Sep 22, 2026
## Why

The current 256 KiB cap truncates the router copy of large LLM requests,
causing body-aware routing to lose information. Several recent routing
changes depend on this body:

- [#64224](#64224),
[#64328](#64328), and
[#65095](#65095) use it for
KV-aware routing.
- [#65680](#65680) uses it for
LoRA model selection.
- [#66258](#66258) and
[#66315](#66315) use it for
deployment-aware, multi-model direct streaming.
- [#63183](#63183) introduced the
body-forwarding gate shared by these paths.

This PR raises the default buffer to 8 MiB and lowers the default
`maxconn` to 4,096. The sizing and behavior were verified with a real
HAProxy 2.8.25 test and against the bundled HAProxy source code. Both
settings retain their existing environment-variable overrides.

| Consideration | Result |
|---|---|
| Request size | A one-million-token English request is commonly
estimated at roughly 4 MB. The test request is 5.72 MiB, so 8 MiB leaves
2.28 MiB (~40%) headroom. |
| Latency | Requests below 256 KiB do not wait longer. Requests from 256
KiB to 8 MiB now wait for the complete body before routing. |
| Memory | Buffers are allocated dynamically. A live stream can use
roughly 16 MiB across request and response buffers. Lowering `maxconn`
from 20,000 to 4,096 reduces the theoretical buffer ceiling from 320 GiB
to 64 GiB. |

## Changes

- Raise `RAY_SERVE_HAPROXY_INGRESS_REQUEST_ROUTER_BUFSIZE` from 256 KiB
to 8 MiB.
- Lower `RAY_SERVE_HAPROXY_MAXCONN` from 20,000 to 4,096.
- Test a 6,000,014-byte, million-token-sized request end to end.
- Derive rendered-config assertions from their constants so environment
overrides remain testable.
- Update the KV-aware routing guide.

## Tests

- Pre-commit hooks, Python compilation, Serve mypy, and Serve pyrefly
passed.
- HAProxy end-to-end test passed: 1 passed, 37 deselected in 2.85s using
bundled HAProxy 2.8.25.

This does not duplicate the related PRs: they introduce or consume
body-aware routing, while this PR increases the shared buffer default
and tests a million-token-sized body.

AI assistance was used to implement and validate this change; the
submitter reviewed every changed line.

---------

Signed-off-by: Seiji Eicher <[email protected]>
Signed-off-by: Seiji Eicher <[email protected]>
owenowenisme pushed a commit to owenowenisme/ray that referenced this pull request Sep 23, 2026
…ject#66170)

## Problem
`choose_replica(_reserve=False)` previously called the routing policy
once and failed if it returned no candidates. Multiplexed routing can
temporarily return no candidates while model-location metadata
propagates, even when eligible replicas exist. Through an ingress
request router, this becomes a client-visible HTTP 503.

## Solution
Reuse the existing selection retry loop with the same pending request so
the policy can fall back to an eligible replica. Selection still skips
capacity reservations and queue-length probes. Explicitly close the
generator to clean up its backoff accounting on success and
cancellation.

Add a Serve-only HAProxy integration test emulating Serve LLM's separate
ingress router: select a backend replica with a multiplexed handle and
`_reserve=False`, then return its endpoint for HAProxy to forward the
original request. Hold the model-location index empty and require two
requests to succeed without client retries.

## Implication for LLM applications
When a LoRA adapter first loads, there’s a delay before its location
propagates through the controller to the router. An immediate subsequent
request can fail because the router
[remembers](https://github.com/ray-project/ray/blob/9634fa77aab2ece9759b380d20d315d4e27c912b/python/ray/serve/_private/request_router/request_router.py#L331)
that an earlier request was sent to a replica to load the adapter, but
it has not yet received metadata identifying a replica hosting it. In
this state, the multiplexed policy returns no candidates on the new
request’s first selection attempt. The old `_reserve=False`
[path](https://github.com/ray-project/ray/blob/9634fa77aab2ece9759b380d20d315d4e27c912b/python/ray/llm/_internal/serve/core/ingress/router.py#L314-L319)
fails immediately instead of retrying, producing HTTP 503.

With the retry mechanism, selection runs again using the same pending
request, preserving its fallback state. The policy can then select an
eligible replica even before the metadata arrives, so this propagation
delay alone no longer causes a client-visible failure.

## Stack

ray-project#65678 → ray-project#65679 → this PR → ray-project#65680

---------

Signed-off-by: Jeffrey Wang <[email protected]>
owenowenisme pushed a commit to owenowenisme/ray that referenced this pull request Sep 23, 2026
…t#66360)

## Why

The current 256 KiB cap truncates the router copy of large LLM requests,
causing body-aware routing to lose information. Several recent routing
changes depend on this body:

- [ray-project#64224](ray-project#64224),
[ray-project#64328](ray-project#64328), and
[ray-project#65095](ray-project#65095) use it for
KV-aware routing.
- [ray-project#65680](ray-project#65680) uses it for
LoRA model selection.
- [ray-project#66258](ray-project#66258) and
[ray-project#66315](ray-project#66315) use it for
deployment-aware, multi-model direct streaming.
- [ray-project#63183](ray-project#63183) introduced the
body-forwarding gate shared by these paths.

This PR raises the default buffer to 8 MiB and lowers the default
`maxconn` to 4,096. The sizing and behavior were verified with a real
HAProxy 2.8.25 test and against the bundled HAProxy source code. Both
settings retain their existing environment-variable overrides.

| Consideration | Result |
|---|---|
| Request size | A one-million-token English request is commonly
estimated at roughly 4 MB. The test request is 5.72 MiB, so 8 MiB leaves
2.28 MiB (~40%) headroom. |
| Latency | Requests below 256 KiB do not wait longer. Requests from 256
KiB to 8 MiB now wait for the complete body before routing. |
| Memory | Buffers are allocated dynamically. A live stream can use
roughly 16 MiB across request and response buffers. Lowering `maxconn`
from 20,000 to 4,096 reduces the theoretical buffer ceiling from 320 GiB
to 64 GiB. |

## Changes

- Raise `RAY_SERVE_HAPROXY_INGRESS_REQUEST_ROUTER_BUFSIZE` from 256 KiB
to 8 MiB.
- Lower `RAY_SERVE_HAPROXY_MAXCONN` from 20,000 to 4,096.
- Test a 6,000,014-byte, million-token-sized request end to end.
- Derive rendered-config assertions from their constants so environment
overrides remain testable.
- Update the KV-aware routing guide.

## Tests

- Pre-commit hooks, Python compilation, Serve mypy, and Serve pyrefly
passed.
- HAProxy end-to-end test passed: 1 passed, 37 deselected in 2.85s using
bundled HAProxy 2.8.25.

This does not duplicate the related PRs: they introduce or consume
body-aware routing, while this PR increases the shared buffer default
and tests a million-token-sized body.

AI assistance was used to implement and validate this change; the
submitter reviewed every changed line.

---------

Signed-off-by: Seiji Eicher <[email protected]>
Signed-off-by: Seiji Eicher <[email protected]>
@jeffreywang88

Copy link
Copy Markdown
Contributor Author

@jeffreywang88

jeffreywang88 commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor Author

Hmm really struggling at acquiring 4xL4 nodes to pass release tests :(

@jeffreywang88
jeffreywang88 requested a review from a team as a code owner September 29, 2026 04:23
@jeffreywang88
jeffreywang88 merged commit f1cc12d into master Sep 29, 2026
6 checks passed
@jeffreywang88
jeffreywang88 deleted the lora-direct-streaming branch September 29, 2026 18:11
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
…-project#65678)

## Description
- Enable model multiplexing for direct-ingress deployments over both
HTTP and gRPC.
- Remove the deployment-time and runtime rejections that prevented a
multiplexed direct-ingress app from running.
- At the direct ASGI entry point, recognize both
`serve_multiplexed_model_id` and proxy-normalized
`serve-multiplexed-model-id`, then store the value in
`RequestMetadata.multiplexed_model_id`.
- At the direct gRPC entry point, read `multiplexed_model_id` from gRPC
invocation metadata and store it in
`RequestMetadata.multiplexed_model_id`.

### Client usage

```python
# HTTP
response = httpx.get(
    direct_ingress_url,
    headers={"serve_multiplexed_model_id": "multiplex-model-id"},
)
```

```python
# gRPC
response = stub.Method2(
    request,
    metadata=(
        ("application", "default"),
        ("multiplexed_model_id", "multiplex-model-id"),
    ),
)
```

## Related issues
Stack: This PR -> ray-project#65679 ->
ray-project#66170 ->
ray-project#65680 -> `KVAwareRouter` LoRA
support.

## Additional information
> Optional: Add implementation details, API changes, usage examples,
screenshots, etc.

---------

Signed-off-by: Jeffrey Wang <[email protected]>
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
…#65679)

## Description
Enable `RoundRobinRouter` to use `MultiplexMixin` for requests with a
multiplexed model ID. Replica selection proceeds as follows:

1. Serve provides the currently viable candidate replicas.
2. `apply_multiplex_routing()` first selects replicas already hosting
the requested model. This warm tier uses a per-model round-robin cursor.
3. If no host is known, or those hosts were already attempted, it
selects replicas with the fewest loaded models. This fallback uses the
shared cursor.
4. After the matching timeout, it tries fewest-model replicas once more,
then all replicas, using the shared cursor.
5. The router intersects the selected tier with viable candidates and
applies round-robin ordering.

Non-multiplexed requests retain existing shared-cursor round-robin
behavior.

### Why `ConsistentHashRouter` is skipped?

Model multiplexing and consistent hashing can place conflicting
constraints on replica selection. Model multiplexing limits the
candidates to replicas that have the requested model loaded, while
consistent hashing maps a request to a specific replica. The problem is
that the hashed replica may not be one of the replicas with that model
loaded.

Since it is unclear which constraint should take priority, we
deliberately do not support model multiplexing with
`ConsistentHashRouter`.

## Related issues

Stack: ray-project#65678 -> this PR ->
ray-project#66170 ->
ray-project#65680 -> `KVAwareRouter` LoRA
support.

---------

Signed-off-by: Jeffrey Wang <[email protected]>
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
…ject#66170)

## Problem
`choose_replica(_reserve=False)` previously called the routing policy
once and failed if it returned no candidates. Multiplexed routing can
temporarily return no candidates while model-location metadata
propagates, even when eligible replicas exist. Through an ingress
request router, this becomes a client-visible HTTP 503.

## Solution
Reuse the existing selection retry loop with the same pending request so
the policy can fall back to an eligible replica. Selection still skips
capacity reservations and queue-length probes. Explicitly close the
generator to clean up its backoff accounting on success and
cancellation.

Add a Serve-only HAProxy integration test emulating Serve LLM's separate
ingress router: select a backend replica with a multiplexed handle and
`_reserve=False`, then return its endpoint for HAProxy to forward the
original request. Hold the model-location index empty and require two
requests to succeed without client retries.

## Implication for LLM applications
When a LoRA adapter first loads, there’s a delay before its location
propagates through the controller to the router. An immediate subsequent
request can fail because the router
[remembers](https://github.com/ray-project/ray/blob/9634fa77aab2ece9759b380d20d315d4e27c912b/python/ray/serve/_private/request_router/request_router.py#L331)
that an earlier request was sent to a replica to load the adapter, but
it has not yet received metadata identifying a replica hosting it. In
this state, the multiplexed policy returns no candidates on the new
request’s first selection attempt. The old `_reserve=False`
[path](https://github.com/ray-project/ray/blob/9634fa77aab2ece9759b380d20d315d4e27c912b/python/ray/llm/_internal/serve/core/ingress/router.py#L314-L319)
fails immediately instead of retrying, producing HTTP 503.

With the retry mechanism, selection runs again using the same pending
request, preserving its fallback state. The policy can then select an
eligible replica even before the metadata arrives, so this propagation
delay alone no longer causes a client-visible failure.

## Stack

ray-project#65678 → ray-project#65679 → this PR → ray-project#65680

---------

Signed-off-by: Jeffrey Wang <[email protected]>
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
…t#66360)

## Why

The current 256 KiB cap truncates the router copy of large LLM requests,
causing body-aware routing to lose information. Several recent routing
changes depend on this body:

- [ray-project#64224](ray-project#64224),
[ray-project#64328](ray-project#64328), and
[ray-project#65095](ray-project#65095) use it for
KV-aware routing.
- [ray-project#65680](ray-project#65680) uses it for
LoRA model selection.
- [ray-project#66258](ray-project#66258) and
[ray-project#66315](ray-project#66315) use it for
deployment-aware, multi-model direct streaming.
- [ray-project#63183](ray-project#63183) introduced the
body-forwarding gate shared by these paths.

This PR raises the default buffer to 8 MiB and lowers the default
`maxconn` to 4,096. The sizing and behavior were verified with a real
HAProxy 2.8.25 test and against the bundled HAProxy source code. Both
settings retain their existing environment-variable overrides.

| Consideration | Result |
|---|---|
| Request size | A one-million-token English request is commonly
estimated at roughly 4 MB. The test request is 5.72 MiB, so 8 MiB leaves
2.28 MiB (~40%) headroom. |
| Latency | Requests below 256 KiB do not wait longer. Requests from 256
KiB to 8 MiB now wait for the complete body before routing. |
| Memory | Buffers are allocated dynamically. A live stream can use
roughly 16 MiB across request and response buffers. Lowering `maxconn`
from 20,000 to 4,096 reduces the theoretical buffer ceiling from 320 GiB
to 64 GiB. |

## Changes

- Raise `RAY_SERVE_HAPROXY_INGRESS_REQUEST_ROUTER_BUFSIZE` from 256 KiB
to 8 MiB.
- Lower `RAY_SERVE_HAPROXY_MAXCONN` from 20,000 to 4,096.
- Test a 6,000,014-byte, million-token-sized request end to end.
- Derive rendered-config assertions from their constants so environment
overrides remain testable.
- Update the KV-aware routing guide.

## Tests

- Pre-commit hooks, Python compilation, Serve mypy, and Serve pyrefly
passed.
- HAProxy end-to-end test passed: 1 passed, 37 deselected in 2.85s using
bundled HAProxy 2.8.25.

This does not duplicate the related PRs: they introduce or consume
body-aware routing, while this PR increases the shared buffer default
and tests a million-token-sized body.

AI assistance was used to implement and validate this change; the
submitter reviewed every changed line.

---------

Signed-off-by: Seiji Eicher <[email protected]>
Signed-off-by: Seiji Eicher <[email protected]>
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
…gregated deployments (ray-project#65680)

## Description
Enable LoRA multiplexing for direct streaming, including PD deployments.

### How LoRA used to work with non-direct-streaming?
For normal, non-direct-streaming requests, `OpenAIIngress` calls
`LLMServer.chat()` or `completions()`, which reach `_run_request()` and
resolve the requested LoRA before submitting work to vLLM.

### How LoRA now works with direct streaming?
Direct streaming instead has the ingress router select a replica,
HAProxy proxy the request to that replica’s native vLLM ASGI
application, and stream the response back to the client. That path
bypasses `LLMServer.chat()`, `completions()`, and `_run_request()`, so
LoRA was never resolved.

In this PR,
- [Fix] Initialize vLLM’s OpenAI serving state once and share it with
the native ASGI app. When the LoRA resolver registers an adapter, the
`/v1/completions`, `/v1/chat/completions`, and `/v1/models` handlers now
see that same adapter registry.
- [Test] Add a direct-streaming LoRA test that sends a cold adapter
request through HAProxy, verifies the adapter appears in `/v1/models`,
and exercises base-model and adapter requests through completions and
chat-completions, with and without streaming.
- [Config and docs] Require request-body forwarding for direct-streaming
multi-LoRA, enable it in the direct-streaming release test job, and
document the required settings.
- [Existing] For a LoRA-enabled direct-streaming application,
`LLMRouter` reads the requested `model` from the forwarded request body.
If it belongs to the configured base model, it selects through a
multiplexed Serve handle and HAProxy injects the resulting trusted
adapter header for the selected replica.
- [Existing] `LLMServer` adds a LoRA-resolving ASGI middleware before
vLLM handles the request.
- [Existing] Serve’s multiplexed loader downloads and caches the adapter
lazily on the selected replica.

For PD deployments, propagate the multiplexed model ID to the prefill
handle and reject incompatible prefill/decode LoRA configuration.

## Related issues
Stack: ray-project#65678 ->
ray-project#65679 ->
ray-project#66170 -> this PR ->
`KVAwareRouter` LoRA support

## Additional information
> Optional: Add implementation details, API changes, usage examples,
screenshots, etc.

---------

Signed-off-by: Jeffrey Wang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go add ONLY when ready to merge, run all tests llm serve Ray Serve Related Issue unstale A PR that has been marked unstale. It will not get marked stale again if this label is on it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants