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

Function is_routable_chat_model

uncommon_route/model_map.py:211–218  ·  view source on GitHub ↗

Return False for modality-specific generation models in /v1/models. Gateways often list image, video, audio, and embedding models beside chat models. The chat router should not select those for text/tool requests.

(model_id: str)

Source from the content-addressed store, hash-verified

209
210
211def is_routable_chat_model(model_id: str) -> bool:
212 """Return False for modality-specific generation models in /v1/models.
213
214 Gateways often list image, video, audio, and embedding models beside chat
215 models. The chat router should not select those for text/tool requests.
216 """
217 core = _core(str(model_id or "").lower())
218 return not any(marker in core for marker in _NON_CHAT_MODEL_MARKERS)
219
220
221def _superseded_routing_models(model_ids: set[str]) -> set[str]:

Calls 1

_coreFunction · 0.85