MCPcopy Create free account
hub / github.com/anomalyco/opencode-sdk-python / get_model_fields

Function get_model_fields

src/opencode_ai/_compat.py:115–118  ·  view source on GitHub ↗
(model: type[pydantic.BaseModel])

Source from the content-addressed store, hash-verified

113
114
115def get_model_fields(model: type[pydantic.BaseModel]) -> dict[str, FieldInfo]:
116 if PYDANTIC_V2:
117 return model.model_fields
118 return model.__fields__ # type: ignore
119
120
121def model_copy(model: _ModelT, *, deep: bool = False) -> _ModelT:

Callers 2

assert_matches_modelFunction · 0.90
constructMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected