-
Notifications
You must be signed in to change notification settings - Fork 35
Refactoring AI Services (Speech/OAI) to use AI Foundry Projects #5
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the AI infrastructure to use Azure AI Foundry instead of separate Speech and OpenAI services, improving modularity and alignment with Azure's latest offerings. The changes standardize naming conventions and reduce default resource usage for development environments.
Key changes:
- Introduces a new Azure AI Foundry Terraform module that consolidates Speech and OpenAI services
- Standardizes variable naming from
openai_modelstomodel_deploymentsacross all configurations - Reduces default pool sizes and prewarming batch sizes in development scripts
Reviewed Changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
infra/terraform/modules/ai/ |
New AI Foundry module with account, project, and model deployment provisioning |
infra/terraform/variables.tf |
Renamed openai_models variable to model_deployments |
infra/terraform/outputs.tf |
Updated outputs to use AI Foundry module endpoints instead of direct service references |
infra/terraform/containers.tf |
Updated container environment variables to use AI Foundry module outputs |
devops/scripts/azd/helpers/generate-env.sh |
Reduced default pool sizes from 50-100 to 5-10 for development optimization |
| # value = "https://${azurerm_cognitive_account.speech.custom_subdomain_name}.cognitiveservices.azure.com/" | ||
| } | ||
|
|
||
| env { | ||
| name = "AZURE_SPEECH_DOMAIN_ENDPOINT" | ||
| value = "https://${azurerm_cognitive_account.speech.custom_subdomain_name}.cognitiveservices.azure.com/" | ||
| value = module.ai_foundry.openai_endpoint | ||
| # value = "https://${azurerm_cognitive_account.speech.custom_subdomain_name}.cognitiveservices.azure.com/" | ||
| } | ||
|
|
||
| env { | ||
| name = "AZURE_SPEECH_RESOURCE_ID" | ||
| value = azurerm_cognitive_account.speech.id | ||
| value = module.ai_foundry.account_id | ||
| # value = azurerm_cognitive_account.speech.id |
Copilot
AI
Sep 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove commented-out code to improve maintainability. Multiple instances of commented legacy code should be cleaned up throughout the file.
…dling and provide fallback for Service Principal authentication; improve error messaging and preview functionality.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…pps/rtagent/frontend/vite-6.4.1 Bump vite from 6.3.5 to 6.4.1 in /apps/rtagent/frontend
Refactoring AI Services (Speech/OAI) to use AI Foundry Projects
…pps/rtagent/frontend/vite-6.4.1 Bump vite from 6.3.5 to 6.4.1 in /apps/rtagent/frontend
This pull request introduces significant changes to the infrastructure provisioning for AI services, primarily by integrating a new Azure AI Foundry module and updating how model deployments are managed. It also refactors environment variables and documentation to align with these changes, and removes some obsolete resources. The updates improve modularity, clarity, and future extensibility of the infrastructure code.
AI Foundry Integration:
modules/ai/foundry.tf) for provisioning Azure AI Foundry resources, including account, project, model deployments, role assignments, and diagnostic settings. This module outputs key resource identifiers and endpoints for downstream use. [1] [2]ai-foundry.tf), passing in relevant variables and wiring outputs for use by other resources.Model Deployment Refactor:
openai_modelstomodel_deploymentsthroughout Terraform code and documentation, improving clarity and consistency. [1] [2] [3] [4] [5] [6]Environment and Configuration Updates:
generate-env.shto lower resource usage, likely for development or cost optimization.main.tf."SecurityControl" = "Ignore"tag to resource tags for compliance or policy purposes.Cleanup and Minor Fixes:
azurerm_role_assignmentfor ACS Speech User and commented-out Cosmos DB resource block. [1] [2]source_arm_resource_idtosource_resource_idin Event Grid topic resource for ACS.Documentation Updates:
README.mdto reflect new variable/resource names and usage patterns for model deployments and AI Foundry integration. [1] [2] [3]These changes collectively modernize the AI infrastructure setup, making it more modular, maintainable, and aligned with Azure's latest offerings.