fix image support catalog fallback

This commit is contained in:
octo-patch 2026-11-05 16:47:03 +08:00
parent 5a2ae1b279
commit 260e551ea9

View file

@ -1004,7 +1004,7 @@ def model_supports_reasoning(model_name: str) -> bool:
def model_supports_images(model_name: str) -> bool:
"""Return whether the model accepts image input. Assume yes until proven otherwise."""
entry = _catalog_entry(model_name)
return entry is None or "supports_vision" not in entry or bool(entry.get("supports_vision"))
return entry is None or bool(entry.get("supports_vision"))
def _bare_openai_name(model_name: str) -> str: