Skip to content

[docs][serve] Fix Serve LLM examples sidebar doc links 404#64209

Open
ryankert01 wants to merge 1 commit into
masterfrom
codex/fix-serve-llm-doc-links
Open

[docs][serve] Fix Serve LLM examples sidebar doc links 404#64209
ryankert01 wants to merge 1 commit into
masterfrom
codex/fix-serve-llm-doc-links

Conversation

@ryankert01

@ryankert01 ryankert01 commented Jun 18, 2026

Copy link
Copy Markdown
Member

Why?

When clicked on the sidebar of ray serve -> Serving llms -> examples -> serve small llms(or any others in this dir), they 404ed.

Summary

Fix stale Serve LLM tutorial links after deployment-serve-llm moved to sphinx_collections output under /_collections. Clicking the Serve LLM entries from the sidebar could still open the old path and 404.

  • Canonicalize legacy sidebar/docs URLs to the fetched _collections pages.
  • Add lightweight redirects for old serve/tutorials/deployment-serve-llm/... paths.
  • Harden the rewrite for release-version docs URLs and safe JS redirect escaping.

Root Cause

The tutorials should be preserved. The in-tree copies were removed after the collection move, but some generated/sidebar links still used the old path shape.

Validation

  • python -m compileall -q doc/source/conf.py doc/source/custom_directives.py
  • git diff --check -- doc/source/conf.py doc/source/custom_directives.py
  • Focused Python checks for URL rewrites, redirects, and double-content legacy paths.
  • Pre-commit path checked; repo hooks skip doc/source/ by config.

@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 introduces mechanism to rewrite legacy deployment serve LLM links and generate HTML redirects for legacy templates. The feedback highlights three key improvement opportunities: making the URL matching regex more robust by using a wildcard instead of hardcoded version segments, fixing a potential redirect bug caused by HTML-escaping inside a JavaScript block (suggesting json.dumps instead), and handling double content segments in legacy paths within canonicalize_collection_href to prevent broken links.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread doc/source/conf.py
Comment thread doc/source/conf.py
Comment thread doc/source/custom_directives.py
@ryankert01 ryankert01 force-pushed the codex/fix-serve-llm-doc-links branch 3 times, most recently from 44d8747 to b7b7e38 Compare June 18, 2026 17:27
@ryankert01 ryankert01 marked this pull request as ready for review June 18, 2026 17:31
@ryankert01 ryankert01 requested a review from a team as a code owner June 18, 2026 17:31
@ryankert01 ryankert01 force-pushed the codex/fix-serve-llm-doc-links branch 3 times, most recently from 3345b49 to ee5bbeb Compare June 18, 2026 18:12
@ryankert01 ryankert01 changed the title [codex] Fix Serve LLM template doc links [docs] Fix Serve LLM template doc links Jun 18, 2026

@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 ee5bbeb. Configure here.

Comment thread doc/source/conf.py
@ryankert01 ryankert01 changed the title [docs] Fix Serve LLM template doc links [docs] Fix Serve LLM template doc links 404 Jun 18, 2026
@ryankert01 ryankert01 changed the title [docs] Fix Serve LLM template doc links 404 [docs] Fix Serve LLM examples sidebar doc links 404 Jun 18, 2026
@ryankert01 ryankert01 added serve Ray Serve Related Issue llm vllm labels Jun 18, 2026
@ryankert01 ryankert01 changed the title [docs] Fix Serve LLM examples sidebar doc links 404 [docs][serve] Fix Serve LLM examples sidebar doc links 404 Jun 18, 2026
@ryankert01 ryankert01 force-pushed the codex/fix-serve-llm-doc-links branch from ee5bbeb to 60cb170 Compare June 18, 2026 18:21
@kouroshHakha

Copy link
Copy Markdown
Contributor

@dstrodtman can you review this ?

@elliot-barn elliot-barn added the go add ONLY when ready to merge, run all tests label Jun 19, 2026
@elliot-barn elliot-barn enabled auto-merge (squash) June 19, 2026 03:45
@github-actions github-actions Bot disabled auto-merge June 20, 2026 14:25
Signed-off-by: Ryan Huang <ryankert01@gmail.com>
@ryankert01 ryankert01 force-pushed the codex/fix-serve-llm-doc-links branch from 44dd30b to cbc27fd Compare June 20, 2026 16:41
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 vllm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants