-
Notifications
You must be signed in to change notification settings - Fork 657
chore(py): bump version to 0.5.0 #4417
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
Conversation
Summary of ChangesHello @yesudeep, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request marks the release of version 0.5.0, bringing a substantial update to the project. It integrates a multitude of new model and telemetry plugins, introduces significant core framework features like session management and a direct action protocol, and vastly improves the developer experience with better tooling, type safety, and Python 3.14 support. The update also includes critical bug fixes and security enhancements, making it a comprehensive and impactful release. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request correctly bumps the version of all Python packages to 0.5.0 and updates the CHANGELOG.md with a comprehensive list of changes for this new release. The version updates are consistent across all pyproject.toml files. I have one minor suggestion to improve the markdown formatting in the changelog. Otherwise, the changes are correct and ready for the release.
9baca94 to
3c6ed12
Compare
…elease This release includes 178 commits over 8 months since v0.4.0 (May 2025): New Model Providers: - Anthropic, AWS Bedrock, Azure OpenAI (msfoundry), Cloudflare Workers AI - DeepSeek, xAI, Mistral AI, Hugging Face New Telemetry: - AWS X-Ray with SigV4, AIM/Firebase, GCP parity Core Features: - Dynamic Action Provider (DAP) for runtime action creation - Session management with ai.chat() API - Rerankers for RAG pipelines - Background models and dynamic discovery - Full MCP integration Breaking Changes: - PluginV2 refactor (migration required for plugin authors) - Async-first architecture (sync base removed) Developer Experience: - Python 3.14 support - Triple type checker enforcement (ty, pyrefly, pyright) - Security scanning with PySentry - Hot reloading for samples
…actoring) - Added Dotprompt integration section with features from google/dotprompt: - Dotpromptz 0.1.5 with type-safe schema fields - Directory/file prompt loading matching JS SDK - Handlebars partials with define_partial - render_system_prompt and render_user_prompt methods - Callable support for prompts - Security: cycle detection, path traversal hardening (CWE-22) - Helper parity across all runtimes - Removed session/chat references (undergoing refactor) - Updated Impact Summary to highlight Dotprompt integration
Performance improvements: - Per-event-loop HTTP client caching (thread safety) - Dotprompt release pipeline: 30 min → 2 min (15x faster) - ty type checker integration for faster checks Critical fixes highlighted: - Race condition in dev server startup - Thread safety with per-event-loop HTTP client caching - Infinite recursion prevention via cycle detection in partials - Structured output generation for DeepSeek - JSON Schema None type handling Security: - Path traversal hardening (CWE-22) - SigV4 signing for AWS X-Ray - Ruff security audit Developer experience: - Added link to Watchdog repository - Python 3.14 PyO3/maturin ABI compatibility details
…tion Genkit Python SDK Contributors (16 developers): - Yesudeep Mangalapilly: Core framework, type safety, AWS/Azure/CF plugins - Elisa Shen: Resource support, samples, model config - Niraj Nepal: Anthropic, DeepSeek, xAI plugins, AIM telemetry - Abraham J. Lázaro: Model Garden, Ollama, Gemini schema - huangjeff5: PluginV2 refactor, type safety, Pydantic output - Hendrik Martina: Evaluator metrics, OpenAI compat, Dotprompt render - Pavel Jbanov: Reflection API, embedders, background actions - And 9 more contributors google/dotprompt Contributors: - Zereker: Go closure fix - MengqinShen: CI/CD pipeline improvements
Contributors now have clickable GitHub profile links. Key contributions are exhaustive with detailed summaries. Separate dotprompt contributor table added. GEMINI.md updated with learnings about release PR drafting.
- Added specific PR numbers for each key contribution - Categorized contributions by type (Core, Plugins, Type Safety, etc.) - Made dotprompt table match genkit format with PRs and Commits columns - Added polyglot implementations note for dotprompt work
- Matching table formats for external contributors - --no-verify workflow for fast iteration - gh pr edit command for updating PR descriptions
- 16-step checklist for drafting release PRs - Key principles for exhaustive contributor tables - Commands for gathering statistics from both repos - Best practices for GitHub links, PR numbers, categorization
Firebase blog style article highlighting: - 7 new model provider plugins - 3 new telemetry plugins - Async-first architecture - Dynamic Action Provider (DAP) - Enhanced Dotprompt integration - Comprehensive type safety - Critical fixes and security - Developer experience improvements - Contributors acknowledgment
- response.text (property) not response.text() (method) - output=Output(schema=...) instead of output_schema - ai.dynamic_tool() instead of action_provider - ai.define_partial() correct usage - ai.run_main() for proper lifecycle management - Module-level Genkit initialization (best practice)
- Every release MUST include blog article in py/engdoc/ - Added Blog Article Guidelines with required sections - Added Code Example Accuracy Checklist (response.text, Output, etc.) - Added commands to verify examples against actual samples - Updated release checklist to 18 steps
- Removed Firebase blog links from blog article tags - Added branding note: use 'Genkit' not 'Firebase Genkit' (rebranded 2025) - Updated Blog Article Guidelines with branding clarification
DAP and MCP are still in development, so using shipped features only
- Replaced DAP with standard tool calling feature - Removed MCP resource management reference - Updated contributor tables consistently
- Removed non-existent genkit-plugin-aim references - Replaced with actual plugins: genkit-plugin-observability, genkit-plugin-firebase - Added plugin name verification check to GEMINI.md - Document common mistakes to avoid
- Added commands to extract and validate code snippets from blog articles - Added Blog Article Code Review Checklist with 8 verification items - Commands to check for common syntax errors (response.text(), output_schema, etc.) - Verify import statements match actual module structure - Check decorator patterns exist in codebase
|
/gemini review |
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.
Code Review
This pull request bumps the Python SDK version to 0.5.0 and includes extensive updates to the release documentation, such as the CHANGELOG, a new PR description template, a blog post, and detailed internal guidelines for creating releases. The changes are well-structured and comprehensive. I've found a couple of minor inconsistencies in the new documentation regarding contributor credits and plugin names, which I've highlighted in the comments. Overall, this is a great step towards a more robust release process.
- Created bin/validate_release_docs script with 9 automated checks - Checks: branding, plugin names, unshipped features, code syntax, plugin existence, contributor links, blog article, imports, sections - Fixed genkit-plugin-firestore -> genkit-plugin-firebase - Added step 16 to release checklist: run validation script
AIM plugin does not exist. Removed 'AIM for Firebase observability' from zarinn3pal's contributions in CHANGELOG and blog article.
Niraj implemented GCP telemetry for Firebase observability. The correct plugin name is genkit-plugin-google-cloud, not aim.
CRITICAL: The publish workflow was missing 13 plugins that couldn't be published!
Added:
- Model providers: anthropic, aws-bedrock, cf-ai, deepseek, huggingface, mistral, msfoundry, xai
- Telemetry: aws, azure, cf, observability
- Other: evaluators, mcp
Also fixed project_type default ('package' -> 'packages') to match options.
- Added publish_scope input: 'all' or 'single' - When 'all': uses dynamic matrix to build/publish all 23 packages in parallel - When 'single': publishes just the selected package (existing behavior) - Each package now has its own artifact (dist-<name>) for parallel publishing - Fixes artifact naming collision when building multiple packages
- Created py/engdoc/release-publishing-guide.md with full step-by-step guide - Added Release Publishing Process section to GEMINI.md - Documents tag creation, GitHub release, and PyPI publishing - Includes v0.5.0 release summary with package counts - Lists all 23 packages (9 existing, 14 new)
Usage: ./bin/create_release 0.5.0 The script: 1. Verifies package versions match 2. Ensures on main branch with no uncommitted changes 3. Creates annotated git tag (py/v<VERSION>) 4. Pushes tag to origin 5. Creates GitHub release using PR description file
The script now: - Takes optional PR number: ./bin/create_release 0.5.0 4417 - Auto-finds merged PR if not specified - Fetches PR body directly from GitHub using gh CLI - No longer requires local .github/PR_DESCRIPTION_X.Y.Z.md file
- Created bin/check_versions script to verify all packages have same version - Updated bin/bump_version to also update samples - Added shellcheck to bin/lint (checks both bin/ and py/bin/) - Added shellcheck to py/bin/release_check - Fixed all shellcheck warnings in py/bin/ scripts - Updated GEMINI.md with version consistency and shell linting docs Scripts now dynamically discover all plugins and samples.
|
/gemini review |
- Moved shebang to line 1 (was after license header) - Quoted variable to prevent globbing
- Fixed py/bin/validate_release_docs: #!/bin/bash -> #!/usr/bin/env bash - Added 'set -euo pipefail' to validate_release_docs - Added Shell Script Standards section to GEMINI.md - Documented shebang and strict mode requirements - Exception noted for bin/install_cli (user-facing install script)
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.
Code Review
This pull request bumps the version to 0.5.0 and introduces a significant amount of release automation and documentation. The new scripts for checking versions, validating release docs, and creating releases are great additions that will improve the development workflow. The updates to the linting process to include shell script checks are also a welcome improvement for code quality. I have one suggestion to improve the consistency of the shell script checks.
Added two new jobs to publish_python.yml: 1. verify_publish: - Waits 60s for PyPI CDN propagation - Installs each package from PyPI with exact version - Verifies installed version matches expected - Runs smoke test imports 2. publish_summary: - Creates GitHub Actions summary with overall status - Shows publish and verification results - Provides next steps with PyPI links This ensures packages are actually installable after release.
Instead of hardcoding all 22 plugins in the workflow, now we: - Scan py/plugins/ directory at runtime - Add each plugin with pyproject.toml to the matrix - Log discovered plugins for debugging Benefits: - New plugins are automatically included in releases - No workflow changes needed when adding plugins - Reduces maintenance burden
mkdocs.yml: - Added all 22 plugins to mkdocstrings paths for complete API docs - Organized by category (model providers, telemetry, framework, etc.) ROADMAP.org: - Updated release management section (all items now complete) - Added new API Documentation section with future work: - [ ] Docs publish workflow (GitHub Pages) - [ ] Version selector for multiple SDK versions - [ ] API reference pages for each plugin
- GenerateResponseWrapper -> genkit.blocks.model - MessageWrapper -> genkit.blocks.model - Core types -> genkit.core.typing MkDocs now builds successfully.
- docs/index.md: Added all genkit.ai exports (18 items total) - Core classes: Genkit, GenkitRegistry, Plugin - Actions: ActionKind, ActionRunContext, FlowWrapper - Prompts: ExecutablePrompt, PromptGenerateOptions, etc. - Tools: ToolRunContext, tool_response - Response: GenerateResponseWrapper, GenerateStreamResponse - docs/types.md: Added all genkit.types exports (40+ items) - Errors: GenkitError, ToolInterruptError - Parts: TextPart, MediaPart, CustomPart, DataPart, etc. - Generation: GenerateRequest/Response, config types - Embedding: EmbedRequest/Response - Evaluation: EvalRequest/Response, Score - Model info: ModelInfo, Supports, Constrained - release_check: Check both py/bin/ and root bin/ for shellcheck (fixes review feedback for consistency with bin/lint) MkDocs builds successfully in 3.01 seconds.
Release: Genkit Python SDK v0.5.0
Overview
This is a major release of the Genkit Python SDK with 178 commits and 680 files changed over 8 months since v0.4.0 (May 2025). This release represents the most significant update to the Python SDK to date, adding extensive new model providers, telemetry integrations, core framework features, and substantial improvements to type safety and developer experience.
Impact Summary
What's New
New Model Provider Plugins (7)
genkit-plugin-anthropicgenkit-plugin-aws-bedrockgenkit-plugin-msfoundrygenkit-plugin-cf-aigenkit-plugin-deepseekgenkit-plugin-xaigenkit-plugin-mistralgenkit-plugin-huggingfaceNew Telemetry Plugins (3)
genkit-plugin-awsgenkit-plugin-observabilitygenkit-plugin-google-cloudCore Framework Features
@ai.tool()decorator for AI agentsDotprompt Integration (via google/dotprompt)
define_partialfor template reuserender_system_promptandrender_user_promptBreaking Changes
1. PluginV2 Refactor (#4132)
Impact: Plugin authors need to update their plugins.
Before:
After:
2. Async-First Architecture (#4244)
Impact: Sync base classes removed. All operations are now async.
Before:
After:
3. Embed API Refactor (#4269)
Impact:
embed/embed_manyAPI updated for JS parity.Before:
# Old API signatureAfter:
# New API matches JS SDK patternsType Safety Improvements
This release integrates three type checkers for comprehensive coverage:
All packages now pass all three type checkers with zero errors.
Security Enhancements
Critical Fixes
Performance
Developer Experience
bin/release_check,bin/bump_versionscriptsbin/check_consistencyvalidates all packagesMigration Guide
For Application Developers
For Plugin Developers
bin/lintto verify type safetyTesting
All 22 plugins and 40+ samples have been tested. CI runs on Python 3.10, 3.11, 3.12, 3.13, and 3.14.
Contributors
This release includes contributions from 13 developers across 188 PRs. Thank you to everyone who contributed!
google/dotprompt Contributors (Dotprompt Python integration):
Full Changelog
See CHANGELOG.md for the complete list of changes.