fix: native tool calls broken over OpenAI Responses API #15253
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Run Type Checks | |
| on: [pull_request] | |
| permissions: | |
| contents: read | |
| jobs: | |
| changes: | |
| name: Detect changes | |
| runs-on: ubuntu-latest | |
| outputs: | |
| code: ${{ steps.filter.outputs.code }} | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| - uses: dorny/paths-filter@d1c1ffe0248fe513906c8e24db8ea791d46f8590 # v3 | |
| id: filter | |
| with: | |
| # Exclusion-only patterns match every non-excluded file under the | |
| # default "some" quantifier. Require all patterns (including "**") | |
| # so docs/markdown/Actions-only PRs correctly set code=false. | |
| predicate-quantifier: every | |
| filters: | | |
| code: | |
| - '**' | |
| - '!docs/**' | |
| - '!**/*.md' | |
| - '!.github/**' | |
| type-checker-matrix: | |
| name: type-checker (${{ matrix.python-version }}) | |
| needs: changes | |
| if: needs.changes.outputs.code == 'true' | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| - name: Restore global uv cache | |
| id: cache-restore | |
| uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | |
| with: | |
| path: | | |
| ~/.cache/uv | |
| ~/.local/share/uv | |
| .venv | |
| key: uv-main-py${{ matrix.python-version }}-${{ hashFiles('uv.lock') }} | |
| restore-keys: | | |
| uv-main-py${{ matrix.python-version }}- | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6 | |
| with: | |
| version: "0.11.3" | |
| python-version: ${{ matrix.python-version }} | |
| enable-cache: false | |
| - name: Install dependencies | |
| run: uv sync --all-groups --all-extras | |
| - name: Run type checks | |
| run: uv run mypy lib/ | |
| - name: Save uv caches | |
| if: steps.cache-restore.outputs.cache-hit != 'true' | |
| uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | |
| with: | |
| path: | | |
| ~/.cache/uv | |
| ~/.local/share/uv | |
| .venv | |
| key: uv-main-py${{ matrix.python-version }}-${{ hashFiles('uv.lock') }} | |
| # Report the required check names when the matrix is skipped. | |
| # Branch protection expects these names; a skipped matrix never reports them. | |
| type-checker-skip: | |
| name: type-checker (${{ matrix.python-version }}) | |
| needs: changes | |
| if: needs.changes.outputs.code != 'true' | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - name: Skip non-code change | |
| run: echo "Non-code change, skipping type checks" | |
| # Summary job to provide single status for branch protection | |
| type-checker: | |
| name: type-checker | |
| runs-on: ubuntu-latest | |
| needs: [changes, type-checker-matrix, type-checker-skip] | |
| if: always() | |
| steps: | |
| - name: Check results | |
| run: | | |
| if [ "${{ needs.changes.outputs.code }}" != "true" ]; then | |
| echo "Non-code change, skipping type checks" | |
| exit 0 | |
| fi | |
| if [ "${{ needs.type-checker-matrix.result }}" == "success" ]; then | |
| echo "All type checks passed" | |
| else | |
| echo "Type checks failed" | |
| exit 1 | |
| fi |