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

Function get_model_config

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

Source from the content-addressed store, hash-verified

107
108
109def get_model_config(model: type[pydantic.BaseModel]) -> Any:
110 if PYDANTIC_V2:
111 return model.model_config
112 return model.__config__ # type: ignore
113
114
115def get_model_fields(model: type[pydantic.BaseModel]) -> dict[str, FieldInfo]:

Callers 1

constructMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected