diff --git a/libs/ibm/tests/integration_tests/test_chat_models_standard.py b/libs/ibm/tests/integration_tests/test_chat_models_standard.py index 4549c1e..3847728 100644 --- a/libs/ibm/tests/integration_tests/test_chat_models_standard.py +++ b/libs/ibm/tests/integration_tests/test_chat_models_standard.py @@ -13,6 +13,7 @@ URL = "https://us-south.ml.cloud.ibm.com" MODEL_ID = "mistralai/mistral-large" +MODEL_ID_IMAGE = "meta-llama/llama-3-2-11b-vision-instruct" class TestChatWatsonxStandard(ChatModelIntegrationTests): @@ -20,6 +21,18 @@ class TestChatWatsonxStandard(ChatModelIntegrationTests): def chat_model_class(self) -> Type[BaseChatModel]: return ChatWatsonx + @property + def supports_image_inputs(self) -> bool: + return True + + @property + def returns_usage_metadata(self) -> bool: + return True + + @property + def has_tool_calling(self) -> bool: + return True + @property def supported_usage_metadata_details( self, @@ -49,6 +62,12 @@ def chat_model_params(self) -> dict: "project_id": WX_PROJECT_ID, } + @pytest.mark.xfail(reason="Supported for vision model.") + def test_image_inputs(self, model: BaseChatModel) -> None: + model.watsonx_model._inference.model_id = MODEL_ID_IMAGE # type: ignore[attr-defined] + super().test_image_inputs(model) + model.watsonx_model._inference.model_id = MODEL_ID # type: ignore[attr-defined] + @pytest.mark.xfail(reason="Not implemented tool_choice as `any`.") def test_structured_few_shot_examples(self, model: BaseChatModel) -> None: super().test_structured_few_shot_examples(model)