diff --git a/.github/workflows/core-llm-test.yml b/.github/workflows/core-llm-test.yml index da6dd5b096..7c690ae4a8 100644 --- a/.github/workflows/core-llm-test.yml +++ b/.github/workflows/core-llm-test.yml @@ -20,7 +20,7 @@ jobs: test: strategy: matrix: - llm: ["openai", "gemini", "anthropic"] + llm: ["openai", "gemini", "anthropic", "deepseek"] python-version: ["3.9"] os: [ubuntu-latest] fail-fast: false @@ -46,13 +46,13 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Install packages and dependencies - if: matrix.llm == 'openai' + if: matrix.llm == 'openai' || matrix.llm == 'deepseek' run: | docker --version uv pip install --system -e ".[test,redis,interop]" python -c "import autogen" - name: Install packages for ${{ matrix.llm }} - if: matrix.llm != 'openai' + if: matrix.llm != 'openai' && matrix.llm != 'deepseek' run: | docker --version uv pip install --system -e ".[test,redis,interop,${{ matrix.llm }}]" @@ -62,6 +62,7 @@ jobs: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} + DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }} AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }} AZURE_OPENAI_API_BASE: ${{ secrets.AZURE_OPENAI_API_BASE }} OAI_CONFIG_LIST: ${{ secrets.OAI_CONFIG_LIST }} diff --git a/pyproject.toml b/pyproject.toml index 3684cafa09..53dea14152 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -256,6 +256,7 @@ markers = [ "openai", "gemini", "anthropic", + "deepseek", "redis", "docker", ] diff --git a/scripts/test-core-llm.sh b/scripts/test-core-llm.sh index 9d4e9f7af1..3b4f551109 100755 --- a/scripts/test-core-llm.sh +++ b/scripts/test-core-llm.sh @@ -5,7 +5,7 @@ # SPDX-License-Identifier: Apache-2.0 # Default mark if none is provided -DEFAULT_MARK="openai or gemini or anthropic" +DEFAULT_MARK="openai or gemini or anthropic or deepseek" # Initialize MARK as the default value MARK="$DEFAULT_MARK" diff --git a/scripts/test-skip-llm.sh b/scripts/test-skip-llm.sh index acbe5bf410..0747154abb 100755 --- a/scripts/test-skip-llm.sh +++ b/scripts/test-skip-llm.sh @@ -4,7 +4,7 @@ # # SPDX-License-Identifier: Apache-2.0 -base_filter="not (openai or gemini or anthropic)" +base_filter="not (openai or gemini or anthropic or deepseek)" args=() while [[ $# -gt 0 ]]; do if [[ "$1" == "-m" ]]; then diff --git a/test/conftest.py b/test/conftest.py index 52bf8e7191..2b946d2605 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -295,6 +295,16 @@ def credentials_anthropic_claude_sonnet() -> Credentials: ) +@pytest.fixture +def credentials_deepseek_reasoner() -> Credentials: + return get_llm_credentials( + "DEEPSEEK_API_KEY", + model="deepseek-reasoner", + api_type="deepseek", + filter_dict={"tags": ["deepseek-reasoner"]}, + ) + + def get_mock_credentials(model: str, temperature: float = 0.6) -> Credentials: llm_config = { "config_list": [ diff --git a/test/test_conftest.py b/test/test_conftest.py index 28da381d12..0700d33da2 100644 --- a/test/test_conftest.py +++ b/test/test_conftest.py @@ -32,3 +32,9 @@ def test_credentials_from_test_param_fixture( assert first_config["api_type"] == "anthropic" else: assert False, f"Unknown LLM fixture: {current_llm}" + + +@pytest.mark.deepseek +def test_credentials_deepseek_reasoner_api_key_is_set(credentials_deepseek_reasoner: Credentials) -> None: + assert len(credentials_deepseek_reasoner.config_list) > 0 + assert credentials_deepseek_reasoner.config_list[0]["api_key"] is not None