MCPcopy Create free account
hub / github.com/MiniMax-AI/Mini-Agent / InitializeRequestPatch

Class InitializeRequestPatch

mini_agent/acp/__init__.py:45–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43
44try:
45 class InitializeRequestPatch(InitializeRequest):
46 @field_validator("protocolVersion", mode="before")
47 @classmethod
48 def normalize_protocol_version(cls, value: Any) -> int:
49 if isinstance(value, str):
50 try:
51 return int(value.split(".")[0])
52 except Exception:
53 return 1
54 if isinstance(value, (int, float)):
55 return int(value)
56 return 1
57
58 InitializeRequest = InitializeRequestPatch
59 InitializeRequest.model_rebuild(force=True)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected