fix(validation): respect settings-bound provider and correct multimodal heuristic
This commit is contained in:
@@ -74,7 +74,7 @@ def test_render_prompt_replaces_known_placeholders():
|
||||
def test_is_multimodal_model_detects_known_vision_models():
|
||||
assert is_multimodal_model("gpt-4o") is True
|
||||
assert is_multimodal_model("claude-3-5-sonnet") is True
|
||||
assert is_multimodal_model("stepfun/step-3.5-flash:free", "openrouter") is True
|
||||
assert is_multimodal_model("stepfun/step-3.5-flash:free", "openrouter") is False
|
||||
assert is_multimodal_model("text-only-model") is False
|
||||
# [/DEF:test_is_multimodal_model_detects_known_vision_models:Function]
|
||||
|
||||
|
||||
@@ -161,13 +161,9 @@ def is_multimodal_model(model_name: str, provider_type: Optional[str] = None) ->
|
||||
"internvl",
|
||||
"qwen-vl",
|
||||
"qwen2-vl",
|
||||
"stepfun/step-3.5",
|
||||
)
|
||||
if any(marker in token for marker in multimodal_markers):
|
||||
return True
|
||||
# OpenRouter model ids are heterogeneous; keep permissive path for known StepFun family.
|
||||
if provider == "openrouter" and token.startswith("stepfun/step-3.5"):
|
||||
return True
|
||||
return False
|
||||
# [/DEF:is_multimodal_model:Function]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user