diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d9110d7c9..cd9b668dd6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -97,6 +97,7 @@ jobs: --extra vertexai --extra groq --extra anthropic + --extra mistral pytest tests/test_live.py -v --durations=100 env: @@ -106,6 +107,7 @@ jobs: GOOGLE_SERVICE_ACCOUNT_CONTENT: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_CONTENT }} GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }} ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} + MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }} test: name: test on ${{ matrix.python-version }} diff --git a/tests/test_live.py b/tests/test_live.py index 7063f6d870..e1d45ebfef 100644 --- a/tests/test_live.py +++ b/tests/test_live.py @@ -60,6 +60,12 @@ def ollama(http_client: httpx.AsyncClient, _tmp_path: Path) -> Model: return OllamaModel('qwen2:0.5b', http_client=http_client) +def mistral(http_client: httpx.AsyncClient, _tmp_path: Path) -> Model: + from pydantic_ai.models.mistral import MistralModel + + return MistralModel('mistral-small-latest', http_client=http_client) + + params = [ pytest.param(openai, id='openai'), pytest.param(gemini, id='gemini'), @@ -67,6 +73,7 @@ def ollama(http_client: httpx.AsyncClient, _tmp_path: Path) -> Model: pytest.param(groq, id='groq'), pytest.param(anthropic, id='anthropic'), pytest.param(ollama, id='ollama'), + pytest.param(mistral, id='mistral'), ] GetModel = Callable[[httpx.AsyncClient, Path], Model]