Skip to content

Conversation

@yesudeep
Copy link
Contributor

@yesudeep yesudeep commented Jan 30, 2026

Summary

Add a new Genkit Python plugin for Microsoft Foundry (formerly Azure AI Foundry) that provides access to 11,000+ AI models.

  • Add genkit-plugin-msfoundry plugin with full feature parity to JS ecosystem
  • Support for chat completions, embeddings, streaming, tools, and multimodal inputs
  • Dynamic model discovery from Azure OpenAI API
  • Azure AD / Managed Identity authentication support
  • Comprehensive sample demonstrating all features

Features

Feature Description
Chat Models GPT-4o, GPT-5, o-series, Claude, DeepSeek, Grok, Llama, Mistral
Embeddings text-embedding-3-small/large, embed-v-4-0 (Cohere)
Streaming Real-time token delivery with usage stats
Tools Function calling with automatic conversion
Multimodal Image inputs with visual_detail_level control
JSON Mode Structured output for supported models
Discovery Dynamic model listing from Azure API
Auth API key and Azure AD / Managed Identity

Naming & Trademark

The plugin uses msfoundry as the name, which:

  • Is not an exact Microsoft trademark match
  • Follows nominative fair use for describing interoperability
  • Includes proper trademark disclaimers in README and docstrings
  • Aligns with industry practice (LangChain, LlamaIndex use similar patterns)

Documentation Links

Test plan

  • All lint checks pass (bin/lint)
  • Type checkers pass (ty, pyrefly, pyright)
  • Manual testing with Azure OpenAI resource
  • Run sample with cd py/samples/msfoundry-hello && ./run.sh
Screenshot 2026-01-30 at 4 43 07 PM

@github-actions github-actions bot added docs Improvements or additions to documentation feature New feature or request python Python config labels Jan 30, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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 significantly enhances Genkit's Python capabilities by adding a robust integration with Microsoft Foundry. It enables Python developers to leverage a vast array of AI models and advanced features like multimodal input and dynamic model discovery, streamlining the development of AI-powered applications within the Genkit framework. The addition also includes a comprehensive sample to guide users and improves the overall project structure by cleaning up old directories.

Highlights

  • New Microsoft Foundry Plugin: Introduced a new Python plugin, genkit-plugin-msfoundry, to integrate Genkit with Microsoft Foundry (formerly Azure AI Foundry), providing access to over 11,000 AI models.
  • Feature Parity: The plugin offers full feature parity with its JavaScript ecosystem counterpart, supporting chat completions, embeddings, streaming, tools, and multimodal inputs.
  • Dynamic Model Discovery & Authentication: Includes dynamic model discovery from the Azure OpenAI API and supports both API key and Azure AD / Managed Identity authentication methods for secure and flexible access.
  • Comprehensive Sample & Documentation: A new sample (msfoundry-hello) demonstrates all key features, complemented by extensive documentation within the plugin's README and docstrings.
  • Workspace Cleanup: Orphaned plugin directories that were causing workspace errors have been removed, improving overall project cleanliness and stability.

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

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 comprehensive new Python plugin for Microsoft Foundry, providing access to a wide range of AI models through Genkit. The implementation is well-structured, featuring support for chat completions, embeddings, streaming, tool usage, and multimodal inputs. The inclusion of a detailed README and a sample application is excellent for user adoption. My review focuses on improving robustness, test coverage, and clarity in documentation and examples. I've identified a few areas for enhancement, such as refining error handling during model discovery, expanding test coverage to include core generation logic, and correcting some examples to ensure they are clear and accurate for developers.

@yesudeep yesudeep force-pushed the yesudeep/feat/abaft-hole branch from 43abbf2 to f6b9e9c Compare January 30, 2026 19:41
@yesudeep yesudeep changed the title feat(py/plugins): add Microsoft Foundry plugin for Azure OpenAI feat(py/plugins): add msfoundry plugin for Azure OpenAI Jan 30, 2026
@yesudeep yesudeep force-pushed the yesudeep/feat/abaft-hole branch from f6b9e9c to aaf4166 Compare January 30, 2026 20:40
@yesudeep yesudeep requested a review from huangjeff5 January 30, 2026 20:41
@yesudeep yesudeep force-pushed the yesudeep/feat/abaft-hole branch 3 times, most recently from 57fe4e5 to e35fc4f Compare January 30, 2026 20:58
@yesudeep
Copy link
Contributor Author

/gemini review

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 comprehensive new Genkit plugin for Microsoft Foundry, providing access to a wide range of AI models on Azure. The implementation is well-structured, includes thorough documentation, tests, and a sample application, demonstrating full feature parity with the JavaScript ecosystem. I've identified a few areas for improvement, including a high-severity issue related to Azure AD token handling that could affect long-running applications, an unsafe type conversion, and some opportunities for code simplification and consistency improvements. Overall, this is an excellent contribution that significantly expands Genkit's capabilities.

