Skip to content

Commit 6d418ba

Browse files
authored
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`
1 parent 12daba6 commit 6d418ba

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libs/partners/mistralai/tests/integration_tests/test_standard.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""Standard LangChain interface tests."""
22

3+
import pytest
34
from langchain_core.language_models import BaseChatModel
45
from langchain_tests.integration_tests import ( # type: ignore[import-not-found]
56
ChatModelIntegrationTests, # type: ignore[import-not-found]
@@ -20,3 +21,7 @@ def chat_model_params(self) -> dict:
2021
@property
2122
def supports_json_mode(self) -> bool:
2223
return True
24+
25+
@pytest.mark.xfail(reason=("MistralAI inconsistently fails to return valid fields"))
26+
def test_structured_output_pydantic_2_v1(self, model: BaseChatModel) -> None:
27+
super().test_structured_output_pydantic_2_v1(model)

0 commit comments

Comments
 (0)