Add Azure OpenAI provider with configuration options and tests #301
+2,603
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request adds first-class support for Azure OpenAI as a provider in the codebase, including configuration, authentication, and endpoint handling. It introduces a dedicated provider class for Azure OpenAI, options for Azure-specific configuration, and ensures compatibility with various naming conventions. The changes also include new VCR test fixtures to verify integration with Azure OpenAI endpoints.
Azure OpenAI Provider Implementation:
AzureProviderclass inlib/active_agent/providers/azure_provider.rb, which extends the OpenAI provider to support Azure-specific authentication (using theapi-keyheader), endpoint structure, and required query parameters likeapi-version. Also introduces anAzureClientsubclass to handle these specifics.lib/active_agent/providers/azure/options.rb, supporting configuration ofazure_resource,deployment_id, andapi_version, with validation and sensible defaults.lib/active_agent/providers/azure/_types.rb.Provider Aliasing and Naming Consistency:
lib/active_agent/concerns/provider.rbto recognize multiple Azure OpenAI naming variants (e.g.,AzureOpenai,Azureopenai→AzureOpenAI).azure_open_ai_provider.rb,azure_openai_provider.rb,azureopenai_provider.rb) to ensure all common naming conventions load the Azure provider. [1] [2] [3]Testing and Integration: