feat: migrate from google-generativeai to google-genai SDK#97
Merged
Conversation
Replace deprecated SDK usage across optional deps, skill runtime code, reference examples, and usage docs. Map PyPI package names to import paths in SkillLoader so manifest requirements like google-genai resolve correctly. Fixes ARPAHLS#80
This was referenced May 24, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace deprecated
google-generativeaiusage with the supportedgoogle-genaiSDK across optional dependencies, skill runtime code, reference examples, and usage docs. Add PyPI-to-import aliases inSkillLoaderso manifest requirements such asgoogle-genairesolve correctly at load time.Fixes #80
Description
Migrates Skillware off the deprecated Gemini SDK:
pyproject.toml:[gemini]and[all]extras now installgoogle-genaiskillware/core/loader.py: map PyPI package names to import paths (google-genai→google.genai, etc.)tos_evaluator,mica_module, andsynthetic_generatorgemini_*.pyandmica_rag_flow.pytogoogle.genai.Client()+GenerateContentConfigpatternsdocs/usage/gemini.md, usage README andagent_loops.mdalignmenttest_tos_evaluatormocks for the new client APIVerified locally with Python 3.13:
pytest tests/(50 passed),flake8on changed files.Also addresses the remaining scope of #96 (examples + complementary usage docs). Recommend closing #96 after merge.
Type of Change (Matches Issue Templates)
manifest.yaml,skill.py, andinstructions.md)base_skill.py,loader.py, etc.)Checklist (all PRs)
python -m flake8 .andpytest tests/locally (or the subset relevant to this change).New or updated skill
Skipped — no new registry skill. Existing skills were updated as part of the SDK migration only.
Constitution & Safety
No change to skill constitutions. Migration preserves existing behavior: optional Gemini calls remain behind env keys and graceful skip paths when
google-genaiorGOOGLE_API_KEYis unavailable.Related Issues
Fixes #80
Also completes the remaining scope of #96