Class AzureFoundryPlugin

java.lang.Object
com.google.genkit.plugins.azurefoundry.AzureFoundryPlugin
All Implemented Interfaces:
Plugin

public class AzureFoundryPlugin extends Object implements Plugin
AzureFoundryPlugin provides Azure AI Foundry model integrations for Genkit. This plugin uses Azure's OpenAI-compatible inference endpoints to support various models deployed in Azure AI Foundry, including GPT-4, GPT-3.5, Llama, Mistral, and more.
  • Field Details

    • SUPPORTED_MODELS

      public static final List<String> SUPPORTED_MODELS
      Azure AI Foundry supported models. Model availability varies by region and Azure subscription. See: https://learn.microsoft.com/en-us/azure/ai-foundry/agents/concepts/model-region-support
  • Constructor Details

    • AzureFoundryPlugin

      public AzureFoundryPlugin(AzureFoundryPluginOptions options)
      Creates an AzureFoundryPlugin with the specified options.
      Parameters:
      options - the plugin options
  • Method Details

    • create

      public static AzureFoundryPlugin create(String endpoint, String apiKey)
      Creates an AzureFoundryPlugin with the specified endpoint and API key.
      Parameters:
      endpoint - the Azure AI Foundry endpoint
      apiKey - the API key
      Returns:
      a new AzureFoundryPlugin
    • create

      public static AzureFoundryPlugin create()
      Creates an AzureFoundryPlugin using environment variables or default Azure credentials.
      Returns:
      a new AzureFoundryPlugin
    • getName

      public String getName()
      Description copied from interface: Plugin
      Returns the unique identifier for the plugin. This name is used for registration and lookup.
      Specified by:
      getName in interface Plugin
      Returns:
      the plugin name
    • init

      public List<Action<?,?,?>> init()
      Description copied from interface: Plugin
      Initializes the plugin. This method is called once during Genkit initialization. The plugin should return a list of actions that it provides.
      Specified by:
      init in interface Plugin
      Returns:
      list of actions provided by this plugin
    • customModel

      public AzureFoundryPlugin customModel(String modelName)
      Registers a custom model or deployment name. Use this to work with custom deployments not in the default list. Call this method before passing the plugin to Genkit.builder().
      Parameters:
      modelName - the model deployment name (e.g., "gpt-4.1", "my-custom-deployment")
      Returns:
      this plugin instance for method chaining
    • getOptions

      public AzureFoundryPluginOptions getOptions()
      Gets the plugin options.
      Returns:
      the options