@yesudeep yesudeep force-pushed the yesudeep/feat/abaft-hole branch 2 times, most recently from cd4668c to bfab64f Compare January 30, 2026 21:18
@yesudeep
Copy link
Contributor Author

/gemini review

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 Genkit Python plugin for Microsoft Foundry (genkit-plugin-msfoundry), providing access to a wide range of AI models from Azure. The implementation is comprehensive, with support for chat completions, embeddings, streaming, tools, and multimodal inputs. The code is well-structured and includes thorough documentation, tests, and a sample application.

My review found a couple of minor issues: a typo in a model name within the model information file and a mismatched content type in the sample application. These are small fixes in an otherwise excellent contribution.

Add a new Python plugin for Microsoft Foundry (formerly Azure AI Foundry)
that provides access to 11,000+ AI models through the Genkit framework.

The plugin uses "msfoundry" as the name, which is not an exact trademark
match, following nominative fair use for interoperability descriptions.

Plugin features:
- Chat completion models (GPT-4o, GPT-5, o-series, Claude, DeepSeek, Grok, Llama, Mistral)
- Text embedding models (text-embedding-3-small/large, embed-v-4-0)
- Tool/function calling support
- Streaming responses with real-time token delivery
- Multimodal inputs (images with visual_detail_level control)
- JSON output mode for structured responses
- Dynamic model discovery from Azure OpenAI API (discover_models=True)
- Azure AD / Managed Identity authentication support
- API key authentication

Implementation details:
- Uses OpenAI Python SDK with AsyncAzureOpenAI client
- Implements genkit.core.plugin.Plugin interface
- Uses alias_generator=to_camel for Pydantic models (consistent with Genkit core)
- Full type annotations passing ty, pyrefly, and pyright

Files added:
- py/plugins/msfoundry/ - Plugin implementation
- py/samples/msfoundry-hello/ - Sample demonstrating all features

Also removes orphaned plugin directories (checks, chroma, cloud-sql-pg, pinecone)
that only contained __pycache__ files and were causing workspace errors.
@yesudeep yesudeep force-pushed the yesudeep/feat/abaft-hole branch from bfab64f to e3923a1 Compare January 30, 2026 21:30
@yesudeep
Copy link
Contributor Author

/gemini review

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 Genkit Python plugin for Microsoft Foundry, providing access to a wide range of AI models. The implementation is comprehensive, with support for chat completions, embeddings, streaming, tools, and multimodal inputs. It also handles different authentication methods (API key, Azure AD) and endpoint types (Azure OpenAI, Foundry Project) gracefully. The code is well-structured, documented, and includes a full set of tests and a sample application to demonstrate its features. Overall, this is an excellent and feature-rich addition to the Genkit ecosystem. I have one minor suggestion for improving consistency in the model definitions.

@yesudeep yesudeep force-pushed the yesudeep/feat/abaft-hole branch 3 times, most recently from 7535db8 to 61bd71c Compare January 30, 2026 22:47
@yesudeep yesudeep force-pushed the yesudeep/feat/abaft-hole branch 2 times, most recently from 1113d0b to a22dcef Compare January 31, 2026 00:42
@yesudeep
Copy link
Contributor Author

/gemini review

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 is an excellent pull request that introduces a comprehensive and well-designed msfoundry plugin for Genkit. The plugin provides access to a vast catalog of models on Azure AI Foundry with feature parity to the JS ecosystem, including support for chat, embeddings, streaming, tools, and multimodal inputs.

The code quality is high, with thorough documentation, clear structure, and robust implementation details like handling different endpoint types and authentication methods. The addition of model-specific configuration classes is a great feature for user experience in the DevUI. The accompanying sample application is also very well-written and serves as a great guide for users.

I've identified a couple of areas for improvement: one for maintainability in the model config schema selection logic, and another to correct a potentially incorrect constraint in the Llama configuration.

Overall, this is a fantastic contribution that significantly expands Genkit's capabilities.

Replace the CC BY-SA licensed Wikipedia Commons image URL with a
placeholder URL to avoid any licensing concerns.

Users must provide their own image URL to test the multimodal
image description feature.

Affected samples:
- msfoundry-hello
- anthropic-hello
@yesudeep yesudeep force-pushed the yesudeep/feat/abaft-hole branch from a22dcef to a38f761 Compare January 31, 2026 00:49
@yesudeep yesudeep enabled auto-merge (squash) January 31, 2026 00:50
@yesudeep yesudeep merged commit b19ba39 into main Jan 31, 2026
23 checks passed
@yesudeep yesudeep deleted the yesudeep/feat/abaft-hole branch January 31, 2026 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config docs Improvements or additions to documentation feature New feature or request python Python

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants