Skip to content

Conversation

@pavelgj
Copy link
Collaborator

@pavelgj pavelgj commented Jan 7, 2026

Checklist (if applicable):

@github-actions github-actions bot added the docs Improvements or additions to documentation label Jan 7, 2026
@pavelgj pavelgj requested a review from apascal07 January 7, 2026 15:48
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @pavelgj, 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 introduces a new documentation file that serves as a comprehensive specification for Genkit Model Actions. It aims to provide plugin developers with a clear reference for implementing models, covering their contract, required data structures, and expected behaviors. The document details how models should handle inputs, outputs, streaming, metadata, tool calls, and provider-specific configurations, ensuring consistency and interoperability across different model implementations within the Genkit framework.

Highlights

  • New Documentation File: A new markdown document, docs/model-spec.md, has been added to provide a comprehensive specification for Genkit Model Actions.
  • Model Action Definition: The document clearly defines Genkit Model Actions, including their action type, input/output/streaming schemas, and detailed metadata requirements such as model capabilities (multiturn, media, tools, systemRole, output formats, context, constrained generation, toolChoice) and development stage.
  • Data Structures: Detailed specifications for key data structures are provided, including GenerateRequest, OutputConfig, GenerateResponse, GenerateResponseChunk, Message, and various Part types (Text, Media, Tool Request, Tool Response, Custom, Reasoning), illustrating how different content types are represented.
  • Behavioral Guidelines: The specification outlines expected behaviors for model actions, covering request processing, system message handling (including extraction for provider-specific needs), configuration handling (emphasizing a 'passthrough' pattern for unknown options and tool merging), and response generation.
  • Tool Handling: Comprehensive guidance on tool handling is included, detailing tool definition conversion, how models should emit ToolRequestParts (including partial streaming requests), how ToolResponseParts are processed, and the multi-turn conversation flow involving tools.

🧠 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.

Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@pavelgj
Copy link
Collaborator Author

pavelgj commented Jan 7, 2026

@cabljac @yesudeep

@pavelgj pavelgj requested review from huangjeff5 and ifielker January 7, 2026 15:49
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 introduces a new specification document for Genkit Model Actions. The document is comprehensive and well-structured, covering the model action definition, data structures, provider-specific features, and expected behaviors. This will be a valuable reference for plugin developers. However, I've found several discrepancies between the data structure definitions in this document and the actual TypeScript implementations. The documentation needs to be updated to accurately reflect which fields are optional and to include recent schema changes (e.g., raw and operation fields). I've also left a minor suggestion to improve the formality of the language in one section.

pavelgj and others added 3 commits January 7, 2026 10:55
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Explicitly mark essential fields as required across various data structures
in the Model Specification to improve clarity and reduce ambiguity.

Changes include:
- Mark `messages` as required in `GenerateRequest`.
- Update `request` in `GenerateResponse` to be required.
- Mark `content` as required in `GenerateResponseChunk`.
- Mark `role` and `content` as required in the `Message` definition.
@pavelgj pavelgj merged commit b9a9663 into main Jan 8, 2026
5 checks passed
@pavelgj pavelgj deleted the pj/model-spec branch January 8, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants