-
Notifications
You must be signed in to change notification settings - Fork 1k
Python: Add Google AI package scaffolding #1938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
eavanvalkenburg
merged 6 commits into
microsoft:python-google
from
Jeyaramjj:googlevertext
Nov 7, 2025
Merged
Python: Add Google AI package scaffolding #1938
eavanvalkenburg
merged 6 commits into
microsoft:python-google
from
Jeyaramjj:googlevertext
Nov 7, 2025
Conversation
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
This is the first PR in a series to port Google service connectors from Semantic Kernel to Agent Framework. Changes: - Created agent_framework_google package structure - Added GoogleAISettings class for Gemini API - Added VertexAISettings class for Vertex AI - Comprehensive test coverage (17 test cases) - Documentation with usage examples and roadmap - Updated .gitignore for internal dev docs Following azure-ai connector pattern as reference (with py.typed). Future PRs will add: - PR microsoft#2: GoogleAIChatClient implementation - PR microsoft#3: GoogleAI integration tests & samples - PR microsoft#4: VertexAIChatClient implementation - PR microsoft#5: VertexAI integration tests & samples - PR microsoft#6: Advanced features & polish Dependencies verified against Semantic Kernel: - google-generativeai>=0.8,<1 (SK uses ~=0.8) - google-cloud-aiplatform>=1.60,<2 (SK uses ~=1.114.0)
… and version fields for Google settings
Author
|
@eavanvalkenburg FYI |
…K, add Python 3.14, simplify to Google AI only - Migrate from google-generativeai to google-genai SDK (>=0.2,<1) - Add Python 3.14 classifier support - Simplify to Google AI only (remove VertexAI settings and tests) - Remove google-cloud-aiplatform dependency - Update README to reflect Google AI focus and google-genai SDK - Add comprehensive GAP_ANALYSIS.md with 4-phase implementation plan - Add PR1938_CHECKLIST.md tracking review feedback and next steps - Verify implementation against official Google migration guide - All tests passing (5 tests, 100% coverage) Addresses feedback from @eavanvalkenburg: 1. Added Python 3.14 support 2. Switched to google-genai (GA release, Google-recommended) 3. Removed VertexAI to simplify first iteration
eavanvalkenburg
approved these changes
Nov 7, 2025
Member
eavanvalkenburg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to create a feature branch for this and target that
Member
- Export GoogleAISettings in __init__.py for public API - Update README.md example to use SecretStr for type safety - Comment out future code example to avoid pyright validation errors - Auto-format code with ruff Addresses CI feedback from PR reviewer.
9595272 to
0d7eaa7
Compare
Jeyaramjj
added a commit
to Jeyaramjj/agent-framework
that referenced
this pull request
Dec 12, 2025
* feat(python): Add Google AI/Vertex AI package scaffolding (1/6) This is the first PR in a series to port Google service connectors from Semantic Kernel to Agent Framework. Changes: - Created agent_framework_google package structure - Added GoogleAISettings class for Gemini API - Added VertexAISettings class for Vertex AI - Comprehensive test coverage (17 test cases) - Documentation with usage examples and roadmap - Updated .gitignore for internal dev docs Following azure-ai connector pattern as reference (with py.typed). Future PRs will add: - PR microsoft#2: GoogleAIChatClient implementation - PR microsoft#3: GoogleAI integration tests & samples - PR microsoft#4: VertexAIChatClient implementation - PR microsoft#5: VertexAI integration tests & samples - PR microsoft#6: Advanced features & polish Dependencies verified against Semantic Kernel: - google-generativeai>=0.8,<1 (SK uses ~=0.8) - google-cloud-aiplatform>=1.60,<2 (SK uses ~=1.114.0) * refactor: align with Anthropic pattern - use location, chat_model_id, and version fields for Google settings * Address PR microsoft#1938 review comments: migrate to google-genai SDK, add Python 3.14, simplify to Google AI only - Migrate from google-generativeai to google-genai SDK (>=0.2,<1) - Add Python 3.14 classifier support - Simplify to Google AI only (remove VertexAI settings and tests) - Remove google-cloud-aiplatform dependency - Update README to reflect Google AI focus and google-genai SDK - Add comprehensive GAP_ANALYSIS.md with 4-phase implementation plan - Add PR1938_CHECKLIST.md tracking review feedback and next steps - Verify implementation against official Google migration guide - All tests passing (5 tests, 100% coverage) Addresses feedback from @eavanvalkenburg: 1. Added Python 3.14 support 2. Switched to google-genai (GA release, Google-recommended) 3. Removed VertexAI to simplify first iteration * fix: Address pre-commit hooks failures - Export GoogleAISettings in __init__.py for public API - Update README.md example to use SecretStr for type safety - Comment out future code example to avoid pyright validation errors - Auto-format code with ruff Addresses CI feedback from PR reviewer. --------- Co-authored-by: Jeyaram Jeyaraj <[email protected]>
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.
Description
Why is this change required?
This change adds Google AI (Gemini API) connector support to Agent Framework, enabling developers to use Google's Gemini models alongside existing providers (OpenAI, Azure OpenAI, Anthropic). This is the first PR in a simplified incremental delivery strategy focused on Google AI.
What problem does it solve?
Enables Agent Framework users to leverage Google's Gemini models through the Google AI API with simple API key authentication, expanding the framework's model provider support and providing access to Gemini 2.0's advanced capabilities.
What scenario does it contribute to?
Simplified Delivery Strategy
Based on review feedback, this PR now focuses exclusively on Google AI (Gemini API) support. Vertex AI support is deferred to future work.
Phase 1 (This PR): Package scaffolding - Settings class, package structure, tests
Phase 2 (Future PR):
GoogleAIChatClientimplementation with streaming and function callingPhase 3 (Future PR): Integration tests and usage samples
Phase 4 (Future PR): Advanced features (context caching, safety settings, structured output, thinking mode)
Implementation Details
This PR establishes the foundation for Google AI connector support:
Package Structure:
packages/google/following the Anthropic connector patterngoogle-genaiSDK (>=0.2,<1) as recommended by Google (migration guide)Settings Class:
GoogleAISettings: API key-based authentication withGOOGLE_AI_environment prefixAFBaseSettingswith pydantic validationGOOGLE_AI_API_KEY,GOOGLE_AI_CHAT_MODEL_IDTest Coverage:
Documentation:
py.typedmarker fileDesign Decisions
GoogleAISettingsclass (no Vertex AI in first iteration per review feedback)google-genai(GA release) instead of legacygoogle-generativeaiChanges Addressing Review Feedback
✅ Added Python 3.14 support (classifier in pyproject.toml)
✅ Migrated to
google-genai>=0.2,<1(GA release, Google-recommended)✅ Simplified to Google AI only (removed VertexAI settings to reduce complexity)
✅ Updated package description to "Google AI (Gemini API) integration"
Future PRs Will Add
GoogleAIChatClientclass implementingBaseChatClientContribution Checklist
✅ The code builds clean without any errors or warnings
✅ The PR follows the Contribution Guidelines
✅ All unit tests pass, and I have added new tests where possible (5 new tests, 100% pass rate)
✅ Is this a breaking change? No
Note
This PR intentionally does NOT include the chat client implementation - that will come in a future PR. This allows for early feedback on the package structure, SDK choice, and settings design before implementing the full client.