-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat: Add dedicated Azure OpenAI provider using @ai-sdk/azure package (EXT-709) #11144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Review complete. The Azure OpenAI provider implementation correctly follows the established AI SDK migration pattern and includes comprehensive test coverage, proper UI integration, and complete validation.
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
Review complete. No issues found. The Azure OpenAI provider implementation correctly follows the established AI SDK migration pattern (DeepSeek, Groq, Fireworks). The handler properly integrates with
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
- Add azureApiKey to SECRET_STATE_KEYS for proper configuration detection - Add Azure validation case in validateModelsAndKeysProvided - Add validation translations for azureResourceName and azureDeploymentName across all 18 locales This fixes the issue where the Finish button does nothing when setting up Azure provider in the onboarding workflow.
25d2476 to
1c3437f
Compare
This PR migrates the Azure OpenAI provider to use the AI SDK's dedicated @ai-sdk/azure package, following the exact pattern established in recent provider migrations (DeepSeek, Groq, Fireworks).
Changes
New Azure Provider (
src/api/providers/azure.ts)AzureHandlerextendingBaseProvidercreateAzurefrom@ai-sdk/azurefor native Azure OpenAI supportstreamTextandgenerateTextfrom AI SDKtool-input-start/delta/endeventsproviderMetadataProvider Type Registration
providerNamesinpackages/types/src/provider-settings.tsazureSchemawith Azure-specific options:azureApiKey- Azure OpenAI API keyazureResourceName- Azure resource nameazureDeploymentName- Azure deployment nameazureApiVersion- API version (defaults toazureOpenAiDefaultApiVersion)providerSettingsSchemaDiscriminatedandproviderSettingsSchemamodelIdKeysByProviderentry for azureMODELS_BY_PROVIDERBuild System
@ai-sdk/azuredependency tosrc/package.jsonAzureHandlerexport tosrc/api/providers/index.tsbuildApiHandlerinsrc/api/index.tsUI Integration
useSelectedModel.tsswitch statementTests (
src/api/providers/__tests__/azure.spec.ts)View task on Roo Code Cloud
Important
Introduces Azure OpenAI provider using
@ai-sdk/azure, updating provider settings, UI integration, and adding tests.AzureHandlerinazure.tsextendingBaseProviderfor Azure OpenAI support using@ai-sdk/azure.streamTextandgenerateTextmethods.providerNamesand addsazureSchemainprovider-settings.ts.providerSettingsSchemaDiscriminatedandproviderSettingsSchemafor Azure.validate.ts.useSelectedModel.tsandApiOptions.tsx.azure.spec.ts.This description was created by
for 1c3437f. You can customize this summary. It will automatically update as commits are pushed.