From d6bb94a1fbe77e1237315ff8f177f482195e2922 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Thu, 3 Sep 2026 00:10:38 -0700 Subject: [PATCH] =?UTF-8?q?fix(meta-ai):=20declare=20supports=5Fvision=5Ft?= =?UTF-8?q?ool=5Fmessages=3DFalse=20=E2=80=94=20Muse=20Spark=20400s=20on?= =?UTF-8?q?=20image=20tool=20results?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Muse Spark accepts images on user turns but returns HTTP 400 invalid_request_error 'messages[N].content did not match any supported type' when the vision_analyze multimodal envelope lands in a role:tool message. With the profile veto now honored by the vision fast-path gates, declaring the limitation routes tool-result images through the aux-LLM text path while user-message vision stays enabled. Fixes #101668 Refs #47742 --- plugins/model-providers/meta-ai/__init__.py | 3 +++ tests/providers/test_meta_ai_profile.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/plugins/model-providers/meta-ai/__init__.py b/plugins/model-providers/meta-ai/__init__.py index d6c3851961..e54b1f4f54 100644 --- a/plugins/model-providers/meta-ai/__init__.py +++ b/plugins/model-providers/meta-ai/__init__.py @@ -121,6 +121,9 @@ meta_ai = MetaAIProfile( api_mode="codex_responses", # Muse Spark is natively multimodal (image/video/pdf/audio in, text out). supports_vision=True, + # ...but only on user turns: an image envelope inside a role:tool message + # 400s "messages[N].content did not match any supported type" (#101668). + supports_vision_tool_messages=False, # Cheap contributor tier is a good default for auxiliary tasks # (compaction, title generation, vision) when this is the main provider. default_aux_model="muse-spark-1.2-contributor", diff --git a/tests/providers/test_meta_ai_profile.py b/tests/providers/test_meta_ai_profile.py index 8fe41cd6e2..5a0ea074ce 100644 --- a/tests/providers/test_meta_ai_profile.py +++ b/tests/providers/test_meta_ai_profile.py @@ -28,6 +28,8 @@ class TestMetaAIProfile: assert p.api_mode == "codex_responses" assert "MODEL_API_KEY" in p.env_vars assert p.supports_vision is True + # Images are accepted on user turns only; tool-result envelopes 400 (#101668). + assert p.supports_vision_tool_messages is False assert p.default_aux_model == "muse-spark-1.2-contributor" assert p.default_max_tokens == 16384 assert p.fallback_models == ("muse-spark-1.2",)