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

Function model_copy

src/opencode_ai/_compat.py:121–124  ·  view source on GitHub ↗
(model: _ModelT, *, deep: bool = False)

Source from the content-addressed store, hash-verified

119
120
121def model_copy(model: _ModelT, *, deep: bool = False) -> _ModelT:
122 if PYDANTIC_V2:
123 return model.model_copy(deep=deep)
124 return model.copy(deep=deep) # type: ignore
125
126
127def model_json(model: pydantic.BaseModel, *, indent: int | None = None) -> str:

Callers 3

_info_to_optionsMethod · 0.85
requestMethod · 0.85
requestMethod · 0.85

Calls 1

copyMethod · 0.45

Tested by

no test coverage detected