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)
| 209 | |
| 210 | |
| 211 | def 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 | |
| 221 | def _superseded_routing_models(model_ids: set[str]) -> set[str]: |