fix(meta-ai): declare supports_vision_tool_messages=False — Muse Spark 400s on image tool results

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
This commit is contained in:
Teknium
2026-09-03 00:10:38 -07:00
parent b462989a68
commit d6bb94a1fb
2 changed files with 5 additions and 0 deletions

View File

@@ -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",

View File

@@ -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",)