Skip to content

Fix Python SDK config compatibility - #9

Merged
ryanbaumann merged 1 commit into
mainfrom
agent/python-sdk-compat
Jul 15, 2026
Merged

Fix Python SDK config compatibility#9
ryanbaumann merged 1 commit into
mainfrom
agent/python-sdk-compat

Conversation

@ryanbaumann

Copy link
Copy Markdown
Owner

Summary

Fix the portable infographic skill on Python 3.9, where the latest compatible google-genai release (1.47.0) does not expose the newer typed image_size or thinking_level fields.

Changes

  • Feature-detect SDK configuration fields before constructing typed image and thinking configs.
  • Preserve explicit resolution and HIGH thinking on newer SDKs.
  • Fall back to native image resolution and dynamic thinking on google-genai 1.47.0 instead of failing validation before the API request.
  • Align the supported boundary and installer on Python 3.9+ and google-genai>=1.47.0.
  • Add regression tests for the 1.47 and current typed-config surfaces.
  • Run the Python regression in normal CI and the npm publish sanity check.
  • Prepare patch release infographic-agent@3.2.1.

Root cause

The Gemini API supports the requested image size and high thinking settings, but older Python SDK type models reject those fields during local validation. Python 3.9 currently resolves to google-genai 1.47.0, so generation and refinement failed before reaching Gemini.

Verification

  • npm run lint — passed
  • npm test — 68 passed, 9 skipped
  • python3 -m unittest skill/infographic-agent/test_portable_infographic.py — 2 passed
  • npm run build — passed
  • Publish sanity: Node syntax, Python compile/tests, and npm pack --dry-run — passed
  • Independent review — clean after two compatibility-boundary corrections

Release note

Merging this PR triggers the repository's publish workflow. Because 3.2.1 is not currently on npm, the workflow will publish and tag infographic-agent@3.2.1 automatically.

@ryanbaumann
ryanbaumann marked this pull request as ready for review July 15, 2026 20:23
@ryanbaumann
ryanbaumann merged commit ea51aa8 into main Jul 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant