MCPcopy
hub / github.com/lightningpixel/modly / _model_catalog

Function _model_catalog

tools/modly-cli/agent.py:179–183  ·  view source on GitHub ↗
(base_url: str, timeout: float)

Source from the content-addressed store, hash-verified

177
178
179def _model_catalog(base_url: str, timeout: float) -> list[dict[str, Any]]:
180 data = _request_json("GET", f"{base_url.rstrip('/')}/model/all", timeout=timeout)
181 if not isinstance(data, list):
182 raise ModlyCliError(f"Expected /model/all to return a list, got: {data}", code="INVALID_MODEL_CATALOG")
183 return [model for model in data if isinstance(model, dict)]
184
185
186def _model_ids(models: list[dict[str, Any]]) -> set[str]:

Callers 1

_validate_model_idFunction · 0.85

Calls 2

_request_jsonFunction · 0.85
ModlyCliErrorClass · 0.85

Tested by

no test coverage detected