test(mistralai): add xfail for structured output test (#33119)

In rare cases (difficult to reproduce), Mistral's API fails to return
valid bodies, leading to failures from `PydanticToolsParser`
This commit is contained in:
Mason Daugherty
2025-09-25 13:05:31 -04:00
committed by GitHub
parent 12daba63ff
commit 6d418ba983

View File

@@ -1,5 +1,6 @@
"""Standard LangChain interface tests."""
import pytest
from langchain_core.language_models import BaseChatModel
from langchain_tests.integration_tests import ( # type: ignore[import-not-found]
ChatModelIntegrationTests, # type: ignore[import-not-found]
@@ -20,3 +21,7 @@ class TestMistralStandard(ChatModelIntegrationTests):
@property
def supports_json_mode(self) -> bool:
return True
@pytest.mark.xfail(reason=("MistralAI inconsistently fails to return valid fields"))
def test_structured_output_pydantic_2_v1(self, model: BaseChatModel) -> None:
super().test_structured_output_pydantic_2_v1(model)