MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / _normalize

Function _normalize

uncommon_route/model_map.py:290–296  ·  view source on GitHub ↗

Normalize a model name for comparison.

(name: str)

Source from the content-addressed store, hash-verified

288# ---------------------------------------------------------------------------
289
290def _normalize(name: str) -> str:
291 """Normalize a model name for comparison."""
292 name = name.lower()
293 name = re.sub(r"-\d{8}$", "", name)
294 name = name.removesuffix("-preview")
295 name = re.sub(r"(\d)\.(\d)", r"\1-\2", name)
296 return name
297
298
299def _core(model_id: str) -> str:

Callers 1

_fuzzy_matchMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected