{"record":{"id":"0cf7f73ebbd34697","repo":"sgl-project/sglang","slug":"additional-customized-generation-output-is-not-sup","errorCode":null,"errorMessage":"additional customized generation output is not supported by Rust egress","messagePattern":"additional customized generation output is not supported by Rust egress","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/managers/scheduler_components/output_streamer.py","lineNumber":70,"sourceCode":"    has_additional_customized_info: ClassVar[bool] = False\n\n    send_to_detokenizer: zmq.Socket\n    tree_cache: BasePrefixCache\n    ps: ParallelState\n    server_args: ServerArgs\n    is_generation: bool\n    spec_algorithm: SpeculativeAlgorithm\n    disaggregation_mode: DisaggregationMode\n    enable_hicache_storage: Callable[[], bool]\n    # When SGLANG_RUST_SERVER is on, generation output is pushed to the embedded\n    # Rust egress ring via `rust_server.push_generation` instead of the zmq\n    # detokenizer. None otherwise. (Rust-specific state lives in RustServer.)\n    rust_server: Optional[RustServer] = None\n    _test_stream_output_count: int = 0\n\n    def __post_init__(self) -> None:\n        if self.has_additional_customized_info and self.rust_server is not None:\n            raise ValueError(\n                \"additional customized generation output is not supported by \"\n                \"Rust egress\"\n            )\n\n    def _get_storage_backend_type(self) -> str:\n        \"\"\"Get storage backend type from tree_cache.\"\"\"\n        storage_backend_type = \"none\"\n        cache_controller = getattr(self.tree_cache, \"cache_controller\", None)\n        if cache_controller and hasattr(cache_controller, \"storage_backend\"):\n            storage_backend = cache_controller.storage_backend\n            if storage_backend is not None:\n                storage_backend_type = type(storage_backend).__name__\n        return storage_backend_type\n\n    def get_cached_tokens_details(self, req: Req) -> Optional[CachedTokensDetails]:\n        \"\"\"Get detailed cache breakdown for a request, if available.\n\n        Returns:","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/managers/scheduler_components/output_streamer.py#L52-L88","documentation":"OutputStreamer refuses to combine Rust-based egress with requests that carry additional customized generation output; the Rust output path does not serialize the extra per-request customized info fields.","triggerScenarios":"Constructing OutputStreamer with rust_server set while has_additional_customized_info is true (e.g. using the Rust tokenizer/detokenizer path with customized output fields enabled on requests).","commonSituations":"Enabling the Rust egress/detokenizer feature while a model or middleware attaches additional customized generation outputs.","solutions":["Disable the additional customized output feature for requests when using Rust egress","Switch back to the Python egress path (do not set rust_server) if customized outputs are required","File/track support for customized output in the Rust egress path"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if streamer.rust_server is not None and request_has_customized_output:\n    raise SystemExit('disable customized output or Rust egress before starting')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Feature-flag matrix check at startup: Rust egress x customized output is unsupported","Document the incompatibility in your serving config"],"tags":["rust-egress","output-streaming","feature-incompatibility"],"backgroundTag":"unsupported-feature-combination","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}