From e862c2f45bc81c72bb84f3807d88d60cfb93d694 Mon Sep 17 00:00:00 2001 From: Shaurya Pratap Srivastava <82306174+null-Exception1@users.noreply.github.com> Date: Fri, 4 Sep 2026 12:05:37 +0530 Subject: [PATCH] [Docs] Add example for Renderer.render_cmpl() usage (#54265) Signed-off-by: null-Exception1 --- vllm/v1/engine/async_llm.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/vllm/v1/engine/async_llm.py b/vllm/v1/engine/async_llm.py index fdeebdcceb..cc132afd97 100644 --- a/vllm/v1/engine/async_llm.py +++ b/vllm/v1/engine/async_llm.py @@ -652,6 +652,17 @@ class AsyncLLM(EngineClient): The caller of generate() iterates the returned AsyncGenerator, returning the RequestOutput back to the caller. + + Note: + Passing a raw prompt string directly to this method is deprecated. + Advanced power-users can manually bypass the raw-prompt fallback + path using the Engine's underlying Renderer pipeline: + + >>> from vllm.inputs import parse_model_prompt + >>> parsed = parse_model_prompt(self.model_config, "Prompt text") + >>> params = self.renderer.default_cmpl_tok_params + >>> (engine_input,) = self.renderer.render_cmpl([parsed], params) + >>> gen = self.generate(engine_input, sampling_params, request_id) """ q: RequestOutputCollector | None = None