Commit 518a10f
refactor: introduce MCPModel base class for protocol types
Add MCPModel base class that inherits from Pydantic BaseModel with
`extra="allow"` configuration for forward compatibility with protocol
extensions.
This change:
- Creates MCPModel as a central base class for all MCP protocol types
- Updates all protocol types to inherit from MCPModel (directly or indirectly)
- Removes redundant model_config declarations from ~80 classes
- Maintains the same runtime behavior while reducing code duplication
The MCPModel pattern centralizes the `extra="allow"` configuration that
enables MCP protocol types to accept additional fields not defined in the
schema, which is essential for forward compatibility with future protocol
versions.
Co-authored-by: Max Isbey <224885523+maxisbey@users.noreply.github.com>1 parent b63776b commit 518a10f
1 file changed
+71
-187
lines changed
0 commit comments