Part of #2000; gates #2006.
TokenSpeed's frontend↔scheduler IPC is sglang topology (EngineCoreClient PUSH/PULL over PortArgs) but tokenspeed/runtime/engine/io_struct.py is plain-dataclass, pickle-only — no msgpack mode, so no non-Python frontend can speak it.
Upstream PR to lightseekorg/tokenspeed, using sglang 0.5.16's io_struct migration as the template:
Lessons from the sglang 0.5.16 consumer-side port (smg #1970) worth baking in: slotted structs turn phantom-attribute writes into hard errors (audit setattr sites); msgspec reports missing required args one at a time (make required fields deliberate); array("q") token-id containers.
Part of #2000; gates #2006.
TokenSpeed's frontend↔scheduler IPC is sglang topology (
EngineCoreClientPUSH/PULL overPortArgs) buttokenspeed/runtime/engine/io_struct.pyis plain-dataclass, pickle-only — no msgpack mode, so no non-Python frontend can speak it.Upstream PR to lightseekorg/tokenspeed, using sglang 0.5.16's
io_structmigration as the template:io_structdataclasses to kw-only msgspec Structs (tag=True, array_like=Truebase, matching sglang'sBaseReqpattern)sock_send/sock_recvhelpers honoring a pickle/msgpack env toggle (pickle stays default, likeSGLANG_USE_PICKLE_IPC)PickleWrapperintermediate stepAsyncLLM/EngineCoreClient/scheduler send-recv paths to the helpersLessons from the sglang 0.5.16 consumer-side port (smg #1970) worth baking in: slotted structs turn phantom-attribute writes into hard errors (audit setattr sites); msgspec reports missing required args one at a time (make required fields deliberate);
array("q")token-id containers.