|
| 1 | +name: Latest AI SDK compatibility |
| 2 | + |
| 3 | +on: |
| 4 | + schedule: |
| 5 | + - cron: "23 5 * * 1" |
| 6 | + workflow_dispatch: |
| 7 | + |
| 8 | +permissions: |
| 9 | + contents: read |
| 10 | + |
| 11 | +concurrency: |
| 12 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 13 | + cancel-in-progress: true |
| 14 | + |
| 15 | +jobs: |
| 16 | + latest-sdk: |
| 17 | + name: ${{ matrix.provider }} newest stable release |
| 18 | + runs-on: ubuntu-latest |
| 19 | + timeout-minutes: 20 |
| 20 | + strategy: |
| 21 | + fail-fast: false |
| 22 | + matrix: |
| 23 | + include: |
| 24 | + - provider: agno |
| 25 | + distribution: agno |
| 26 | + - provider: autogen |
| 27 | + distribution: autogen-agentchat |
| 28 | + - provider: claude-agent-sdk |
| 29 | + distribution: claude-agent-sdk |
| 30 | + - provider: crewai |
| 31 | + distribution: crewai |
| 32 | + - provider: google-adk |
| 33 | + distribution: google-adk |
| 34 | + - provider: haystack |
| 35 | + distribution: haystack-ai |
| 36 | + - provider: langchain |
| 37 | + distribution: langchain |
| 38 | + - provider: langgraph |
| 39 | + distribution: langgraph |
| 40 | + - provider: llamaindex |
| 41 | + distribution: llama-index-core |
| 42 | + - provider: microsoft-agent-framework |
| 43 | + distribution: agent-framework-openai |
| 44 | + - provider: openai-agents |
| 45 | + distribution: openai-agents |
| 46 | + - provider: pydantic-ai |
| 47 | + distribution: pydantic-ai |
| 48 | + - provider: semantic-kernel |
| 49 | + distribution: semantic-kernel |
| 50 | + - provider: smolagents |
| 51 | + distribution: smolagents |
| 52 | + |
| 53 | + steps: |
| 54 | + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v4 |
| 55 | + - uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0 |
| 56 | + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 |
| 57 | + with: |
| 58 | + python-version: "3.13" |
| 59 | + |
| 60 | + - run: uv sync --dev --locked |
| 61 | + - name: Create the isolated SDK environment |
| 62 | + run: uv run tox -r -n -e latest-${{ matrix.provider }} |
| 63 | + - name: Install the newest PyPI release |
| 64 | + env: |
| 65 | + SDK_DISTRIBUTION: ${{ matrix.distribution }} |
| 66 | + TOX_ENVIRONMENT: latest-${{ matrix.provider }} |
| 67 | + run: | |
| 68 | + latest_version="$( |
| 69 | + curl --fail --silent --show-error \ |
| 70 | + "https://pypi.org/pypi/$SDK_DISTRIBUTION/json" \ |
| 71 | + | ".tox/$TOX_ENVIRONMENT/bin/python" -c \ |
| 72 | + 'import json, sys; print(json.load(sys.stdin)["info"]["version"])' |
| 73 | + )" |
| 74 | + uv pip install --upgrade \ |
| 75 | + --python ".tox/$TOX_ENVIRONMENT/bin/python" \ |
| 76 | + "$SDK_DISTRIBUTION==$latest_version" |
| 77 | + installed_version="$( |
| 78 | + ".tox/$TOX_ENVIRONMENT/bin/python" -c \ |
| 79 | + 'import importlib.metadata as m, sys; print(m.version(sys.argv[1]))' \ |
| 80 | + "$SDK_DISTRIBUTION" |
| 81 | + )" |
| 82 | + echo "$SDK_DISTRIBUTION: $installed_version" |
| 83 | + test "$installed_version" = "$latest_version" |
| 84 | + - name: Test the newest stable SDK release |
| 85 | + run: >- |
| 86 | + uv run tox --skip-env-install |
| 87 | + -e latest-${{ matrix.provider }} |
| 88 | + - name: Report resolved package versions |
| 89 | + if: always() |
| 90 | + env: |
| 91 | + TOX_ENVIRONMENT: latest-${{ matrix.provider }} |
| 92 | + run: | |
| 93 | + if test -x ".tox/$TOX_ENVIRONMENT/bin/python"; then |
| 94 | + uv pip freeze --python ".tox/$TOX_ENVIRONMENT/bin/python" |
| 95 | + else |
| 96 | + echo "tox environment was not created" |
| 97 | + fi |
0 commit comments