Skip to content

[llm][docs] Restore literalinclude to code example#59520

Merged
kouroshHakha merged 1 commit intoray-project:masterfrom
eicherseiji:fix-prefix-aware-routing-example
Dec 17, 2025
Merged

[llm][docs] Restore literalinclude to code example#59520
kouroshHakha merged 1 commit intoray-project:masterfrom
eicherseiji:fix-prefix-aware-routing-example

Conversation

@eicherseiji
Copy link
Contributor

Description

Fix documentation regression introduced in #57787 where the prefix-aware routing example used incorrect kwargs.
This PR restores the literalinclude directive that references the tested example file, ensuring the documentation stays in sync with the actual API and CI validates the example.

Related issues

Fixes regression from #57787

Additional information

Before (incorrect):

app = build_openai_app({
    "llm_configs": [llm_config],
    "router_cls": PrefixCacheAffinityRouter,  # Does not exist
    "router_config": {...}  # Does not exist
})

After (correct, via literalinclude):

llm_config = LLMConfig(
    ...
    deployment_config={
        ...
        "request_router_config": {
            "request_router_class": PrefixCacheAffinityRouter,
            "request_router_kwargs": {...},
        },
    },
)
app = build_openai_app({"llm_configs": [llm_config]})

Signed-off-by: Seiji Eicher <seiji@anyscale.com>
@eicherseiji eicherseiji added the go add ONLY when ready to merge, run all tests label Dec 17, 2025
Copy link
Contributor

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

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 fixes a regression in the documentation for prefix-aware routing. The incorrect, hardcoded code example has been replaced with a literalinclude directive. This is an excellent change as it ensures the documentation's code example is sourced directly from a tested file, preventing future discrepancies. The change is correct and improves the maintainability of the documentation.

@kouroshHakha kouroshHakha marked this pull request as ready for review December 17, 2025 22:47
@kouroshHakha kouroshHakha requested review from a team as code owners December 17, 2025 22:47
@kouroshHakha kouroshHakha merged commit 10fe5f2 into ray-project:master Dec 17, 2025
4 of 6 checks passed
zzchun pushed a commit to zzchun/ray that referenced this pull request Dec 18, 2025
Signed-off-by: Seiji Eicher <seiji@anyscale.com>
Yicheng-Lu-llll pushed a commit to Yicheng-Lu-llll/ray that referenced this pull request Dec 22, 2025
Signed-off-by: Seiji Eicher <seiji@anyscale.com>
peterxcli pushed a commit to peterxcli/ray that referenced this pull request Feb 25, 2026
Signed-off-by: Seiji Eicher <seiji@anyscale.com>
Signed-off-by: peterxcli <peterxcli@gmail.com>
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants