Skip to content

feat(azure): Azure AI Foundry provider with model metadata and model picker#11144

Draft
roomote[bot] wants to merge 8 commits intomainfrom
feature/azure-ai-sdk-migration
Draft

feat(azure): Azure AI Foundry provider with model metadata and model picker#11144
roomote[bot] wants to merge 8 commits intomainfrom
feature/azure-ai-sdk-migration

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Feb 1, 2026

Summary

Fixes the Azure provider onboarding ("Finish" button not working) and significantly improves the Azure experience with model metadata, a model picker, and proper validation.

Changes

Bug Fixes

  • Fix "Finish" button stuck during onboarding — Added missing Azure validation case in validateModelsAndKeysProvided() and azureApiKey to SECRET_STATE_KEYS
  • Fix "maxOutputTokens must be >= 1" errorgetMaxOutputTokens() now filters invalid values (≤ 0) instead of passing through maxTokens: -1 from defaults

New Features

  • Static model metadata for 29 Azure models — Derived from models.dev API, covering GPT-4/4o/4.1, GPT-5/5.1/5.2, o1/o3/o4-mini, and Codex Mini
  • Roo-specific capability flags — Reasoning effort levels, includedTools/excludedTools (apply_patch for GPT-5.x), supportsVerbosity, and promptCacheRetention
  • Model picker dropdown — Users select a base model to tell Roo the capabilities of their deployment
  • Provider renamed — "Azure OpenAI" → "Azure AI Foundry" across all 18 locales

Improvements

  • API key made optional — Supports Azure managed identity / Entra ID auth
  • Default API version updated2024-08-01-preview2025-04-01-preview
  • Handler separates deployment name from model IDazureDeploymentName for API, apiModelId for capability lookup
  • Validation UX — No error messages on fresh provider selection
  • Model picker isolation — Stale apiModelId from other providers doesn't carry over
  • Removed unhelpful "Get Azure AI Foundry Access" button

Testing

  • All 5,441 tests pass across 371 test files
  • Manual testing of onboarding flow, model picker, validation, and API calls

@roomote
Copy link
Contributor Author

roomote bot commented Feb 1, 2026

Rooviewer Clock   See task

Review complete. No issues found. The missing isAiSdkProvider() override has been added with proper test coverage.

  • Missing isAiSdkProvider() override in Azure handler - needed for reasoning block preservation
Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@daniel-lxs daniel-lxs marked this pull request as ready for review February 2, 2026 02:36
@daniel-lxs daniel-lxs requested review from cte, jr and mrubens as code owners February 2, 2026 02:36
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. Enhancement New feature or request labels Feb 2, 2026
@roomote
Copy link
Contributor Author

roomote bot commented Feb 2, 2026

Rooviewer Clock   See task on Roo Cloud

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 @ai-sdk/azure, includes comprehensive test coverage, and has complete UI integration with translations for all locales.

  • No bugs or issues identified

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 2, 2026
@daniel-lxs daniel-lxs marked this pull request as draft February 2, 2026 17:29
@hannesrudolph hannesrudolph force-pushed the feature/azure-ai-sdk-migration branch from 25d2476 to 1c3437f Compare February 3, 2026 22:43
@hannesrudolph hannesrudolph changed the title feat: Add dedicated Azure OpenAI provider using @ai-sdk/azure package (EXT-709) feat(azure): Azure AI Foundry provider with model metadata and model picker Feb 5, 2026
roomote and others added 7 commits February 5, 2026 15:35
- 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.
…ndry

- Add static model metadata for 29 Azure models (from models.dev)
  with Roo-specific flags (reasoning, tools, verbosity) matching
  openAiNativeModels
- Add model picker dropdown to Azure provider settings for model
  capability detection (context window, max tokens, pricing)
- Rename provider label from 'Azure OpenAI' to 'Azure AI Foundry'
  across all 18 locales
- Make API key optional (supports Azure managed identity / Entra ID)
- Update default API version from 2024-08-01-preview to 2025-04-01-preview
- Fix maxOutputTokens validation (filter invalid values <= 0)
- Handler separates deployment name (API calls) from model ID
  (capability lookup) with azureDefaultModelInfo (gpt-4o) fallback
- Remove unhelpful 'Get Azure AI Foundry Access' button
- Prevent stale model IDs from other providers carrying over
- Suppress validation errors on fresh provider selection
@hannesrudolph hannesrudolph force-pushed the feature/azure-ai-sdk-migration branch from d00536b to e30e3c1 Compare February 5, 2026 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request lgtm This PR has been approved by a maintainer size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants