Skip to content

feat: migrate from google-generativeai to google-genai SDK#97

Merged
rosspeili merged 1 commit into
ARPAHLS:mainfrom
rosspeili:feat/issue-80-google-genai
May 23, 2026
Merged

feat: migrate from google-generativeai to google-genai SDK#97
rosspeili merged 1 commit into
ARPAHLS:mainfrom
rosspeili:feat/issue-80-google-genai

Conversation

@rosspeili
Copy link
Copy Markdown
Contributor

Replace deprecated google-generativeai usage with the supported google-genai SDK across optional dependencies, skill runtime code, reference examples, and usage docs. Add PyPI-to-import aliases in SkillLoader so manifest requirements such as google-genai resolve correctly at load time.

Fixes #80

Description

Migrates Skillware off the deprecated Gemini SDK:

  • pyproject.toml: [gemini] and [all] extras now install google-genai
  • skillware/core/loader.py: map PyPI package names to import paths (google-genaigoogle.genai, etc.)
  • Skills: update Gemini calls in tos_evaluator, mica_module, and synthetic_generator
  • Examples: migrate gemini_*.py and mica_rag_flow.py to google.genai.Client() + GenerateContentConfig patterns
  • Docs: install note in docs/usage/gemini.md, usage README and agent_loops.md alignment
  • Tests: update test_tos_evaluator mocks for the new client API

Verified locally with Python 3.13: pytest tests/ (50 passed), flake8 on changed files.

Also addresses the remaining scope of #96 (examples + complementary usage docs). Recommend closing #96 after merge.

Type of Change (Matches Issue Templates)

  • Skill Proposal: New Skill (Contains manifest.yaml, skill.py, and instructions.md)
  • Bug Report Fix: Non-breaking change which fixes an execution error or framework bug
  • Doc Fix: Documentation Update
  • Framework Feature / RFC Updates: Core Framework Update (Changes to base_skill.py, loader.py, etc.)

Checklist (all PRs)

  • My code follows the Agent Code of Conduct.
  • I have run python -m flake8 . and pytest 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-genai or GOOGLE_API_KEY is unavailable.

Related Issues

Fixes #80
Also completes the remaining scope of #96

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
@rosspeili rosspeili merged commit 7ddedb2 into ARPAHLS:main May 23, 2026
5 checks passed
@rosspeili rosspeili deleted the feat/issue-80-google-genai branch May 23, 2026 17:27
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.

[Feat]: Migrate from google-generativeai to google-genai SDK

1 participant