MCPcopy Create free account
hub / github.com/IBM/AssetOpsBench / _normalize_model

Function _normalize_model

src/evaluation/metrics.py:159–166  ·  view source on GitHub ↗
(model: str)

Source from the content-addressed store, hash-verified

157
158
159def _normalize_model(model: str) -> str:
160 # Strip provider prefixes like ``litellm_proxy/anthropic/`` and
161 # version suffixes like ``-20250101``.
162 tail = model.rsplit("/", 1)[-1].lower()
163 parts = tail.split("-")
164 if parts and parts[-1].isdigit() and len(parts[-1]) >= 6:
165 parts = parts[:-1]
166 return "-".join(parts)
167
168
169def aggregate_ops(results: list[ScenarioResult]) -> AggregateOps:

Calls

no outgoing calls