Skip to content

docs: Resolve API hallucinations and fix various code examples (Bugs 41-60)#254

Merged
chrisraygill merged 14 commits intogenkit-ai:mainfrom
chrisraygill:fix-nohe-bugs-41-60
Mar 26, 2026
Merged

docs: Resolve API hallucinations and fix various code examples (Bugs 41-60)#254
chrisraygill merged 14 commits intogenkit-ai:mainfrom
chrisraygill:fix-nohe-bugs-41-60

Conversation

@chrisraygill
Copy link
Copy Markdown
Collaborator

This PR addresses numerous documentation errors and API hallucinations identified in bugs 41-60.

Key Fixes:

  • Express & Fastify: Fixed verbatimModuleSyntax TS errors (TS1484) with type-only imports and resolved missing optional ? context references.
  • Flask Plugin: Completely rewrote the Python Flask SDK examples. Removed hallucinated wrappers like FlaskPlugin and decorators like @flask_context, replacing them with the authentic genkit_flask_handler interface.
  • Vertex AI Plugin: Removed hallucinated core plugins and evaluation installation commands, properly mapping the Model Garden configurations to the current python module structure.
  • Go SDK Usage: Corrected multiple broken signatures on integrations (Ollama, Chroma, Pinecone) where package-level function calls were mistakenly used instead of valid pointers and method receivers.
  • Component Flow Configs: Validated schema typings and auth flow mappings in multi-step workflows.

All code snippets have been verified against local compilations of the Genkit SDKs.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 significantly enhances the accuracy and reliability of the documentation by addressing numerous identified errors and 'API hallucinations'. The changes ensure that code examples across various frameworks and integrations, including Express, Fastify, Flask, and Vertex AI, are correct and reflect the actual SDK interfaces. This improves the developer experience by providing verified and functional code snippets, reducing confusion and integration issues.

Highlights

  • Express & Fastify Documentation: Fixed verbatimModuleSyntax TypeScript errors (TS1484) related to type-only imports and resolved missing optional ? context references in examples.
  • Flask Plugin Examples: Completely rewrote Python Flask SDK examples, removing hallucinated wrappers like FlaskPlugin and decorators like @flask_context, and replacing them with the authentic genkit_flask_handler interface.
  • Vertex AI Plugin Documentation: Removed hallucinated core plugins and evaluation installation commands, properly mapping Model Garden configurations to the current Python module structure.
  • Go SDK Usage: Corrected multiple broken signatures on integrations (Ollama, Chroma, Pinecone) where package-level function calls were mistakenly used instead of valid pointers and method receivers.
  • Component Flow Configs: Validated schema typings and authentication flow mappings in multi-step workflows.
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.

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.

Copy link
Copy Markdown
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 primarily focuses on updating and standardizing documentation across various Genkit plugins and frameworks. Key changes include correcting API usage (e.g., response.text() in JS), refining plugin configurations and import paths for consistency (e.g., using compat_oai for DeepSeek and xAI, genkit.Retrieve for Go retrievers), and improving framework integration examples (Express.js context providers, Flask ctx handling, FastAPI initialization). Documentation for RAG and vector search integrations was updated, with Python sections for Firestore and Vertex AI Vector Search being removed. Streaming examples were adjusted, and a section on tool confirmation interrupts was removed. Additionally, Google Cloud telemetry configuration in Go was updated, and general documentation clarity was enhanced across several files.

@chrisraygill chrisraygill merged commit ddc68f9 into genkit-ai:main Mar 26, 2026
3 checks passed
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.

4 participants