MCPcopy Create free account
hub / github.com/IBM/mcp-cli / model_post_init

Method model_post_init

src/mcp_cli/context/context_manager.py:68–77  ·  view source on GitHub ↗

Initialize managers if not provided.

(self, __context: Any)

Source from the content-addressed store, hash-verified

66 _extra: dict[str, Any] = PrivateAttr(default_factory=dict)
67
68 def model_post_init(self, __context: Any) -> None:
69 """Initialize managers if not provided."""
70 if self.model_manager is None:
71 from mcp_cli.model_management import ModelManager
72
73 self.model_manager = ModelManager()
74
75 # Set up model configuration
76 if self.provider and self.model:
77 self.model_manager.switch_model(self.provider, self.model)
78
79 @classmethod
80 def create(

Callers

nothing calls this directly

Calls 2

ModelManagerClass · 0.90
switch_modelMethod · 0.80

Tested by

no test coverage detected