feat: add Azure Foundry as dedicated provider#10837
Draft
roomote-v0[bot] wants to merge 1 commit intomainfrom
Draft
feat: add Azure Foundry as dedicated provider#10837roomote-v0[bot] wants to merge 1 commit intomainfrom
roomote-v0[bot] wants to merge 1 commit intomainfrom
Conversation
This adds Azure Foundry as a dedicated provider option, addressing the request in issue #10782 to have a dedicated provider that supports: - Full URL configuration (with ability to specify API version) - API key authentication - Model ID configuration The dedicated provider avoids Azure-specific parameter incompatibilities (such as prompt_cache_retention) that cause issues when using Azure Foundry through the generic OpenAI provider. Changes: - Add "azure-foundry" to provider types and schema - Create AzureFoundryHandler API handler - Create AzureFoundry settings UI component - Add useSelectedModel case for azure-foundry - Add translations for Azure Foundry UI - Add comprehensive unit tests
2 tasks
Contributor
Author
Reviewed all changes. No issues found. The implementation correctly adds Azure Foundry as a dedicated provider with:
All necessary files are properly integrated and unit tests provide comprehensive coverage (22 tests). Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
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.
Related GitHub Issue
Closes: #10782
Description
This PR attempts to address Issue #10782 by adding Azure Foundry as a dedicated provider, addressing the request from @NWessel to have a standalone provider that supports:
?api-version=2024-06-01-preview)The dedicated provider avoids Azure-specific parameter incompatibilities (such as
prompt_cache_retention) that cause issues when using Azure Foundry through the generic OpenAI provider.Implementation details:
packages/types/src/provider-settings.tsAzureFoundryHandlerAPI handler insrc/api/providers/azure-foundry.tsAzureFoundrysettings UI component inwebview-ui/src/components/settings/providers/AzureFoundry.tsxuseSelectedModelhook for azure-foundry providerTest Procedure
cd src && npx vitest run api/providers/__tests__/azure-foundry.spec.ts- all 22 tests passcd src && npx tsc --noEmitandcd webview-ui && npx tsc --noEmitpasspnpm lintpasses with no warningsManual testing steps:
https://your-endpoint.openai.azure.com/openai/deployments/your-model/chat/completions?api-version=2024-06-01-preview)Pre-Submission Checklist
Documentation Updates
Additional Notes
Feedback and guidance are welcome! This is a first attempt at implementing the dedicated Azure Foundry provider as requested.
Important
Adds Azure Foundry as a dedicated provider with full URL configuration, API key authentication, and model ID configuration, avoiding Azure-specific parameter incompatibilities.
prompt_cache_retention.azure-foundryto provider types and schema inprovider-settings.ts.AzureFoundryHandlerinazure-foundry.ts.buildApiHandler()inindex.ts.AzureFoundrycomponent inAzureFoundry.tsxfor settings UI.ApiOptions.tsxto include Azure Foundry in provider selection.settings.json.AzureFoundryHandlerinazure-foundry.spec.ts.This description was created by
for 94c2792. You can customize this summary. It will automatically update as commits are pushed.