Conversation
- Add active_deployment_id and active_api_version properties to Router - Use pre_option filters to override Azure connector settings per-request - Prevent metadata cache poisoning when switching between capabilities - Add after_generate hook to clear deployment overrides - Split sync_connector_option to only persist api_key and endpoint - Add sync_request_options method for deployment_id and api_version - 54 tests passing with 170 assertions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 introduces version 0.3.0 of the AI Router plugin, focusing on enhanced support for Azure OpenAI, especially for image generation routing and per-request deployment switching. The update implements new mechanisms to override Azure deployment settings on a per-request basis, adds filters for capability discovery, and clarifies the synchronization of configuration options. These changes improve flexibility and compatibility with both text and image models.
Key changes include:
Azure OpenAI Per-request Routing and Option Syncing:
sync_request_optionsmethod toConfigurationRepository, allowing deployment ID and API version to be set dynamically for each request, ensuring the correct Azure deployment and model are used. This is exposed via the repository interface as well. [1] [2] [3]Router, introduced request-scoped overrides for deployment ID, API version, and capabilities, and registered new filters (pre_option_connectors_ai_azure_openai_deployment_id,pre_option_connectors_ai_azure_openai_api_version, andpre_option_connectors_ai_azure_openai_capabilities) to support per-request model and capability switching. [1] [2]Image Generation Routing Support:
Documentation and Versioning:
ai-router.php,package.json, andreadme.txtto 0.3.0, and documented new features and upgrade notices, including image generation routing support. [1] [2] [3] [4] [5] [6]Clarification and Refactoring:
api_keyandendpointare synced globally for Azure OpenAI, while deployment ID and capabilities are now handled per-request, improving compatibility with dynamic model discovery. [1] [2]Testing and Build Artifacts: