test(groq): xfail flaky tool choice test (#38365)

Groq's standard integration suite already treats several tool-calling
checks as flaky because provider behavior is inconsistent. The forced
`tool_choice` check now hits the same provider-side `tool_use_failed`
400 on generic prompts, so the Groq-specific suite marks that case as
expected flaky instead of failing scheduled integration runs.

## Changes
- Add a Groq-specific `test_tool_choice` override that retries and
xfails the shared standard test.
- Keep the rest of the Groq tool-calling coverage unchanged, including
the existing xfail/retry behavior for related standard tests.
This commit is contained in:
Mason Daugherty
2026-06-22 12:00:17 -04:00
committed by GitHub
parent 946fbbbead
commit 8e81774870

View File

@@ -39,6 +39,11 @@ class TestGroq(ChatModelIntegrationTests):
def test_tool_calling(self, model: BaseChatModel) -> None:
super().test_tool_calling(model)
@pytest.mark.xfail(reason="Retry flaky tool choice behavior")
@pytest.mark.retry(count=3, delay=1)
def test_tool_choice(self, model: BaseChatModel) -> None:
super().test_tool_choice(model)
@pytest.mark.xfail(reason="Retry flaky tool calling behavior")
@pytest.mark.retry(count=3, delay=1)
async def test_tool_calling_async(self, model: BaseChatModel) -> None: