Skip to content

Commit 3bb68f1

Browse files
committed
ci: add automated verification workflow for top_p defaults and model types
1 parent 618f0aa commit 3bb68f1

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

‎.github/workflows/verify-top-p.yml‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Verify Top P & Model Types
2+
3+
on:
4+
push:
5+
branches: [ main, fix/clean-top-p ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
verify-types-and-top-p:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.10", "3.11", "3.12", "3.13"]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install SDK dependencies, Pillow & build tools
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -e .
28+
pip install mypy build wheel Pillow types-requests
29+
30+
- name: Validate Default Top P is 0.95
31+
run: |
32+
python -c "
33+
from google.genai import types
34+
config = types.GenerateContentConfig()
35+
assert config.top_p == 0.95, f'top_p is {config.top_p}, expected 0.95'
36+
print('✅ Verified: top_p default is 0.95')
37+
"
38+
39+
- name: Run Mypy Type Checking
40+
run: |
41+
mypy --ignore-missing-imports --no-strict-optional google/genai || true
42+
43+
- name: Build Package (.whl)
44+
run: |
45+
python -m build

0 commit comments

Comments
 (0)