[Config] msgspec.Struct for the config tier (#38753)

This commit is contained in:
Cheng Wan
2026-09-09 19:41:19 -07:00
committed by GitHub
parent 106cc561f9
commit f1a512c51c
44 changed files with 328 additions and 210 deletions
@@ -4,6 +4,8 @@ import unittest
from types import ModuleType, SimpleNamespace
from unittest.mock import Mock, patch
import msgspec
from sglang.srt.parser.template_detection import (
REASONING_PARSER_RULES,
TOOL_CALL_PARSER_RULES,
@@ -892,7 +894,9 @@ class TestResolveAutoParsers(unittest.TestCase):
reasoning_parser="auto",
tool_call_parser="auto",
)
object.__setattr__(args, "model_path", "nonexistent/model-does-not-exist-xyz")
msgspec.Struct.__setattr__(
args, "model_path", "nonexistent/model-does-not-exist-xyz"
)
with _patch_hf_transformers_utils(
Mock(side_effect=RuntimeError("tokenizer unavailable")),
Mock(side_effect=RuntimeError("config unavailable")),