vllm.entrypoints.generate.base.protocol ¶
Classes:
-
SpeculativeDecodingMetrics–Per-request speculative-decoding acceptance metrics.
Functions:
-
structured_outputs_from_response_format–Apply
response_formatoverrides tostructured_outputs. -
validate_cache_salt–Validate cache salts before they reach downstream cache backends.
-
validate_structural_tag_response_format–Validate structural tags before they are sent to the engine.
SpeculativeDecodingMetrics ¶
Bases: OpenAIBaseModel
Per-request speculative-decoding acceptance metrics.
Experimental, subject to change. Only populated for single-sequence requests (n == 1); null for n > 1, mirroring the timing metrics.
Source code in vllm/entrypoints/generate/base/protocol.py
structured_outputs_from_response_format(structured_outputs, response_format) ¶
Apply response_format overrides to structured_outputs.
Source code in vllm/entrypoints/generate/base/protocol.py
validate_cache_salt(cache_salt) ¶
Validate cache salts before they reach downstream cache backends.
Source code in vllm/entrypoints/generate/base/protocol.py
validate_structural_tag_response_format(response_format) ¶
Validate structural tags before they are sent to the engine.
Engine-side validation reports malformed structural tags as generation failures. OpenAI request parsing should classify them as bad requests.